1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sierra

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sierra

Post 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?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post by ApexDE »

Choosing "shutdown" after finished queue does work. So maybe getting sleep mode back is not that hard to fix :)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post by shypike »

It works fine when I test it.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post by ApexDE »

Is there a way to collect/view debug data for the "after download commands"?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post by shypike »

You could set SABnzbd's logging to Debug and inspect it later.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post by ApexDE »

Update: with 1.20 Release Version neither standby nor hibernation works, ONLY shutdown.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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']
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post by shypike »

Does you script run or not?
The built-in standby/hibernation still works for me, both on a laptop and a desktop.
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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']
User avatar
safihre
Administrator
Administrator
Posts: 5510
Joined: April 30th, 2015, 7:35 am
Contact:

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
ApexDE
Newbie
Newbie
Posts: 31
Joined: August 8th, 2012, 6:09 am

Re: 1.1.1/1.2.0RC1 : Sleep-when-finished broken on macOS Sie

Post 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?
Post Reply