Bug 295814

Summary: Power management settings ignored
Product: [Unmaintained] solid Reporter: Zach <zachleigh>
Component: powermanagement-daemonAssignee: Dario Freddi <drf>
Status: RESOLVED WORKSFORME    
Severity: normal CC: dev+kde, dookius.aurelius, drf, eagleton, ftg, jardasmid, KDE, ketetefid, mbriza, oliver.henshaw, valdikss, yasuna, zachleigh
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: ~/.kde/share/config/powermanagementprofilesrc

Description Zach 2012-03-12 02:32:40 UTC
Created attachment 69522 [details]
~/.kde/share/config/powermanagementprofilesrc

Using Kubuntu 11.10 with KDE 4.8

All power management settings are ignored in main user profile.  Currently, power management is set to never dim display,  never enter screen energy saving mode, and never suspend.  All activity special settings have been disabled so all activities should follow the main power management profile.  However, the screen dims after ten minutes in all activities.

As suggested in the KDE forum post below, I created a new user profile to test in.  All power management settings worked in the new profile.
http://forum.kde.org/viewtopic.php?f=66&t=100264&sid=c022864712d65e5540d61c64b4b75a67
Comment 1 Dario Freddi 2012-03-14 08:31:23 UTC
Wait - this is confusing. Reading your forum thread, it looks more like your problem is tied with activities management - what do you mean by "user profile"?
Comment 2 Zach 2012-03-14 13:41:02 UTC
Should read "User Account."  Sorry.

Anyway, the problem occurs in all user accounts.  If I open a new user account, I can change power management settings in the initial login, but all power management settings are ignored after logging out and logging back in.
Comment 3 dookius.aurelius 2012-06-26 12:03:19 UTC
Hi, I am experiencing the same problem. Unchecking the dim display doesn't work. The only thing that sort of helps is increasing the dim display time too 360 min. 

OS Information
OS:  Linux 3.4.3-1.fc17.x86_64 x86_64
System:  Fedora release 17 (Beefy Miracle)
KDE:  4.8.3 (4.8.3)

Display Info
Vendor:   NVIDIA Corporation
Model:   GeForce 8600 GT/PCIe/SSE2
Driver:   3.3.0 NVIDIA 295.59
Monitor: Samsung SMBX2050
Comment 4 Jaroslav Šmíd 2012-06-28 12:03:43 UTC
Same problem here. It gets really annoying. When I disable (uncheck) everything in power manager settings, it is just ignored. My display turns off all the time, every time I log in in different intervals. 

Today I logged in and it was turning every second! I managed to run the konsole and run "xset q":
DPMS (Energy Star):
  Standby: 1    Suspend: 1    Off: 2
  DPMS is Enabled
  Monitor is On

Looks funny, really. My relevant setting in xorg configuration file is

Section "ServerFlags"
        Option "DPMS" "False"
        Option "BlankTime" "0"
        Option "StandbyTime" "0"
        Option "SuspendTime" "0"
        Option "OffTime" "0"
EndSection

This gets respected while running e.g. openbox, but when I run KDE or when I start any KDE application from openbox, it gets messed up and set to random values every time - like power manager wouldn't even initialize the variables when the power saving features are turned off and turned it on and set to unitialized values.

I can turn DPMS off again with "xset -dpms", but every time I switch or reconfigure my monitor (using either xrandr directly or systemsettings utility) it gets enabled again, and it looks like that sometimes it even enables by itself.

Setting the stuff to maximum values in systemsettings works, but that is not what I want. I want it completely disabled.
Comment 5 Martin Bříza 2012-07-17 09:08:59 UTC
Similar issue is also reported in the Red Hat Bugzilla for Fedora 17 (KDE SC 4.8.2) on https://bugzilla.redhat.com/show_bug.cgi?id=811486 .

https://bugs.kde.org/show_bug.cgi?id=299979 is possibly related too.
Comment 6 Frank Griffin 2012-08-08 13:23:43 UTC
I confirm this on Mageia cauldron.  A common aspect is that I also have set Power Management to never dim or shut off the display.  The dpms numbers do seem to be random.  I got a 30-second timeout.  However, when I manually issued "xset -dpms" and rebooted, dpms was still disabled.
Comment 7 Kete Tefid 2012-09-04 11:05:53 UTC
Confirmed here.
Something seems to be wrong. I have created a script which was run for a few times and then stopped. More interestingly when I changed the script, kde insisted on running the old one and producing the old results. I have to always manually run the script which is totally awkward.
Thank God, my other options work just fine. But the script management is somehow broken.
Linux FefidLaptop 3.4.6-pf #3 SMP PREEMPT Mon Sep 3 16:39:37 IRDT 2012 x86_64 Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz GenuineIntel GNU/Linux
kde 4.8.3
Comment 8 Frank Steinmetzger 2012-09-14 17:35:22 UTC
I have the opposite problem (which probably started with 4.9, running Gentoo here).
I use Power Management to switch off the backlight when my laptop wakes me in the morning, but the rest of the day I don't need that feature, so I disable power management. However, once I did this, re-enabling PM doesn't have an effect anymore --- the backlight stays on. One way I found to get around this is to log out and back in. I guess restarting plasma could also do the trick.
Comment 9 valdikss 2012-10-16 21:55:37 UTC
Same as Frank Steinmetzger. BTW it can be activated again of you connect your laptop to charger and disconnect again.
Comment 10 Oliver Henshaw 2012-11-01 17:44:31 UTC
The DPMS part of this sounds like bug #295164
Comment 11 Frank Griffin 2012-11-01 18:26:46 UTC
(In reply to comment #6)
> I confirm this on Mageia cauldron.  A common aspect is that I also have set
> Power Management to never dim or shut off the display.  The dpms numbers do
> seem to be random.  I got a 30-second timeout.  However, when I manually
> issued "xset -dpms" and rebooted, dpms was still disabled.

At the time I wrote this, -dpms survived a reboot.  But there is *something* that is turning it back on unpredictably.  Seeing as I'm running cauldron and updating multiple times a day, this could be new package installation, or there could be some sort of daemon resetting things.
Comment 12 Frank Griffin 2012-11-01 18:29:13 UTC
(In reply to comment #9)
> Same as Frank Steinmetzger. BTW it can be activated again of you connect
> your laptop to charger and disconnect again.

I can confirm this too, but sort of in reverse.  If I unplug the laptop, the screen dims (but does not blank), and when I plug it back in, it stays dim.  Unplugging and replugging it causes the brightness to go back to normal.
Comment 13 Yevheniy 2012-11-02 14:39:23 UTC
Hello!
I have a bug, that display is usually dimmed, and does not react on the power management settings or manual regulation of light through keys: Fn + "sun". 
Computer: Samsung RV508, system Kubuntu 12.04 32bit.
Comment 14 Yevheniy 2012-12-25 19:54:37 UTC
*** This bug has been confirmed by popular vote. ***
Comment 15 valdikss 2013-01-05 22:09:10 UTC
The bug with dpms is still exist.
1) Run xset q, ensure "standby", "suspend" and "off" DPMS values are set
2) Open battery monitor, uncheck "power management enabled"
3) Run xset q again, "standby", "suspend" and "off" DPMS values should be set to 0
4) Open battery monitor, check "power management enabled"
5) Run xset q, "standby", "suspend" and "off" DPMS values are still 0, but should be as in step 1.
Comment 16 valdikss 2013-01-05 22:43:03 UTC
Wow! Not sure how, but I've just changed some settings, rebooted and everything works fine now.
Comment 17 Frank Steinmetzger 2013-01-07 21:11:51 UTC
To whom it may concern: my problem which I described in comment #8 had been fixed for my machine a while ago.
Comment 18 Oliver Henshaw 2013-02-07 13:55:52 UTC
The screen turning off at the wrong time was fixed in 4.9.3 - see bug #295164.

If any commenters still have problems with the screen dimming or brightness changes, or a new problem with the screen turning off: please file a new bug.

Zach, do you still have these problems? Do you still have a problem with power management settings in a movies activity, as described in the kde forum post?
Comment 19 Zach 2013-02-07 15:54:56 UTC
Still have all the problems listed in this bug and the supposedly resolved #295164.  Running KDE 4.95.
Comment 20 Oliver Henshaw 2013-02-07 16:15:15 UTC
Do you mean 4.9.5 or 4.9.95 (a 4.10 pre-release)? If the latter, please update to 4.10 final, just in case.

* What's the current contents of  ~/.kde/share/config/powermanagementprofilesrc ?
* What's the output of 'xset -q'?
* What's the output of 'sleep 590; xset -q; sleep 20; xset -q' if you leave the computer idle for 10+ minutes (adjust for however long it takes for the screen to turn off)?

Are you talking about the screen turning off, or about the screen dimming (brightness changes)?
Comment 21 Zach 2013-02-10 04:44:35 UTC
Upgraded to 4.10 and was still having issues.  Did some playing around and found that Dragonplayer turns DPMS on.  On startup, xset -q gives the proper output, but after playing a video in Dragonplayer...

DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On

I think you can go ahead and close this bug, as the issue originally described appears to be solved.  Ill report a new bug against dragonplayer.
Comment 22 Zach 2013-02-10 04:51:29 UTC
New bug against Dragonplayer:
https://bugs.kde.org/show_bug.cgi?id=314810
Comment 23 Kete Tefid 2013-02-10 07:01:41 UTC
All of options for setting brightness, dimming the display, screen energy saving, suspending session, and button handling work fine. However, sometimes only the following problem occurs:
-The power manager does not understand that the main power is unpluged and vice versa, especially, when the pc comes from a standby or hibernation. As a result of this, incorrect brightness is set and an incorrect icon for the profiles appears. However, a relogin fixes this problem. Shall this be considered as a bug? How can we shun this?
About the script management, I think it is working fine. I suppose there were some permission problems for my old script. 
Just to check something, is the idle time in powermanagementprofilesrc for the script on battery necessary? I have set it to be run immediately on profile load.

[Battery][RunScript]
idleTime=60000
scriptCommand=/usr/local/bin/batgoverner
scriptPhase=0

[Battery][SuspendSession]
idleTime=3600000
suspendType=2

[LowBattery]
icon=battery-low

[LowBattery][BrightnessControl]
value=30

[LowBattery][DPMSControl]
idleTime=120

[LowBattery][DimDisplay]
idleTime=60000

[LowBattery][HandleButtonEvents]
lidAction=1
powerButtonAction=2
Comment 24 Oliver Henshaw 2013-02-10 16:36:34 UTC
(In reply to comment #23)
> -The power manager does not understand that the main power is unpluged and
> vice versa, especially, when the pc comes from a standby or hibernation. As
> a result of this, incorrect brightness is set and an incorrect icon for the
> profiles appears. However, a relogin fixes this problem. Shall this be
> considered as a bug? How can we shun this?
Yes, please file a new bug for this.

> Just to check something, is the idle time in powermanagementprofilesrc for
> the script on battery necessary? I have set it to be run immediately on
> profile load.
The idle time is ignored in that case - it's greyed out in the kcm, I think. It might still be present in the configuration file but it's harmless.

> [Battery][RunScript]
> idleTime=60000
> scriptCommand=/usr/local/bin/batgoverner
> scriptPhase=0
Comment 25 Oliver Henshaw 2013-02-10 16:41:11 UTC
Closing per comment #21.
Comment 26 Zach 2013-02-12 00:49:38 UTC
Dim Display isnt working:
https://bugs.kde.org/show_bug.cgi?id=314956
Comment 27 KDE 2013-03-03 17:55:27 UTC
In 4.10, my screen energy saving setting is ignored. The screensaver will start, but the screen will never blank. Should I enter this as a new bug, and is there more information I can gather for it? It does seem to be working on another machine with a different video card, etc.
Comment 28 KDE 2013-03-05 05:18:07 UTC
Further details for the above comment ... suspend does not seem to work (timed suspend in power management never activates). The "Dim" setting does seem to take effect.
Comment 29 Oliver Henshaw 2013-03-05 12:16:18 UTC
(In reply to comment #27)
> In 4.10, my screen energy saving setting is ignored. The screensaver will
> start, but the screen will never blank. Should I enter this as a new bug,
> and is there more information I can gather for it? It does seem to be
> working on another machine with a different video card, etc.

File a new bug and we'll take it from there.
Comment 30 KDE 2013-03-05 14:27:29 UTC
Thanks Oliver ... under what component should I file a bug? I was looking yesterday and I wasn't sure what applied.
Comment 31 Oliver Henshaw 2013-03-05 14:31:52 UTC
(In reply to comment #30)
> Thanks Oliver ... under what component should I file a bug? I was looking
> yesterday and I wasn't sure what applied.

solid/powermanagement-daemon will do, just like this one.
Comment 32 KDE 2013-03-05 16:11:14 UTC
I actually found that a patch has been made for bug#314250 and will be released in 4.10.1. Sorry to bother you.