Bug 210389 - System should not hibernate when power unplugged
Summary: System should not hibernate when power unplugged
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-daemon (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
: 183060 183505 191545 206751 208853 (view as bug list)
Depends on:
Blocks: 257871
  Show dependency treegraph
 
Reported: 2009-10-13 01:52 UTC by John Wheaton
Modified: 2010-11-25 14:03 UTC (History)
5 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 John Wheaton 2009-10-13 01:52:49 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

Hardware:  Acer AOD250
Distro:  Kubuntu 9.04
KDE:  4.3.2

If I do not touch any keys or mouse and leave my laptop plugged in for any amount of time longer than when it would suspend to RAM if it were unplugged, and then unplug the computer, it automatically hibernates.

This is quite annoying since I tend to unplug it before moving it to use it.

To prevent this I must remember to touch a key before unplugging it.  Then the idle counter is restarted and it won't suspend when I unplug it.

If there is any way to detect "the power was -just- disconnected, therefore restart the idle counter" that would be fantastic.

To replicate:
1. check the timer on when your laptop would suspend if running on battery
2. plug in computer (power)
3. leave it alone for that time +1 minute (for good measure)
4. touch no keys or mouse or mouse button
5. unplug the power
6. watch your computer suspend to RAM even if you are fast enough to click "Cancel" on the notification
7. gnash teeth and foam at mouth (that part is optional, but it's what I feel like doing as I watch my computer suspend when I really want to use it instead)

As a sort'a aside, and I've filed a bug on this particular issue, this is particularly annoying now since my wireless hardware doesn't work upon resuming.  I have to reboot.  This mere annoyance has turned into a downright frustration now.  Since things used to be better, I am confident they can be restored to that better state, and optimistic that you folks a Super Cool enough to make it even better than before.
Comment 1 Dario Freddi 2009-12-01 17:07:38 UTC
Given also the heartfelt report (even if I usually do not require it), scheduling it for being fixed within the next few days :)
Comment 2 Dario Freddi 2009-12-01 17:13:17 UTC
*** Bug 208853 has been marked as a duplicate of this bug. ***
Comment 3 Dario Freddi 2009-12-01 17:18:13 UTC
*** Bug 183505 has been marked as a duplicate of this bug. ***
Comment 4 Dario Freddi 2009-12-01 17:19:08 UTC
*** Bug 183060 has been marked as a duplicate of this bug. ***
Comment 5 Dario Freddi 2009-12-01 17:37:06 UTC
*** Bug 191545 has been marked as a duplicate of this bug. ***
Comment 6 Dario Freddi 2009-12-01 19:02:20 UTC
*** Bug 206751 has been marked as a duplicate of this bug. ***
Comment 7 Dario Freddi 2009-12-08 14:19:51 UTC
SVN commit 1060282 by dafre:

BUG:210389

Reset the idle counter whenever the adaptor gets plugged/unplugged



 M  +2 -0      PowerDevilDaemon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1060282
Comment 8 S. Umar 2009-12-08 16:20:13 UTC
Thank you! is it simple to backport to 4.3 branch? I applied the patch
blindly but compilation failed because KIdleTime was not declared.
Thanks
Comment 9 Dario Freddi 2009-12-08 16:25:18 UTC
Not so straight unfortunately... you would have to change the KIdleTime line with the same call the 4.3 daemon used internally. Dive in the code for simulateUserActivity(), and just use it back. Even if the most straightforward way to check if it's fixed would be checking out last 4.4