Videos won’t play on any browser after resuming from sleep (MacBook Pro)

Videos don’t play after resuming from sleep. The video loads, I can go to different parts of the video, but it just won’t play and give me the loading loop. This applies to almost all video sites. The only way I can get it working again is if I reboot.

It pretty much the errors below:

Windows 10: https://superuser.com/questions/1224050/computer-wont-play-any-online-video-until-i-reboot

Dealing with interrupt and sleep

I was thinking that I could calmly Thread.sleep() on an interrupted thread. Sonar doesn’t think so, of course.

In some circumstates we should waiting for conditions, even if an interrupt occured. Is there anything wrong, for example, with the code below? Is there any better solution?

private void waitFinish() {     boolean wasInterrupted = false;     while (asyncProgressCounter.get() > 0) {         try {             Thread.sleep(100);         } catch (InterruptedException e) { // NOSONAR             wasInterrupted = true;         }     }     if (wasInterrupted) {         Thread.currentThread().interrupt();     }     onFinish(); } 

Automatically sleep when all users (ssh or GUI) are logged out?

I’ve got an Ubuntu 19.04 desktop that I sometimes use as a physical workstation, and sometimes log into using ssh or NoMachine.

In order to save power, I’m wondering if there’s a way to make the computer automatically log off whenever there are no users, physical or remote, logged in.

I’ve tried setting “Suspend after 1 hour” in the power settings, but this seems to log off even if there are ssh users logged in.

Is there a way to enable this behaviour in Ubuntu?

possible put Ubuntu 18.04 Server to sleep with rtcwake and wake it up with Wake on Lan

I recently got a HP Z420 with 8-core and 32GB memory, and set it up as a Ubuntu 18.04 server. Noticing it consumes a lot of energy, I now use rtcwake to put it to sleep at 11pm each night.

Since I rarely access it during the week day except occasionally login remotely to experiment with VBox VMs, docker containers and docker machines, etc., I’d like to keep it in sleep to memory mode and wake it up only remotely using wake-on-lan when I need to access it.

Is such an arrangement possible?

15″ MacBook Pro with Iris graphics freezes on sleep after using HDMI on 18.10, 19.04

I have a 15″ MacBook Pro 2014 with Integrated Graphics (Iris Pro).

If I boot and never connect an external monitor to HDMI suspend-to-RAM works fine. However, if I connect an HDMI monitor and try to suspend, it never really shuts down. The screen goes black, but the keyboard backlight stays on. This happens even if I unplug the HDMI monitor before suspending.

This happened on Kubuntu 18.10 and is still happening on 19.04.

Any ideas?

Can’t exit screen saver except with system sleep

When my Mac Mini goes into screen saver, I can’t get out of it unless I press the hotkey that puts the computer to sleep. If I do that, then immediately press the shift-key, it wakes up from sleep and it is not in the screen saver. If I let the screen saver time out (currently an hour), the screen blanks and when I press the shift key I get the password prompt.

This makes no sense to me. I’ve tried resetting the parameter RAM and have tried changing screen saver.

I’d like to make this behavior stop.

Details:

macOS: 10.14.5 (Majove) Require Password: 4 hours after sleep or screen saver begins Turn display off after: 1hr Screen Saver: Classice Source: Photos Shuffle slide order Hot corners: Yes (lower right) Start After: 30 minutes 

Mac completely freezes when waking up from sleep

When I wake my MacBook Pro 15 inch up from a long period of time (2-5 hours) of sleep, my Mac shows a black screen (there is clearly some backlighting, so its on, just showing only black), and my Touchbar is on. However, it responds to absolutely no input: the trackpad, keyboard all have no effect. The Touchbar and the screen are both completely frozen.

A restart does seem to put everything back to normal, however. I should also add that in the events that my Mac had these sleep issues, the case was open. Whenever I shut my MacBook, physically, and leave the lid down, I notice no issues whatsoever. I’ve left my mac on sleep with the lid down for hours at end (traveling, or when I’m asleep) with zero issues whatsoever. Statistically speaking, I only experience issues when the lid is left up the and the Mac falls asleep.

I should note that I’ve already asked a similar question before, where my screen was instead showing a repetitive pattern, rather than a black screen. The link: 15 inch MacBook Pro running macOS Mojave woke up with blue screen from sleep

As of that previous question, I have run a diagnostic with no issues found.

I don’t know if the problem is hibernation or anything like that, but here is the relevant info:

❯ pmset -g                                                                  System-wide power settings: Currently in use:  standbydelaylow      10800  standby              1  womp                 1  halfdim              1  hibernatefile        /var/vm/sleepimage  proximitywake        1  powernap             1  gpuswitch            2  networkoversleep     0  disksleep            10  standbydelayhigh     86400  sleep                1  hibernatemode        0  ttyskeepawake        1  displaysleep         10  tcpkeepalive         1  highstandbythreshold 50  acwake               0  lidwake              1  
❯ pmset -g assertions 2019-06-15 23:03:12 -0700 Assertion status system-wide:    BackgroundTask                 0    ApplePushServiceTask           0    UserIsActive                   1    PreventUserIdleDisplaySleep    0    PreventSystemSleep             0    ExternalMedia                  0    PreventUserIdleSystemSleep     1    NetworkClientActive            0 Listed by owning process:    pid 354(useractivityd): [0x0000042d00018358] 00:00:01 PreventUserIdleSystemSleep named: "BTLEAdvertisement"     Timeout will fire in 58 secs Action=TimeoutActionTurnOff    pid 352(sharingd): [0x000003c70001834e] 00:01:43 PreventUserIdleSystemSleep named: "Handoff"    pid 100(hidd): [0x0000002900098145] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968616.3"     Timeout will fire in 600 secs Action=TimeoutActionRelease Kernel Assertions: 0x104=USB,MAGICWAKE    id=504  level=255 0x4=USB mod=12/31/69, 4:00 PM description=com.apple.usb.externaldevice.14300000 owner=USB Receiver    id=505  level=255 0x100=MAGICWAKE mod=6/15/19, 10:56 PM description=en0 owner=en0 Idle sleep preventers: IODisplayWrangler 

More information on my system:

  • Hardware: 2.2 GHz Intel Core i7, 16 GB 2400 MHz DDR4, Intel UHD Graphics 630 1536 MB, Radeon Pro 555X

  • Software: I have Xcode installed, and the apps running in the background were Spotify and iTerm.

15 inch MacBook Pro running macOS Mojave woke up with blue screen from sleep

So recently I came home after a few hours to my MacBook Pro (which was plugged in the whole day) and saw this:

Screen of MacBook Pro

What exactly would cause this?

More information on my system:

  • Hardware: 2.2 GHz Intel Core i7, 16 GB 2400 MHz DDR4, Intel UHD Graphics 630 1536 MB, Radeon Pro 555X

  • Software: I have Xcode installed, and the apps running in the background were Settings, Spotify, Atom (the text editor, with a fair number of plugins), and Chrome.

Update: Under Wilfred’s suggestion, I ran a diagnostic. Nothing was picked up; it appears there are no issues according to it.

MBP shutting down during sleep

I usually put my 2018 MBP into sleep by closing the lid (without any program open) and next time I only need to open the lid and unlock with fingerprint. However, it recently got an annoying behavior by occasionally shutting down during sleep, forcing me to login with password later.

Here is an excerpt from pmset -g log command:

Time stamp                Domain                Message                                                                     Duration    Delay      ==========                ======                =======                                                                     ========    =====      UUID: 34379762-xxxx-xxxx-xxxx-xxxxxxxxxxxx 2019-06-11 03:19:05 +0700 Notification          Display is turned off                                                                  2019-06-11 03:19:05 +0700 Assertions            PID 96(hidd) Summary UserIsActive "com.apple.iohideventsystem.queue.tickle.4294969463.3" 00:00:03  id:0x0x900008230 [System: DeclUser kDisp]           2019-06-11 03:19:05 +0700 Assertions            PID 74(apsd) Summary ApplePushServiceTask "com.apple.apsd-recreatecourierstate-push.apple.com" 00:00:02  id:0x0xb00008235 [System: DeclUser kDisp]           2019-06-11 03:19:05 +0700 Assertions            PID 74(apsd) Summary ApplePushServiceTask "com.apple.apsd-recreatecourierstate-sandbox.push.apple.com" 00:00:02  id:0x0xb00008234 [System: DeclUser kDisp]           2019-06-11 03:19:05 +0700 Assertions            Kernel Idle sleep preventers: -None-           2019-06-11 03:19:05 +0700 Assertions            PID 54(powerd) Created InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:00  id:0x0xd00008239 [System: PrevIdle DeclUser SRPrevSleep kCPU kDisp]           2019-06-11 03:19:13 +0700 Assertions            PID 74(apsd) Released ApplePushServiceTask "com.apple.apsd-recreatecourierstate-sandbox.push.apple.com" 00:00:10  id:0x0xb00008234 [System: DeclUser SRPrevSleep kCPU kDisp]           2019-06-11 03:19:13 +0700 Assertions            PID 74(apsd) Released ApplePushServiceTask "com.apple.apsd-recreatecourierstate-push.apple.com" 00:00:10  id:0x0xb00008235 [System: DeclUser SRPrevSleep kCPU kDisp]           2019-06-11 03:19:20 +0700 Assertions            PID 54(powerd) TimedOut InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:15  id:0x0xd00008239 [System: DeclUser SRPrevSleep kCPU kDisp]           2019-06-11 03:19:20 +0700 Assertions            Summary- [System: DeclUser kDisp] Using Batt(Charge: 28)           2019-06-11 03:19:20 +0700 Sleep                 Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=inactive Using Batt (Charge:28%)            2019-06-11 03:19:23 +0700 Wake Requests         [*proc=powerd request=TCPKATurnOff inDelta=43257]            2019-06-11 03:19:23 +0700 PM Client Acks        Delays to Sleep notifications: [com.apple.apsd is slow(2693 ms)]            2019-06-11 15:27:22 +0700 HibernateStats        hibmode=0 standbydelay=0                                                              0              Sleep/Wakes since boot at 2019-06-11 01:52:34 +0700 :0   Dark Wake Count in this sleep cycle:1  Time stamp                Domain                Message                                                                     Duration    Delay      ==========                ======                =======                                                                     ========    =====      UUID: Unknown UUID 2019-06-11 15:27:22 +0700 Failure               Sleep Failure [code:0xFFFFFFFF0000001F]:                                               Sleep/Wakes since boot at 2019-06-11 01:52:34 +0700 :0   Dark Wake Count in this sleep cycle:1  Time stamp                Domain                Message                                                                     Duration    Delay      ==========                ======                =======                                                                     ========    =====      UUID: (null) 2019-06-11 15:27:22 +0700 Start                 powerd process is started                                                              2019-06-11 15:27:22 +0700 Assertions            Summary- [System: No Assertions] Using Batt           2019-06-11 15:27:23 +0700 Assertions            Summary- [System: BGTask] Using AC(Charge: 23)           2019-06-11 15:27:29 +0700 Assertions            PID 54(powerd) Created InternalPreventSleep "Assertion to change proximity monitoring state" 00:00:00  id:0x0xd00008007 [System: SRPrevSleep kCPU]           2019-06-11 15:27:31 +0700 Assertions            Kernel Idle sleep preventers: IODisplayWrangler           2019-06-11 15:27:42 +0700 Assertions            PID 96(hidd) Created UserIsActive "com.apple.iohideventsystem.queue.tickle.4294968779.11" 00:00:00  id:0x0x9000080fc [System: PrevIdle DeclUser BGTask SRPrevSleep kCPU kDisp] 

So, at 3:19 AM the laptop was put to sleep: Entering Sleep state due to 'Clamshell Sleep':TCPKeepAlive=inactive Using Batt

However 3 seconds later there was a wake request from [*proc=powerd request=TCPKATurnOff inDelta=43257]. Also HibernateStats hibmode=0 standbydelay=0.

I really don’t know that means. Next time I open the lid at 15:27, this was put in log:

UUID: Unknown UUID 2019-06-11 15:27:22 +0700 Failure               Sleep Failure [code:0xFFFFFFFF0000001F]: 

I already disabled Power Nap and Wake for Wifi, tried resetting NVRAM and SMC. Problem still occasionally happen.

Here is pmset -g settings:

System-wide power settings: Currently in use:  standbydelaylow      10800  standby              1  womp                 0  halfdim              1  hibernatefile        /var/vm/sleepimage  proximitywake        1  powernap             0  gpuswitch            2  networkoversleep     0  disksleep            0  standbydelayhigh     86400  sleep                1  hibernatemode        3  ttyskeepawake        1  displaysleep         10  tcpkeepalive         1  highstandbythreshold 50  acwake               0  lidwake              1 

The machine is running latest Mojave 10.14.5.