Bug 306490 - Installing or removing packages with Muon turns off screen power
Summary: Installing or removing packages with Muon turns off screen power
Status: RESOLVED DUPLICATE of bug 295164
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: 4.9.0
Platform: Ubuntu Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-09 11:41 UTC by Saurav Sengupta
Modified: 2013-02-07 13:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saurav Sengupta 2012-09-09 11:41:54 UTC
While or after installing or removing packages with Muon, if the laptop is on AC power, the screen randomly turns off. This happens even if KDE Power Management is enabled and the system is configured NOT to turn off anything while on AC power. The issue occurs only while managing packages with Muon, and never otherwise. The result of xset -q after such an incident shows that DPMS is on and the time-out for screen power is always random, ranging from around 1 second to 600 seconds or more. Issuing xset -dpms resolves the issue for that session. Occasionally, though, the problem does not occur, or the time-out gets set so high that the screen does not turn off in ordinary use.

Reproducible: Sometimes

Steps to Reproduce:
1. Configure KDE Power Management to prevent anything turning off while on AC power.
2. Run the laptop on AC power and install or remove one or more packages with Muon.
3. Wait for a few minutes or check the result of xset -q to verify that the screen eventually turns off.
Actual Results:  
The screen turns off after the time-out period shown in the result of the xset -q command.

Expected Results:  
The settings in KDE Power Management should have been honoured and should have overridden the hardware DPMS settings.

I have observed this only on Kubuntu 12.04 with both KDE SC 4.8 and 4.9, using the x86_64 kernel. I am not aware whether this occurs on other systems as well.
Comment 1 Saurav Sengupta 2012-09-09 11:46:02 UTC
Since this bug tracker does not allow editing the description, I am adding a comment. I have experienced the problem only while using Muon Package Manager. I cannot vouch for its occurring with Muon Software Center because I rarely use that.
Comment 2 Jonathan Thomas 2012-09-09 15:09:20 UTC
When downloading/installing packages, Muon tells KDE's power management system to not let the system sleep or turn off. (KDE's hardware management library Solid has a function specifically to do this) This must be a bug with Solid where inhibiting sleep does weird things with the screen power settings.
Comment 3 Saurav Sengupta 2012-09-09 16:37:54 UTC
(In reply to comment #2)
> When downloading/installing packages, Muon tells KDE's power management
> system to not let the system sleep or turn off. (KDE's hardware management
> library Solid has a function specifically to do this) This must be a bug
> with Solid where inhibiting sleep does weird things with the screen power
> settings.

If so, I would also like to inform that inconsistent behaviour of the power management system does not occur with any other power management inhibition program such as Dragon Player when it plays a video and inhibits power management.
Comment 4 Jonathan Thomas 2012-09-09 17:37:54 UTC
Well I don't know what to tell you. Muon runs two lines of code. One line for when it starts suppressing sleep:

m_powerInhibitor = Solid::PowerManagement::beginSuppressingSleep(i18nc("@info:status", "Muon is making system changes"));

and one for stopping:
Solid::PowerManagement::stopSuppressingSleep(m_powerInhibitor);

Solid literally does *all* of the work, and Muon doesn't touch anything powermanagement-related otherwise.
Comment 5 Saurav Sengupta 2012-09-10 04:21:58 UTC
That is strange indeed. I think comparing with Dragon's code might help.
Comment 6 Saurav Sengupta 2012-09-10 05:35:11 UTC
Or maybe stopSuppressingSleep() isn't working as it should? Is m_powerinhibitor becoming invalid or something? Has the return value of stopSuppressingSleep() been checked?
Comment 7 S. Christian Collins 2012-09-23 15:17:53 UTC
I can confirm this bug on my system using both the Muon Package Manager and the Muon Update Manager.  Here is the relevant output from xset -q before running Muon:

DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Disabled

...and after running Muon:

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

This is happening on Kubuntu 12.04 using KDE 4.9.1.

** My System **
OS: Kubuntu 12.04 amd64 w/ KDE SC 4.9.1
PC: HP Pavilion m6-1035dx
CPU/GPU: AMD A10-4600M APU with Radeon(tm) HD Graphics
RAM: 6GB DDR3 800 MHz
Linux Kernel: 3.2.0-31-generic
Screen Resolution: 1366 x 768
Comment 8 S. Christian Collins 2012-10-18 19:50:39 UTC
This seems to be related to bug #295164.  Comment #10 in that bug suggests that there is a fix for this forthcoming.
Comment 9 Oliver Henshaw 2013-02-07 13:12:56 UTC

*** This bug has been marked as a duplicate of bug 295164 ***