[Bug 65791] Re: DPMS timeout restored incorrectly on login

Luka Renko lure.net at gmail.com
Sat Dec 9 12:13:21 UTC 2006


Jonh, thanks for pushing this one forward. I think both of suggested
patches are not really appropriate, as they just cure the side effect
and not the root cause. The issue is that kdisplayrc contains values in
minutes, therefore it does not make sense to change defaults to seconds
as suggested by Francisco. I think the correct patch is that when
kdisplayrc is read, proper defaults are used. Currently, they use DPMS
values directly (in seconds) and this wrongly initializes the defaults.

I think the right patch is the following:

diff -Nur kdebase-3.5.5a.dfsg.1/kcontrol/energy/energy.cpp kdebase-3.5.5a.dfsg.1.new/kcontrol/energy/energy.cpp
--- kdebase-3.5.5a.dfsg.1/kcontrol/energy/energy.cpp    2006-10-01 19:31:49.000000000 +0200
+++ kdebase-3.5.5a.dfsg.1.new/kcontrol/energy/energy.cpp        2006-12-09 13:05:07.000000000 +0100
@@ -111,9 +111,9 @@
            DPMSInfo(dpy, &pre_configured_status, &pre_configured_enabled);
            /* let the user override the settings */
            enabled = cfg->readBoolEntry("displayEnergySaving", pre_configured_enabled);
-           standby = cfg->readNumEntry("displayStandby", pre_configured_standby);
-           suspend = cfg->readNumEntry("displaySuspend", pre_configured_suspend);
-           off = cfg->readNumEntry("displayPowerOff", pre_configured_off);
+           standby = cfg->readNumEntry("displayStandby", pre_configured_standby/60);
+           suspend = cfg->readNumEntry("displaySuspend", pre_configured_suspend/60);
+           off = cfg->readNumEntry("displayPowerOff", pre_configured_off/60);
        } else {
        /* provide our defauts */
            enabled = true;

I am building kdebase now to try this out.

I am still not sure why this is triggered only with KDE 3.5.5. There was only one change in 3.5.5 in this code:
http://websvn.kde.org/branches/KDE/3.5/kdebase/kcontrol/energy/energy.cpp?rev=575644&r1=438982&r2=575644

I will discuss with the guy who committed this change about his view of
this problem.

-- 
DPMS timeout restored incorrectly on login
https://launchpad.net/bugs/65791




More information about the kubuntu-bugs mailing list