#1 2020-07-03 21:12

solstyce9
Member
Registered: 2020-07-03
Posts: 7

Shutter stopping (System unattended sleep timeout)

Intel NUC8
Win10 latest updates
Avast
Plex media server latest version
Shutter Lite 4.4
PlexDVRWaker

Shutter is wonderful - Does exactly what I need, except this one problem...

I've set my power config to not sleep or hibernate and rely on Shutter to put it to sleep based on the events / actions below, and network activity (Plex client requests) or PlexDVRWaker (scheduled DVR recordings) to wake it up.  However, about once a week I will notice my system is still awake, and when I look at the desktop Shutter is running, but the icon is greyed out and Shutter has stopped monitoring events.  If I manually start Shutter it will usually work for a little while but eventually go back to greyed out / stopped.  Rebooting my system seems to put Shutter back in a state where it functions as expected, until the next time this happens.

I'm looking for tips on how to debug Shutter / Windows to understand why Shutter is stopping.  Even if other events like Windows Update or Plex maintenance wake the system, I would expect Shutter to put it back to sleep once whatever woke it completes.

I've read the recent thread on Shutter disabling and the Hibernation-not-working thread it references, but those don't seem to help in this case, since sleep is working fine, when Shutter is working.  The problem is that Shutter is somehow stopping monitoring events.

Does Shutter have a debug / logging mode where I can see when / why it is stopping?

Events [ALL]:
1) Network Usage: Upload below 3 KB/s for 960 seconds (Average)
2) User Inactive: Inactive for 0:15:00 using Last Input Event
3) CPU Usage: Below 5% for 960 seconds (Average)
Actions:
1) Sleep

Any and all assistance greatly appreciated!

Offline

#2 2020-07-04 15:51

solstyce9
Member
Registered: 2020-07-03
Posts: 7

Re: Shutter stopping (System unattended sleep timeout)

Hmm, just realized I had a fundamental misunderstanding of how Shutter works.  I thought it defaulted to an endless loop and would stay running constantly, so every time an action set completed, it would go back to monitoring again.  Because my action was to sleep and I had Shutter set to start on wake up, it was acting as an endless loop, except when it failed to sleep for some reason.

I've discovered the "Utilities - Restart Events" action and added it as a second event after "Sleep".  Hopefully this will restart Shutter monitoring events when the system fails to sleep for whatever reason.  I currently have a race condition where Shutter is set to restart events after waking up, and the Action is to restart events, so it will be interesting to see how it works.

Hopefully whatever is keeping my system from sleeping is a temporary thing, and Shutter will be able to keep operating as expected.

Would still be nice to have an option for logging actions so I could see when it's triggering sleep and the system is failing to sleep so I could check that time against system logs.

Offline

#3 2020-07-10 21:47

solstyce9
Member
Registered: 2020-07-03
Posts: 7

Re: Shutter stopping (System unattended sleep timeout)

Still struggling with this one.  I still have situations where it seems like when the system wakes back up after a sleep event, it's going right back to sleep within a few minutes.  It feels like perhaps the events are not being reset on restart.

I've disabled to resume event monitoring on resume from sleep/hibernate and am just relying on the "Utilities: restart events".  I've also changed the sleep command to disable wake event, and added a 120 second pause before restarting. Since my system wakes up 1 minute before a Plex DVR recording is scheduled, the 120 second wait is to make sure Shutter doesn't put the system back to sleep before Plex starts recording.

Since we don't have any logging, I've also added a screenshot as the first action so I can record the event states and timestamp every time it sleeps.

Has anyone else had problems like this?  Wondering if I'm doing something wrong.

Here are my current events/actions and Advanced settings.

Events [ALL]:
1) Network Usage: Upload below 3 KB/s for 960 seconds (Average)
2) User Inactive: Inactive for 0:15:00 using Last Input Event
3) CPU Usage: Below 5% for 960 seconds (Average)
Actions:
1) Screenshot: Date and time stamped in "C:\Users\media\Desktop\shutter screenshots\"
2) Sleep: Disable wake event
3) Utilities: Pause for 120 seconds
4) Utilities: Restart events

Advanced settings

Last edited by solstyce9 (2020-07-10 21:48)

Offline

#4 2020-07-12 20:50

solstyce9
Member
Registered: 2020-07-03
Posts: 7

Re: Shutter stopping (System unattended sleep timeout)

I seem to be talking to myself here, but for the benefit of anyone else who runs into this in the future...

The noise in my setup was being caused by Windows.  Windows power management has a hidden setting "System unattended sleep timeout" that puts the system to sleep if it's been woken up by something other than user action, e.g. wake on LAN, and there isn't any user action that occurs after that.  By default it is set to 2 minutes.  I realized as I was fixing this that I'd already fixed this once last year, so something (Windows Update?) must have reset it.  Absolutely appalling behavior Microsoft!

I followed these instructions on SuperUser and turned the setting back to visible and set to "0" to disable it.

I also disabled "Disable wake event" for my Sleep action since that was keeping PlexDVRWaker from waking my system to record shows in Plex.

It worked fine this morning - woke up on network traffic, stayed awake until Shutter triggered a sleep action, and then woke up later at the correct time for a scheduled DVR recording.

Thanks again for an excellent tool, den4b!  My electric bill and I both thank you!

Offline

#5 2020-07-13 23:33

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Shutter stopping (System unattended sleep timeout)

Thank you for a very detailed write-up about your problem AND the solution. I am sure other users will find it useful.

It is becoming increasingly more difficult to deal with such issues under Windows, mainly because Microsoft continues to break compatibility with nearly every update now, arbitrarily resetting/changing user settings and adding more conflicting and confusing settings. There is now at least a dozen options that deal with sleep and wake-up patterns, spread around the old and new settings dialogs, power options, device properties, registry and policy editors.

I am glad that you have found the settings which interfered with your setup. Sorry for not offering you at least some guidance earlier.

By the way, you can check the Event Viewer for events associated with the power functions to understand when and what caused your computer to sleep and wake up.

There is a detailed topic on this subject that offers more information, please have a look:
Hibernation does not work?

Last edited by den4b (2020-07-13 23:37)

Offline

#6 2020-07-18 18:17

solstyce9
Member
Registered: 2020-07-03
Posts: 7

Re: Shutter stopping (System unattended sleep timeout)

Yeah, Windows is a beast to deal with.  I just chose it over Linux because I'm more familiar with it.

I just made the mistake of applying the Win 10 May 2020 feature update.  Broke Plex access to UNC network paths even though my account credentials are correct, so I had to revert the feature update.  Maybe they'll get that bug fixed in the next feature update but until then I turned off automatic Windows updates and only update when I want now...

Offline

Board footer

Powered by FluxBB