Bug 270430 - Random suspending after resuming or unplugging ac
Summary: Random suspending after resuming or unplugging ac
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
Depends on:
Reported: 2011-04-08 12:20 UTC by Otso Helenius
Modified: 2011-09-30 14:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.2


Note You need to log in before you can comment on or make changes to this bug.
Description Otso Helenius 2011-04-08 12:20:01 UTC
Version:           4.6 (using KDE 4.6.1) 
OS:                Linux

If my laptop has been on (idling) with ac for a while and I unplug it, sometimes KDE suspends (sleep) it almost immediately. My power settings are as follows:

On AC power: Performance, with no settings enabled in the KDE control module
AC unplugged: Powersave, with suspend enabled after 15 minutes of idling

Also, if the battery has run out and the computer has suspended, resuming it and plugging the AC power results sometimes in almost immediate suspending. Even after plugging the power and resuming, notifications shows "You computer will be suspended in 30 seconds" and offers no button to cancel it (like KDE 4.5 did). Thus, i'm forced to resume the computer twice.

I wouldn't rate this bug serious, only rather annoying. This never happened with KDE 4.5.x, it only started appearing after upgrading to 4.6.1.

Reproducible: Sometimes
Comment 1 Dario Freddi 2011-04-26 18:25:30 UTC
Can you please verify if this patch http://paste.kde.org/34399/ solves the "unplug after a while" problem?

About the button, it is no longer present as the action will no longer be undertaken if you plug the AC adaptor in, which is the only case where it is safe aborting. If that behavior does not work for you, it is a bug
Comment 2 Otso Helenius 2011-06-10 16:16:03 UTC
Sorry, I missed your pastebin patch, could you link it again?

And yes, the problem is exactly that when plugging AC in, it apparently does not abort suspending.
Comment 3 Otso Helenius 2011-08-22 20:52:12 UTC
Still present on 4.6.5. This often happens a while after resuming from suspend and unlocking the session. I have just enough time to open the wallet and connect to network, when the system suspends again. This happens without any pop-ups reporting of "suspending within 30 seconds" and it happens even when plugged in.
Comment 4 Otso Helenius 2011-09-01 09:20:46 UTC
Also happens consistently when the laptop lid is closed while ac is plugged in. When I unplug the ac, open the lid and unlock my session, the computer is suspended in ~30 seconds. I'll file this also in Fedora bugzilla in case it's not related to the KDE power management.
Comment 5 René Serral 2011-09-04 21:13:45 UTC
I have exactly the same problem with KDE 4.7, when I unplug the AC power most times the system directly suspends to RAM. The same happens when I suspend to disk with AC power, unplug it after the system is down, and then turn it on again, just after resuming the system goes to s2ram all on its own.
Comment 6 Dario Freddi 2011-09-30 11:28:22 UTC
Git commit ab6f70a5779df026bebddcf1c0aca9b6e56e956c by Dario Freddi.
Committed on 30/09/2011 at 13:18.
Pushed by dafre into branch 'master'.

Handle timeout resets in a 2-stage way

BUG: 270430

M  +9    -4    powerdevil/daemon/powerdevilcore.cpp
M  +1    -0    powerdevil/daemon/powerdevilcore.h

Comment 7 Dario Freddi 2011-09-30 14:12:55 UTC
Git commit 6329f3bd282cb1710e38587014ba6e512baf660a by Dario Freddi.
Committed on 30/09/2011 at 13:18.
Pushed by dafre into branch 'KDE/4.7'.

Handle timeout resets in a 2-stage way

BUG: 270430
FIXED-IN: 4.7.2

M  +9    -4    powerdevil/daemon/powerdevilcore.cpp
M  +1    -0    powerdevil/daemon/powerdevilcore.h