[Bug 151648] Re: guidance-power-manager needs restarting after resume in order to suspend again

Stijn Vansummeren stijn.vansummeren at gmail.com
Thu Jan 3 16:43:01 UTC 2008


I have the same problem on my Dell XPS M1210 laptop running KUbuntu 7.10
Gutsy Gibbon.

* Summary: 
The first time the lid is closed the laptop goes into sleep perfectly, after that I need to restart the power manager.

* Analysis of the problem:

I added some print statements to both guidance-power-manager.py and powermanage.py in /usr/share/python-support/kde-guidance-powermanager/  
These print statements show that after resuming from the first sleep, the call
  self.powermanager.getLidClosedState()
in line 723 of guidance-power-manager.py trigger a KeyError exception in getLidClosedState() of powermanage.py.

I suspect that the problem lies in  the following section of
/usr/lib/hal/scripts/linux/hal-system-power-suspend-linux:

#Refresh devices as a resume can do funny things
for type in button battery ac_adapter
do
        devices=`hal-find-by-capability --capability $type`
        for device in $devices
        do
                dbus-send --system --print-reply --dest=org.freedesktop.Hal \
                          $device org.freedesktop.Hal.Device.Rescan
        done
done

Could it be that after the rescan the lidObject of powermanage.py
becomes invalid?

-- 
guidance-power-manager needs restarting after resume in order to suspend again
https://bugs.launchpad.net/bugs/151648
You received this bug notification because you are a member of Kubuntu
Team, which is a bug contact for kde-guidance in ubuntu.




More information about the kubuntu-bugs mailing list