System standby on queue finish Ubuntu Lucid

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • 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.
Post Reply
Dufu
Newbie
Newbie
Posts: 3
Joined: May 16th, 2010, 3:57 am

System standby on queue finish Ubuntu Lucid

Post by Dufu »

Hi,

I'm trying to let SABnzbd put my system to standby when the download queue is empty, but it's not working.

I found this in the logs:

Code: Select all

Exception in thread Thread-34:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/src/SABnzbd/sabnzbd/__init__.py", line 538, in system_standby
    misc.linux_standby()
  File "/usr/local/src/SABnzbd/sabnzbd/misc.py", line 1240, in linux_standby
    if proxy.Get(interface, 'can-suspend', dbus_interface=pinterface):
AttributeError: 'NoneType' object has no attribute 'Get'
Python-dbus is installed. Any know how to get this working?

Thanks.

Edit:
To clarify, I'm not using the Ubuntu package. I'm running straight from source (0.5.2). (this topic seemed to be moved to the ubuntu/debian package subforum)
Last edited by Dufu on May 16th, 2010, 4:11 am, edited 1 time in total.
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: System standby on queue finish Ubuntu Lucid

Post by jcfp »

Might want to make sure dbus itself is actually installed too, other than that no idea.
Dufu
Newbie
Newbie
Posts: 3
Joined: May 16th, 2010, 3:57 am

Re: System standby on queue finish Ubuntu Lucid

Post by Dufu »

Dbus itself is installed. Might have something to do with Lucid using UPower?
monty0815
Newbie
Newbie
Posts: 2
Joined: May 16th, 2010, 2:22 pm

Re: System standby on queue finish Ubuntu Lucid

Post by monty0815 »

That would appear to be the problem, the code as it is now can not work on lucid as devicekit is deprecated und upower used instead.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: System standby on queue finish Ubuntu Lucid

Post by shypike »

Our response will probably be to remove power management support for Unix/Linux altogether.
Instead people will need to have an end-of-queue user script.
Dufu
Newbie
Newbie
Posts: 3
Joined: May 16th, 2010, 3:57 am

Re: System standby on queue finish Ubuntu Lucid

Post by Dufu »

I guess it'll be a user script then.
monty0815
Newbie
Newbie
Posts: 2
Joined: May 16th, 2010, 2:22 pm

Re: System standby on queue finish Ubuntu Lucid

Post by monty0815 »

This works for me:

Code: Select all

#!/usr/bin/python
# -*- coding: utf-8 -*-
import dbus
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower')
iface = dbus.Interface(proxy, 'org.freedesktop.UPower')
iface.Suspend()
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: System standby on queue finish Ubuntu Lucid

Post by shypike »

Good content for a user script.
SABnzbd is agnostic regarding the actual Unix/Linux distribution and specific configuration.
Given that, we should never have implemented a specific power management solution.
The Windows and OSX variants will keep support because power management is fairly consistent across their releases.
Zignut
Newbie
Newbie
Posts: 2
Joined: June 17th, 2010, 3:06 pm

Re: System standby on queue finish Ubuntu Lucid

Post by Zignut »

I solved the problem this way: http://forums.sabnzbd.org/index.php?topic=4565.0

-Zignut
Post Reply