Page 1 of 2
1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sierra
Posted: January 8th, 2017, 10:42 am
by ApexDE
I used to activate "system-sleep-after-finished-queue" in the sabnzb settings. Since i updated to macOS Sierra, the system does not go to sleep-mode anymore. I was on OSX El-Capitan before.
Is this a known Issue?
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 8th, 2017, 12:39 pm
by shypike
It's not a known issue.
But it's not a great surprise either, since Apple so often breaks its compatibility.
We'll check and try to fix it.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 9th, 2017, 10:41 am
by ApexDE
Choosing "shutdown" after finished queue does work. So maybe getting sleep mode back is not that hard to fix

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 10th, 2017, 4:38 pm
by shypike
It works fine when I test it.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 10th, 2017, 4:48 pm
by ApexDE
Is there a way to collect/view debug data for the "after download commands"?
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 10th, 2017, 7:09 pm
by shypike
You could set SABnzbd's logging to Debug and inspect it later.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 11th, 2017, 4:08 am
by ApexDE
I set it the log output to debug but i just get:
2017-01-11 09:58:08,014::INFO::[postproc:814] Queue has finished, launching: <function system_hibernate at 0x55c8370> (None)
2017-01-11 09:58:08,015::INFO::[__init__:747] Performing system hybernation
The system won't hibernate though. The macOS system.log doesn't show any errors regarding sleep.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 11th, 2017, 5:05 am
by shypike
Both Hiberate and Sleep result in the screen going black, at least on my iMac.
But I don't know how to tell the difference between the two states.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 11th, 2017, 5:56 am
by ApexDE
OK, system sleep works if i select "Bereitschaft" instead of "Ruhezustand"

"Ruhezustand" used to work before, just like "Bereitschaft" does now. Odd.
2017-01-11 11:49:54,242::INFO::[postproc:814] Queue has finished, launching: <function system_standby at 0x55c83b0> (None)
2017-01-11 11:49:54,242::INFO::[__init__:758] Performing system standby
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 14th, 2017, 5:59 am
by ApexDE
Update: with 1.20 Release Version neither standby nor hibernation works, ONLY shutdown.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 15th, 2017, 10:20 am
by ApexDE
I guess the bug lies here. I made a rock-solid sleep script for commandline. It works perfect in every condition, but not with sabnzb. It isn't spwaned correctly, see here:
USERNAME should be mine (ds)
2017-01-15 16:00:06,418::INFO::[postproc:85] Saving postproc queue
2017-01-15 16:00:06,419::INFO::[__init__:970] Saving data for postproc2.sab in /Users/<USERNAME>/Library/Application Support/SABnzbd/admin/postproc2.sab
2017-01-15 16:00:06,419::INFO::[postproc:815] Queue has finished, launching: <function run_script at 0x54ca530> (sleep-now.sh)
2017-01-15 16:00:06,419::INFO::[__init__:827] Spawning external command ['/Users/<USERNAME>/nzb-scripts/sleep-now.sh']
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 16th, 2017, 5:12 am
by shypike
Does you script run or not?
The built-in standby/hibernation still works for me, both on a laptop and a desktop.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 20th, 2017, 10:25 am
by ApexDE
I put some debug output in the script. Problem is: the script does NOT run on postprocess-finish, even though the log says it did.
Thats why the machine won't got to sleep mode.
Code: Select all
2017-01-20 16:21:32,200::INFO::[postproc:815] Queue has finished, launching: <function run_script at 0x55cc530> (sleep-now.sh)
2017-01-20 16:21:32,200::INFO::[__init__:827] Spawning external command ['/Users/<USERNAME>/nzb-scripts/sleep-now.sh']
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 20th, 2017, 12:24 pm
by safihre
When you say you added debug output, what do you mean?
Things you echo/print from the script won't be shown in the sabnzbd log.
Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie
Posted: January 20th, 2017, 4:12 pm
by ApexDE
I put some echo output to be written in a text file. The script works when called from terminal and logs to the text file, but not when called from sabnzb. The script isn't executed at all.
I can get the system to sleep if i ssh into it and execute "pmset sleepnow" mybe you can add this command as a postprocessing option?