Bug 439709

Summary: closing the lid does not suspend
Product: [openSUSE] openSUSE 11.3 Reporter: Juergen Weigert <jw>
Component: KDE4 WorkspaceAssignee: E-mail List <kde-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P2 - High CC: ctrippe, forgotten_kHYb7eJGnH, shafff
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 357354    
Attachments: pm-suspend.log

Description Juergen Weigert 2008-10-28 23:44:14 UTC
this is a lenovo X60s with kde 4.1.2

Probably because kpowersave is not installed.
it is not in 'Add Widgets' nor can the search in the suse menu locate it.
Comment 1 Christian Zoz 2008-10-29 09:45:09 UTC
We don't have Kpowersave for KDE4. Was KPowerdevil installed?
Comment 2 Juergen Weigert 2008-10-29 10:14:48 UTC
$ rpm -r /mounted-root-of-11.1-beta3 -qa | grep -i devil
powerdevil-1.3.0-1.11
$ 
Nothing with a 'k'.

I did not see any power-supply related icons, except for a battery monitor.
Comment 3 Christian Zoz 2008-10-29 13:06:54 UTC
I guess this is not the only problem with powerdevil. Nevertheless it's a KDE4 issue.
Comment 4 Juergen Weigert 2008-10-31 21:18:45 UTC
same with beta4
Comment 5 Juergen Weigert 2008-11-03 23:04:43 UTC
I found a way to access the KPowerDevil in beta4!

Still no icons to click or applications to call, 
but this brings up KPowerDevil:

Suse Menu -> search "desktop configuration"
-> click on icon 'Personal Settings: Desktop configuration'
  -> Advanced -> Power Management
     -> Edit Profiles
       click open 'Screen and Actions'
       for each Profile:
         When Laptop Lid Closed: 'Suspend to Ram'
         When Power Button pressed: 'Prompt Log out dialog'
     -> Save current Profile
     -> Apply

I strongly suggest to create shell scripts called kpowerdevil and
kpowersave
that guide the user to /usr/bin/systemsettings with its powersave screen.
this would help to bridge the gap between user expectations and 
available options.
Comment 6 Juergen Weigert 2008-11-03 23:09:32 UTC
further enhancement: krunner and the suse menu search should react to keywords like power kpower powersave kpowersave powerdevil kpowerdevil devil ... 
Comment 7 Lubos Lunak 2008-11-21 10:55:39 UTC
I don't understand what the actual problem is - the default configuration has suspend to ram on closing the lid except when on AC power. Does suspend work otherwise?

As for wrapper scripts, I would personally expect people capable of running them to be also capable of finding out that for configuring power management they should go to the power management module in configuration.

Comment 8 Juergen Weigert 2008-11-21 14:09:57 UTC
wrt wrapper scripts: I assumed that KPowersave is still what I should use in KDE4, as the Kpowersave icon was present in the panel, with out any hints that it is obsoleted by kpowerdevil. Please forgive my confusion.


I was not aware that suspend should depend on the presence of AC power.

With beta5: Closing the lid while in the docking station with AC connected suspends the machine.

In general suspend/resume works unreliable.
On my second attempt I got: 

Error while suspend to RAM - KPowersave

An unknown error occurend while Suspend to Ram. The errorcode is: '5'
Do you want tot have a look at the log file?
[YES]

Comment 9 Juergen Weigert 2008-11-21 14:19:47 UTC
Created attachment 254367 [details]
pm-suspend.log
Comment 10 Nick Shaforostoff 2008-12-19 17:05:44 UTC
deinstall KPowersave, as it interferes with kpowerdevil.
Comment 11 Juergen Weigert 2009-11-03 20:25:58 UTC
still seen on 11.2 with KDE4, promoting from 11.1 to 11.2

Nick, 
Power Management - System Settings - Help   
mentions that the software is called PowerDevil, I cannot locate the relevant RPM package from there.
Comment 12 Nick Shaforostoff 2009-11-04 17:21:27 UTC
PowerDevil is part of kdebase-workspace.

P.S. I switched to debian and everything works fine here.
Comment 13 Christian Trippe 2009-12-30 19:31:39 UTC
The requested information was provided.
Comment 14 Forgotten User kHYb7eJGnH 2010-04-19 22:31:25 UTC
Juergen, is this still a problem with KDE4.3.5 or later?
Comment 15 Juergen Weigert 2010-04-20 09:09:12 UTC
I am currently running 11.2 with KDE 4.3.5 on the machine, and the behaviour is slightly different.

Most of the time lid close actually suspends, just as it is configured in 
system settings -> advanced -> powermanagement

When the machine was unattended for a while, lid close sometimes does nothing.
The usual routine when I leave my home resulted in a comfortably hot backpack a few times:
- pull power cord
- close lid
- stuff laptop into backpack.

Best is to add one more step:
- hold it before closing the backpack, watch blinkenlights, 
  and do s2ram manually if needed.

Sometimes it also hangs on resume, where I suspect that the exact sequence is also an issue. plugging in power well after resume and log in, appears to be helpful.
Comment 16 Juergen Weigert 2010-06-22 22:09:27 UTC
This is reproducable 100%:
closing the lid does nothing, if a screenlocker is active.

This is reproducable sometimes:
When it appears to be hung on resume, swiping the finger on the fingerprint reader, causes some disk activity, then another screenlocker is shown, which I can unlock by swiping the finger again.
Looks like two screen locker run ontop of each other.
Comment 17 Christian Trippe 2010-06-23 06:14:02 UTC
(In reply to comment #16)
> This is reproducable 100%:
> closing the lid does nothing, if a screenlocker is active.
> 

Known upstream bug: https://bugs.kde.org/show_bug.cgi?id=205453 and duplicate of bug 530893

I have seen now, that the upstream bug has a patch attached (agaist KDE 4.4.3) which claims to fix this bug.

> This is reproducable sometimes:
> When it appears to be hung on resume, swiping the finger on the fingerprint
> reader, causes some disk activity, then another screenlocker is shown, which I
> can unlock by swiping the finger again.
> Looks like two screen locker run ontop of each other.

This sounds like a different bug then the initial one. I would suggest to fill a new bug for this problem.
Comment 18 Forgotten User kHYb7eJGnH 2010-07-28 12:47:26 UTC
Juergen, does the 4.4.3 fix work okay for you?
Thanks
Comment 19 Juergen Weigert 2010-07-28 14:11:37 UTC
I can no longer reproduce with 11.2, the machine has been upgraded to 11.3
running KDE 4.4.4;
I see still the same situation. Closing the lid does nothing, when a screenlocker is active. When there is no screenlocker, it usually suspends, as it should.

I made sure that I have set 'lid close -> suspend to ram' in all settings.

Should I reinstall KDE from some specific repo to try out this patch?
Comment 20 Forgotten User kHYb7eJGnH 2010-07-30 09:32:36 UTC
I've made a comment about this in the upstream report, so we'll wait and see what happens there...
Comment 21 Christian Trippe 2010-08-13 10:08:48 UTC
I close this bug now as a duplicate of the newer bug 530893 to track the case that there is no suspend triggered when the screen is locked, because this one is already quite long and the other one is only for this one issue. I hope this is fine for you.

*** This bug has been marked as a duplicate of bug 530893 ***