Bug 221648

Summary: powerdevil only autosuspends once/twice
Product: [Frameworks and Libraries] solid Reporter: S. Burmeister <sven.burmeister>
Component: powermanagement-daemonAssignee: Dario Freddi <drf>
Status: RESOLVED FIXED    
Severity: normal CC: debfx-kde, rdieter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to reset d->status in PowerDevilDaemon::resumeFromIdle()

Description S. Burmeister 2010-01-07 14:08:59 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

This might be related to bug 221637. After powerdevil autosuspends I immediately resume, it autosupspends again (see the mentioned bug) and I resume again. After that it never autosuspends again although the relevant power profiles are set to do so.

there might have been a powerlevel change in-between but that should not matter.
Comment 1 Felix Geyer 2010-04-12 21:39:31 UTC
Created attachment 42730 [details]
Patch to reset d->status in PowerDevilDaemon::resumeFromIdle()

When a suspension due to the idle time is trigger, d->status is set to Action in PowerDevilDaemon::poll().
After that d->status is never reset to NoAction (except if "dim display when idle" is activated) as poll is only called with idle == settings->readEntry("idleTime").toInt() * 60 * 1000.

The attached patch fixes this by resetting d->status resumeFromIdle().
Comment 2 Felix Geyer 2010-04-15 20:40:06 UTC
SVN commit 1115250 by fgeyer:

Fix bug that causes idle actions to be triggered only once per session.
d->status was never reset to NoAction after such an action.

BUG: 221648


 M  +2 -0      PowerDevilDaemon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115250
Comment 3 Felix Geyer 2010-04-15 20:42:54 UTC
SVN commit 1115252 by fgeyer:

Backport r1115250.

Fix bug that causes idle actions to be triggered only once per session.
d->status was never reset to NoAction after such an action.

CCBUG: 221648


 M  +2 -0      PowerDevilDaemon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115252