Bug 221637 - powerdevil always suspends twice
Summary: powerdevil always suspends twice
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-daemon (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
: 225010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-07 13:11 UTC by S. Burmeister
Modified: 2012-04-09 19:28 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix double suspend bug (583 bytes, patch)
2010-04-12 21:25 UTC, Felix Geyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2010-01-07 13:11:34 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

After an autosuspend, i.e. the netbook was not used for x minutes, I immediately resume. Yet as soon as KDE is back up and asks for the password powerdevil suspends again. After resuming a second time it works.

I'm not sure what could cause this, maybe some race condition or not enough time has passed between suspend and resume?
Comment 1 Ctibor Brančík 2010-01-11 15:10:54 UTC
I can confirm this using 4.3.90 compiled from gentoo kde overlay.
Comment 2 Rafael 2010-02-16 19:59:58 UTC
This bug is still present in KDE 4.4.0 using OpenSuse RPM's.
Autosuspend (both: to disk or to RAM) is always done twice, for instance when battery is critical low and KDE suspends, or when laptop has been X minutes in inactivity.
Comment 3 Benjamin 2010-02-22 11:19:35 UTC
Still have the bug on 4.4 final (arch linux)

no matter how long the laptop is in suspend i always have to wake him up a second time.

since i only can wake him by using the power button i dont know if this only happens then and/or also when waking the laptop up by opening the lid.
Comment 4 Benjamin 2010-02-22 11:24:55 UTC
(In reply to comment #3)
> Still have the bug on 4.4 final (arch linux)
> 
> no matter how long the laptop is in suspend i always have to wake him up a
> second time.
> 
> since i only can wake him by using the power button i dont know if this only
> happens then and/or also when waking the laptop up by opening the lid.

(Hardware: Samsung NC10)
Comment 5 Mirko 2010-03-03 09:11:58 UTC
Existriert problem with KDE 4.4.1 too. First time suspend to RAM before notification begins to count (30 sec). After resume, after 30 sec counter sent computer back to suspend.

(Opensuse 11.2, Aspire 5100)
Comment 6 Tiago Cerqueira 2010-03-08 00:54:39 UTC
I can, also, confirm this bug on OpenSUSE 11.2, running KDE 4.4.1. After a certain amount of time my laptop suspends. When I wake it up, it suspends again and I have to wake it up again.
This does not happen if I manually suspend it.
Comment 7 Rafael 2010-03-17 16:31:01 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Brian Hall 2010-04-05 03:58:05 UTC
Confirm bug on Arch Linux 32-bit with KDE 4.4-3
Comment 9 Rafael 2010-04-12 06:15:25 UTC
This bug is terrible for laptop users, who usually uses suspend functionalities.
I don't understand why this bug hasn't a higher priority. After two bugfix revisions after KDE 4.4.0 was released, this bug is still present, we are already going to 4.4.3 and I do not see any activity or interest in fixing this bug by developers.
I know this is Free Software and this is made by volunteers, so we cannot "demand", but this bug is really important to fix.
Comment 10 Harald Sitter 2010-04-12 16:30:43 UTC
*** Bug 225010 has been marked as a duplicate of this bug. ***
Comment 11 Felix Geyer 2010-04-12 21:25:30 UTC
Created attachment 42725 [details]
Patch to fix double suspend bug

The bug is in PowerDevilDaemon::emitNotification()
It calls the slot (in this case suspendToRam()) immediately and after the waitBeforeSuspendingTime.
So PowerDevil shows the suspend notification and suspends right away.
After waking up PowerDevil suspends again after the waitBeforeSuspendingTime.

The solution is to not call the slot immediately as it also breaks the waiting before suspension/shutdown.
Comment 12 Felix Geyer 2010-04-15 20:03:20 UTC
SVN commit 1115238 by fgeyer:

Fix PowerDevil always suspending the system twice and not waiting the
configured time before suspending/shutting down.
BUG: 221637



 M  +0 -4      PowerDevilDaemon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115238
Comment 13 Felix Geyer 2010-04-15 20:15:37 UTC
SVN commit 1115243 by fgeyer:

Backport r1115238.

Fix PowerDevil always suspending the system twice and not waiting the
configured time before suspending/shutting down.

CCBUG: 221637



 M  +0 -4      PowerDevilDaemon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115243
Comment 14 Aitor 2012-04-09 19:28:41 UTC
Suffering this same bug in 4.8.2. Should I open a new one? This one is quite old.