Version: unspecified (using KDE 4.6.2) OS: Linux If the display is turned off by powerdevil before the dimming happens the brigthness is not restored after the display is powered on again. Expected behaviour: always restore the brigtness set in the active scheme when the mouse is moved. Do not dimm is display is powered-off. This bug has been around since KDE 4.6.0 and is a regression compared to KDE SC 4.5. Reproducible: Always
Oh, and it is _NOT_ a dup of bug 261590 since that one is marked as fixed for 4.6.1 which is obviously a false statement if it was a bug.
This is a duplicate of bug 271478. (which is slightly older than this)
*** Bug 271478 has been marked as a duplicate of this bug. ***
I cannot reproduce on trunk, both in case the dimming happens before the DPMS kicks in, and the other way round. Can you please confirm this is still an issue?
Created attachment 64096 [details] powerdevilrc
Created attachment 64097 [details] powerdevil2profilesrc
Created attachment 64098 [details] powerdevilprofilesrc Profiles that cause the issue even with 4.7
(P.S.: You need to look at powerdevil2profilesrc, that file is the old version's one) Btw, I think I found the cause for this bug, even if I triggered it in a different way. Unsurprisingly, the problem is related to polkit+consolekit. That's what happens: when the screen starts to dim, it tries to get back the current brightness. But, in your case and in mine as well, the action does not succeed (I guess you can verify this easily in your kded4 output), hence the value returned is 0. I'm betting you have screen locking enabled, that's why the session gets inactive. To workaround this bug, the proper fix is changing the policy to allow the system to get the brightness even if the console is inactive, as there is no other way. This requires first of all a patch in KAuth, and afterwards a small addition to powerdevil. In the meanwhile, you can try changing permissions by yourself and get this bug fixed.
*** Bug 272917 has been marked as a duplicate of this bug. ***
To test if this is the reason, edit /usr/share/polkit-1/actions/org.kde.powerdevil.backlighthelper.policy, and set allow_inactive of the .brightness action to "yes".
Git commit 96cafc57a6f2faf3c18f087b15d72aca56bd4895 by Dario Freddi. Committed on 30/09/2011 at 15:59. Pushed by dafre into branch 'KDE/4.7'. KAuth should be able to parse correctly policies for inactive consoles CCBUG: 272438 M +8 -3 kdecore/auth/backends/policykit/kauth-policy-gen-polkit.cpp M +8 -3 kdecore/auth/backends/polkit-1/kauth-policy-gen-polkit1.cpp M +8 -0 kdecore/auth/policy-gen/policy-gen.cpp M +1 -0 kdecore/auth/policy-gen/policy-gen.h http://commits.kde.org/kdelibs/96cafc57a6f2faf3c18f087b15d72aca56bd4895
Git commit 0397c756762c1211f7128ed83149d8e56c0565a3 by Dario Freddi. Committed on 30/09/2011 at 15:59. Pushed by dafre into branch 'frameworks'. KAuth should be able to parse correctly policies for inactive consoles CCBUG: 272438 M +8 -3 tier1/libkauth/backends/policykit/kauth-policy-gen-polkit.cpp M +8 -3 tier1/libkauth/backends/polkit-1/kauth-policy-gen-polkit1.cpp M +8 -0 tier1/libkauth/policy-gen/policy-gen.cpp M +1 -0 tier1/libkauth/policy-gen/policy-gen.h http://commits.kde.org/kdelibs/0397c756762c1211f7128ed83149d8e56c0565a3
Git commit e6c99554efb7f3fbb09aa20ad58b4695426a3822 by Dario Freddi. Committed on 30/09/2011 at 16:06. Pushed by dafre into branch 'master'. The system should always be able to fetch brightness. For this reason, allow this action to be performed even on inactive consoles - after all, it's anything but harmful. Note this depends on KAuth's 96cafc57a6f2faf3c18f087b15d72aca56bd4895 in KDE 4.7 to work properly. BUG: 272438 FIXED-IN: 4.7.2 M +1 -0 powerdevil/daemon/backends/upower/backlight_helper_actions.actions http://commits.kde.org/kde-workspace/e6c99554efb7f3fbb09aa20ad58b4695426a3822
Git commit daf0f9eec12f94ac352069e181bfa93812a19eef by Dario Freddi. Committed on 30/09/2011 at 16:06. Pushed by dafre into branch 'KDE/4.7'. The system should always be able to fetch brightness. For this reason, allow this action to be performed even on inactive consoles - after all, it's anything but harmful. Note this depends on KAuth's 96cafc57a6f2faf3c18f087b15d72aca56bd4895 in KDE 4.7 to work properly. BUG: 272438 FIXED-IN: 4.7.2 M +1 -0 powerdevil/daemon/backends/upower/backlight_helper_actions.actions http://commits.kde.org/kde-workspace/daf0f9eec12f94ac352069e181bfa93812a19eef