Summary: | Monitor Power Saving Settings Reverting | ||
---|---|---|---|
Product: | [Unmaintained] kcontrol | Reporter: | Patrick <paimweb-business> |
Component: | kcmenergy | Assignee: | Sebastian Kügler <sebas> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | finex, jpdunn1970, jr |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Fix saving of DPMS settings
patch from kubuntu |
Description
Patrick
2006-06-05 18:04:35 UTC
Editing /etc/X11/Xorg.conf and adding option "offtime" "10" in the ServerLayout section will set kcmenergy to switching off the monitor after 10 minutes, and it does switch off after that time. During a session you can change the time in kcmenergy and it will act accordingly. But if you set it, let's say, to 20 mins and reboot the system it will be back to the 10 minutes that were set in the Xorg.conf. This offtime option was missing in the original Xorg.conf, it was suggested in a forum to add it. I have this problem as well. Same version etc as Patrick. If I run /usr/bin/systemsettings from console then go to Display > Power Saving and adjust the time to 15 mins I see this in the console - /usr/bin/xset dpms 900 900 900 The man page for xset says These settings will be reset to default values when you log out. Which would seem to explain the cause of the problem so I guess the solution is a change to the way systemsettings sets the value. Hope that's useful. I forget to say I had this same problem in 3.5.2 as well. That was a fresh install of Kubuntu 6.06. I subsequently updated to 3.5.3 with Kubuntu packages as obtained from a mirror listed at http://kubuntu.org/announcements/kde-353.php It seems that it's not only the time setting that is reverting, but also whether Power Saving is enabled or disabled as well. Power Saving reverts to the default setting of enabled after 30 minutes everytime KDE is restarted. Using Kubuntu 6.06 LTS, KDE 3.5.3. I confirm this problem with displayconfig. I invoked this module specifically (to be sure I had the correct one) by kcmshell displayconfig For now I have given up on displayconfig. Instead, I use the tried and true display module which is part of Kubuntu dapper, but which is not displayed in any of the menus by default. The way to remove displayconfig from the menus and replace with display is to edit /usr/share/applications/kde/display.desktop and /usr/share/applications/kde/displayconfig.desktop. Remove the last line (NoDisplay=true) from display.desktop and insert it in displayconfig.desktop instead. We're now writing dpms values to displayconfigrc and reading them back by means of displayconfig-restore at login. This should resolve this issue. Hello again. I am sorry to say that after a fresh installation of Kubuntu 6.06 Dapper with KDE 3.5.4 I am still experiencing the same bug. I had to resort to the "Offtime" option in Xorg.conf to get my monitor to switch off at the desired time. Still the values set in kcontrol revert to the standard 30 minutes after each reboot. There is a thread on kubuntuforums where people report this bug in KDE 3.5.4: http://kubuntuforums.net/forums/index.php?topic=8180.0 I am having the same problem as #7 using Kubuntu for AMD64. I lose the settings on reboot and they revert to 30 min but with power savings unchecked. When I set the savings to 1 minute... the screen goes to sleep but wakes up again about a minute or two later. I'm seeing this bug in Kubuntu 6.10. I guess I never noticed it in Kubuntu 6.06 because I always set OffTime to 30 minutes in kcmenergy. In Edgy Eft, the OffTime reverts to 5 hours when I reboot. Its a very annoying problem I hope gets fixed soon. The bug, reversion to default values, which affects Power Saving, Date and Time and Screensaver is still presnt in 3,5,5 and thus in the Kubuntu 6.10 release It looks as if it will be around for some time yet *** This bug has been confirmed by popular vote. *** Also here the power saving settings revert to 5 hours after reboot on a freshly installed Kubuntu Edgy 6.10 using KDE 3.5.5. Created attachment 18450 [details]
Fix saving of DPMS settings
DPMS settings were not saved (as opposed to what I told earlier), this patch
resolves it. If it doesn't, please check ~/.kde/share/config/displayconfigrc if
it's in there, if yes, report it here and reopen this bug.
*** Bug has been marked as fixed ***. I don't think that actually fixed the problem. I think there is a units problem. Setting the timeout to 15 minutes in the control panel causes a value of 900 to be placed in the displayconfigrc file, presumably in units of seconds. But on the next reboot, 'xset q' reports the timeout is 54000 seconds. The startup scripts interpreted the 900 as 900 minutes (54000 seconds), not 900 seconds. I'm running Kubuntu Edgy. I'm with Jim on this one, also running Kubuntu Edgy. There's something very weird going on. I even went and modified diplayconfig-restore.py and hardcoded the xset command and looked at what the before and after was. I changed line #169 'cmd = "xset dpms 260 260 260"'. Also, writing the output of "xset q" to a file before and after the command is run, the values were "Standby: 420 Suspend: 420 Off: 420" and corresponded to the values I have set under ServerFlags in xorg.conf. After the command is run the values were "Standby: 260 Suspend: 260 Off: 260", which is what we would expect. BUT, after KDE has started and I open a Konsole and check "xset q" again the values are all scaled by a factor of 60 => "Standby: 15600 Suspend: 15600 Off: 15600". If I change the hardcoded values passed to "xset dpms" to say 300, I will get 18000 showing up with "xset q", again a factor of 60. So something else is setting the dpms values after displayconfig-restore.py is run, multiplying whatever displayconfig-restore.py sets by 60. Any ideas? I completely agree with Jim Van Donsel: I log into kde, run displayconfig command, and notice the power off time is set to 2 hours; I then cat ~/.kde/share/config/displayconfigrc, and "dpmsSeconds=120" is shown, so despite it says "seconds", "minutes" are being used. I then change the 2 hours setting in displayconfig to 2 minutes, then click on apply. It now powers off the screen fine after those 2 minutes time, BUT after logging out & logging in again this setting is reverted to 2 hours. I've got the same behaviour before and after applying Sebastian Kügler's patch above (I'm running edgy). So I'd reopen this bug, because it seems to be still alive. As the latest reports show the bug seems not to be fixed. Therefore I reopen this bug report. I would also suggest to lift this bug to the "grave" priority level. The power saving is a fundamental issue in my eyes and I don't even want to know how much energy this bug was eating already. At the moment the monitor standby settings default to 5 hours (!!!) with every boot (at least in Kubuntu). This is a environmental issue and modern desktop systems should treat this with the required seriousness. Apart from that this bug is plainly annoying for the average user. It is around since half a year now. This bug is Ubuntu only, and it does also happen in the GNOME version. It is highly unlikely that this is a bug in guidance, so I'm closing it again. See also https://launchpad.net/distros/ubuntu/+source/kde-guidance/+bug/65791 As logged in Ubuntu bug, I think the root cause of this bug is that kenergy does not have consistent handling of dpms config file values. Timeout defaults are in minutes, when timeouts are set, they are properly multiplied by 60, but in other place DPMS settings are read and used as is (and they are in seconds). My proposed patch for 3.5.6 ensures that values read from current setting (reported by xset -q) are properly divided by 60 in order to use them as defaults if config file is not used. Created attachment 19129 [details]
patch from kubuntu
SVN commit 620866 by lure:
DPMS timeout settings on the system are in seconds and need to be divided
by 60 when used as defaults for reading config file timeout values
of kcontrol's energy module in order to have consistent handling.
>From 3.5 branch (revision 620863)
CCBUG: 128696
M +3 -3 energy.cpp
--- trunk/KDE/kdebase/workspace/kcontrol/energy/energy.cpp #620865:620866
@@ -117,9 +117,9 @@
DPMSInfo(dpy, &pre_configured_status, &pre_configured_enabled);
/* let the user override the settings */
enabled = cfg->readEntry("displayEnergySaving", bool(pre_configured_enabled));
- standby = cfg->readEntry("displayStandby", int(pre_configured_standby));
- suspend = cfg->readEntry("displaySuspend", int(pre_configured_suspend));
- off = cfg->readEntry("displayPowerOff", int(pre_configured_off));
+ standby = cfg->readEntry("displayStandby", int(pre_configured_standby/60));
+ suspend = cfg->readEntry("displaySuspend", int(pre_configured_suspend/60));
+ off = cfg->readEntry("displayPowerOff", int(pre_configured_off/60));
} else {
/* provide our defauts */
enabled = true;
Fixed with last commit by Luka Renko. running 3.5.8 and this problem is still present. *** Bug 136542 has been marked as a duplicate of this bug. *** @Jonathan: are you still experiencing this issue even with 3.5.10? If so, please tell us! I'll reopen this report if the problem has not been solved. |