Bug 261590

Summary: Closing laptop lid while the screen is locked don't suspend to ram
Product: [Unmaintained] solid Reporter: Law, Cheuk-wing <jhnpwa>
Component: powermanagementAssignee: Dario Freddi <drf>
Status: RESOLVED FIXED    
Severity: normal CC: m.wege, sven.burmeister
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Law, Cheuk-wing 2010-12-30 07:22:22 UTC
Version:           unspecified (using KDE 4.5.90) 
OS:                Linux

I have turned on suspend to ram when I close the lid. It does suspend to ram when the screen is not locked. However, when the screen is locked or the screensaver is running, closing the lid dose not suspend to ram and keeps draining the battery.

Reproducible: Always

Steps to Reproduce:
1) Ensure your laptop does suspend to ram when you close the lid.
2) Lock the screen or press Ctrl+Alt+L.
3) Close the lid.

Actual Results:  
My laptop keeps running and don't suspend to ram.

Expected Results:  
It suspends to ram when the lid is closed no matter who close the lid.

I am using Dell Vostro 3400 running Kubuntu 10.10.
Comment 1 Law, Cheuk-wing 2010-12-30 08:16:04 UTC
Sorry, it is not always reproducible but occasionally. e.g. While it is suspended, quickly open and close the lid will not suspend it again.
Comment 2 Dario Freddi 2011-01-05 11:35:54 UTC
I believe it is quite expected, and it is because the policy agent kicks in due to the fact that consolekit does not recognize your session as active when the screen is locked. This is actually a long-standing issue lying in ck, which does not handle such a case. However, I'll try finding a workaround.
Comment 3 Dario Freddi 2011-01-05 11:41:28 UTC
*** Bug 259922 has been marked as a duplicate of this bug. ***
Comment 4 Dario Freddi 2011-01-07 14:52:57 UTC
SVN commit 1212574 by dafre:

BUG: 261590

Hack around CK limitations by monitoring seats and saving the last active session's ID

 M  +77 -17    powerdevilpolicyagent.cpp  
 M  +8 -1      powerdevilpolicyagent.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1212574
Comment 5 S. Burmeister 2011-04-08 14:17:05 UTC
If bug 260731 is a dup of this one then the bug is still present in KDE 4.6.2.

Easy to reproduce. Plug-in the power for your notebook (brightness 100% due to performance scheme) and leave it idle. Dim is set to 30 minutes for performance. Powerdevil will suspend the display after 10 minutes (bug 264730 which is not fixed in KDE 4.6.2).

So if you wait longer than 30 minutes before moving the mouse again it will not return to 100% birghtness but the dimmed state, i.e. the lowest brightness possible.

Please re-open this bug otherwise I'll re-open the dup.