Bug 183273 - Closing lid while shutting down should not invoke suspend-to-disk
Summary: Closing lid while shutting down should not invoke suspend-to-disk
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Unmaintained
Component: powermanagement-daemon (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
: 183537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-05 09:13 UTC by Diederik van der Boor
Modified: 2010-10-02 12:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diederik van der Boor 2009-02-05 09:13:13 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    SuSE RPMs

My laptop started suspending while it was shutting down KDE. After opening the laptop, it continued with the shutdown procedure, and fired signals to init.

When I press "Shutdown computer" from the KDE shutdown dialog, and close the lid afterwards Powerdevil shouldn't start suspending to disk.
Comment 1 Dario Freddi 2009-02-07 13:43:12 UTC
Accepted, though I need to figure out this
Comment 2 Dario Freddi 2009-02-08 13:48:40 UTC
SVN commit 923145 by dafre:

BUG: 183273

Listening to the newly-added signal of ksmserver should avoid this behavior
when pc is turned off. Implementation still sucks, since it triggers an
unremovable inhibit without reason (yeah, no additional strings so that it can be
backported), but I'll think about something else a bit more polite, especially
when I'll refine inhibition with timeouts & friends.



 M  +6 -0      PowerDevilDaemon.cpp  
 M  +2 -0      PowerDevilDaemon.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=923145
Comment 3 Dario Freddi 2009-02-08 13:54:09 UTC
SVN commit 923147 by dafre:

BUG: 183273

Backporting fix to 4.2



 M  +4 -0      ksmserver/KSMServerInterface.h  
 M  +6 -0      ksmserver/org.kde.KSMServerInterface.xml  
 M  +4 -0      ksmserver/server.h  
 M  +2 -0      ksmserver/shutdown.cpp  
 M  +6 -0      powerdevil/daemon/PowerDevilDaemon.cpp  
 M  +2 -0      powerdevil/daemon/PowerDevilDaemon.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=923147
Comment 4 Diederik van der Boor 2009-02-08 22:46:05 UTC
Thanks for the quick response!
Comment 5 Lubos Lunak 2009-02-09 11:42:54 UTC
*** Bug 183537 has been marked as a duplicate of this bug. ***
Comment 6 Dario Freddi 2009-03-22 13:16:17 UTC
SVN commit 942654 by dafre:

CCMAIL: kde-core-devel@kde.org
CCBUG: 183273

As discussed on the list, new patch for KSMServer+PowerDevil regarding
bug #183273. Now no signals are emitted from ksm, instead an inhibition is triggered
from it. Less code, more clean, and we also have more control over this since upon
cancelation the inhibition gets released.

Also backporting this to 4.2 branch



 M  +0 -3      ksmserver/KSMServerInterface.h  
 M  +0 -6      ksmserver/org.kde.KSMServerInterface.xml  
 M  +2 -3      ksmserver/server.h  
 M  +6 -2      ksmserver/shutdown.cpp  
 M  +0 -6      powerdevil/daemon/PowerDevilDaemon.cpp  
 M  +0 -2      powerdevil/daemon/PowerDevilDaemon.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=942654
Comment 7 Chad Sprouse 2010-05-13 01:52:13 UTC
I am still experiencing this bug KDE 4.4.3.  I can replicate every time if I hit the power button and then close the lid before KDE has a chance to complete the shutdown.