After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614207 - Dims the screen when not on the active VT
Dims the screen when not on the active VT
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-03-28 23:48 UTC by Chris Coulson
Modified: 2010-03-30 23:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Only-dim-the-screen-on-idle-when-on-the-active-conso.patch (2.20 KB, patch)
2010-03-28 23:48 UTC, Chris Coulson
none Details | Review

Description Chris Coulson 2010-03-28 23:48:06 UTC
Created attachment 157338 [details] [review]
0001-Only-dim-the-screen-on-idle-when-on-the-active-conso.patch

I tried logging in a second user on my laptop yesterday, and noticed that the screen dimmed immediately (I was on battery). After a little bit of debugging, I realised that it was g-p-m running in the inactive session which was doing this, because the session was idle.

(Note that my hardware is being dimmed via xrandr)

Now, I'm not sure whether the Xorg instance running on the inactive VT should be able to dim the screen or not, but I've attached a simple patch for g-p-m which checks if it is on the active console before dimming the screen on idle
Comment 1 Richard Hughes 2010-03-29 07:51:04 UTC
Martin, does this look okay to you?
Comment 2 Martin Pitt 2010-03-29 09:09:35 UTC
It means that we now have two connections to CK. It might be more elegant to disable the idle/background hooks entirely from the manager if we lose the active console (this might also save a few wakeups), but due to the current code structure this would be much harder to do.

Logic-wise this patch looks fine to me, thanks Chris!
Comment 3 Chris Coulson 2010-03-29 09:19:14 UTC
I'm wondering if it would be more appropriate for EggConsolekit to be a singleton? That would avoid the 2 connections then.
Comment 4 Richard Hughes 2010-03-29 09:53:35 UTC
(In reply to comment #3)
> I'm wondering if it would be more appropriate for EggConsolekit to be a
> singleton? That would avoid the 2 connections then.

Yes, this makes a lot of sense.
Comment 5 Chris Coulson 2010-03-30 23:07:50 UTC
I've committed this now as commit 34f5a18