Bug 261590 - Closing laptop lid while the screen is locked don't suspend to ram
Summary: Closing laptop lid while the screen is locked don't suspend to ram
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
: 259922 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-30 07:22 UTC by Law, Cheuk-wing
Modified: 2011-04-08 14:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.