Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295227 - gnome-extra/gnome-screensaver-2.26.1 doesn't detect "idle" situation, no display dim
Summary: gnome-extra/gnome-screensaver-2.26.1 doesn't detect "idle" situation, no disp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on: 314899
Blocks:
  Show dependency tree
 
Reported: 2009-11-30 18:12 UTC by Vitus Jensen
Modified: 2010-05-07 10:45 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge.info,4.01 KB, text/plain)
2009-11-30 18:20 UTC, Vitus Jensen
Details
09_remove_session_inhibitors.patch (09_remove_session_inhibitors.patch,3.31 KB, patch)
2010-01-04 11:25 UTC, Pacho Ramos
Details | Diff
diff of /etc/portage/ tree (gnome-session-28.diff,1.22 KB, text/plain)
2010-01-20 00:30 UTC, Vitus Jensen
Details
diff of /etc/portage/ tree (gnome-power-manager-2.26.diff,647 bytes, text/plain)
2010-01-23 13:55 UTC, Vitus Jensen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitus Jensen 2009-11-30 18:12:41 UTC
When running gnome-extra/gnome-screensaver-2.26.1 the situation "user inactive for some time" isn't reported to DBus.  Which leads to gnome-power-manager not getting notified, not dimming the display and therefore excessive power consumption.

Downgrading gnome-screensaver to 2.24.1-r1 fixes it, now the following message can be seen on dbus-monitor:

signal sender=:1.349 -> dest=(null destination) path=/org/gnome/ScreenSaver; interface=org.gnome.ScreenSaver; member=SessionPowerManagementIdleChanged
   boolean true
signal sender=:1.349 -> dest=(null destination) path=/org/gnome/ScreenSaver; interface=org.gnome.ScreenSaver; member=SessionPowerManagementIdleChanged
   boolean false


Reproducible: Always

Steps to Reproduce:
1. configure "dim display on idle" via gnome-power-preferences
2. wait


Actual Results:  
display brightness keeps the same, after configured time screensaver shows animations (if selected)

Expected Results:  
Display brightness should get reduced after ~30 seconds.
Comment 1 Vitus Jensen 2009-11-30 18:20:34 UTC
Created attachment 211613 [details]
emerge --info output

Thinkpad R51e, x11-base/xorg-server-1.6.3.901-r2, x11-drivers/xf86-video-ati-6.12.4
Comment 2 Vitus Jensen 2009-12-09 22:57:52 UTC
Updating gnome-extra/gnome-screensaver to 2.28.0 does not solve this issue, there are still no SessionPowerManagementIdleChanged signals.  And therefore no automatic dimming.  I've read in https://bugzilla.gnome.org/show_bug.cgi?id=588068#c6 that SessionPowerManagementIdleChanged was removed on purpose but fail to see how idle detection should be done nowerdays.  On who is to blame that it isn't done any more.


BTW: unfortunately gnome-base/gnome-2.26.3 (the newest stable version) requires >=gnome-extra/gnome-screensaver-2.26.1, so keeping 2.24.1-r1 needs some extra work. But that older version works, so perhaps this 2.26.1 requirement could be lifted?
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-12-09 23:04:43 UTC
(In reply to comment #2)
> Updating gnome-extra/gnome-screensaver to 2.28.0 does not solve this issue,
> there are still no SessionPowerManagementIdleChanged signals.  And therefore no
> automatic dimming.  I've read in
> https://bugzilla.gnome.org/show_bug.cgi?id=588068#c6 that
> SessionPowerManagementIdleChanged was removed on purpose but fail to see how
> idle detection should be done nowerdays.  On who is to blame that it isn't done
> any more.

nowadays, it's mix between gnome-power-manager and gnome-session afaik
> 
> BTW: unfortunately gnome-base/gnome-2.26.3 (the newest stable version) requires
> >=gnome-extra/gnome-screensaver-2.26.1, so keeping 2.24.1-r1 needs some extra
> work. But that older version works, so perhaps this 2.26.1 requirement could be
> lifted?

certainly not. nothing forces you to use the meta ebuild once you installed your system. It's purpose is to ease initial installation of gnome, and reflects what upstream considers to gnome version X of the desktop. We sometimes make some arrangements to that but only from really broken things like session stuff in 2.22. If you want a 2.26 ebuild with the dependency fixed, you can probably copy it to a local overlay and forget about it, or maybe add gnome-screensaver-2.26 to packages.provided would work. Anyway, 2.26 worked just fine for me with my r200 before moving to 2.28 so we must be missing something obvious to help you.

What version of gnome-session do you have btw ?
Comment 4 Vitus Jensen 2009-12-11 16:39:20 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Updating gnome-extra/gnome-screensaver to 2.28.0 does not solve this issue,
> > there are still no SessionPowerManagementIdleChanged signals.  And therefore no
> > automatic dimming.  I've read in
> > https://bugzilla.gnome.org/show_bug.cgi?id=588068#c6 that
> > SessionPowerManagementIdleChanged was removed on purpose but fail to see how
> > idle detection should be done nowerdays.  On who is to blame that it isn't done
> > any more.
> 
> nowadays, it's mix between gnome-power-manager and gnome-session afaik

Hmmm, running dbus-monitor without any arguments doesn't show any related signals from gnome-session.

> > BTW: unfortunately gnome-base/gnome-2.26.3 (the newest stable version) requires
> > >=gnome-extra/gnome-screensaver-2.26.1, so keeping 2.24.1-r1 needs some extra
> > work. But that older version works, so perhaps this 2.26.1 requirement could be
> > lifted?
> 
> certainly not. nothing forces you to use the meta ebuild once you installed
> your system.
...

Oh!  Sorry, forgot that it is just a meta package.

> What version of gnome-session do you have btw ?

2.26.2
The latest stable.  I'm running stable as long as possible.
Comment 5 Bryan Green 2009-12-18 17:33:46 UTC
I seeing essentially the same problem with gnome-screensaver-2.26.1, except the problem is with gnome-screensaver *sometimes* not activating after the idle period.  It is unreliable, seemingly random, and a security issue because the screen does not lock after an idle period as its supposed to.  The problem seems to have been reported on Ubuntu as well: https://launchpad.net/bugs/411350
Another Gentoo bug mentions the problem parenthetically: http://bugs.gentoo.org/show_bug.cgi?id=288706

I've tried debugging with dbus-monitor and gnome-screensaver --debug, but there is no output from those when the idle time has elapsed with no screensaver activation.

Comment 7 Vitus Jensen 2009-12-30 16:23:46 UTC
(In reply to comment #6)
> Related to the following blog posts?

Not related.

There is no fault related to switching display off (or animations on) after several minutes.  The bug is that the display isn't dimmed until that time!

Comment 8 Pacho Ramos gentoo-dev 2010-01-04 11:21:19 UTC
(In reply to comment #5)
> I seeing essentially the same problem with gnome-screensaver-2.26.1, except the
> problem is with gnome-screensaver *sometimes* not activating after the idle
> period.  It is unreliable, seemingly random, and a security issue because the
> screen does not lock after an idle period as its supposed to. 

Yeah, I also get that "random" problem, but I have failed to know where is the fault :-(
Comment 9 Pacho Ramos gentoo-dev 2010-01-04 11:25:33 UTC
Created attachment 215152 [details, diff]
09_remove_session_inhibitors.patch

This patch used used for 2.28 under ubuntu for trying to fix this:
https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/411350/comments/79

It is from the following upstream commit:
http://git.gnome.org/browse/gnome-screensaver/commit/?id=284c9924969a49dbf2d5fae1d680d3310c4df4a3

Can you try it?
Comment 10 Pacho Ramos gentoo-dev 2010-01-11 12:33:52 UTC
(In reply to comment #9)
> It is from the following upstream commit:
> http://git.gnome.org/browse/gnome-screensaver/commit/?id=284c9924969a49dbf2d5fae1d680d3310c4df4a3
> 
> Can you try it?
> 

Upstream commit solves the issue for me on 2.26, can other people try?
Comment 11 Pacho Ramos gentoo-dev 2010-01-14 20:44:46 UTC
I am going to commit:
http://git.gnome.org/browse/gnome-screensaver/commit/?id=284c9924969a49dbf2d5fae1d680d3310c4df4a3

in some days (when I have time) if nobody disagrees because:
1. It fixes the bug I was suffering since 2.26 update regarding to gnome-screensaver randomly stopping from locking my screen
2. It's an accepted upstream patch already commited to 2.28 branch (then, if gnome-screensaver-2.28.1 is released some day, it would include it) and to trunk. Also works for me on 2.26

Comment 12 Pacho Ramos gentoo-dev 2010-01-16 21:56:27 UTC
(In reply to comment #11)
> I am going to commit:
> http://git.gnome.org/browse/gnome-screensaver/commit/?id=284c9924969a49dbf2d5fae1d680d3310c4df4a3
> 

commited to 2.26.1-r1 and 2.28.0-r1, but I leave this bug opened since I am unsure it's the same bug originally reported by Vitus, but, at least, it fixes locking not working randomly :-)

Should be safe drop the patch with gnome-screensaver >=2.28.1 as was commited to 2.28 branch and trunk
Comment 13 Vitus Jensen 2010-01-17 19:09:25 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > I am going to commit:
> > http://git.gnome.org/browse/gnome-screensaver/commit/?id=284c9924969a49dbf2d5fae1d680d3310c4df4a3
> > 
> 
> commited to 2.26.1-r1 and 2.28.0-r1, but I leave this bug opened since I am
> unsure it's the same bug originally reported by Vitus, but, at least, it fixes
> locking not working randomly :-)

I can't comment on the non-locking bug as I never noticed that.  But I can comment on the non-dimming bug: it's still there in 2.26.1.  Not unexpected as the fix was related to some programs keeping the screensaver from acting at all.

So installing g-ss 2.26.1 shows the same behaviour as any 2.26 or 2.28:
- stop typing
- nothing happens (no dimming, no message in dbus-monitor)
- after 6 minutes the screensaver blanks the screen

Does anybody see automatic screendimming with 2.26.x or 2.28.x?
Comment 14 Pacho Ramos gentoo-dev 2010-01-17 19:52:41 UTC
(In reply to comment #13)
> I can't comment on the non-locking bug as I never noticed that.  But I can
> comment on the non-dimming bug: it's still there in 2.26.1.  Not unexpected as
> the fix was related to some programs keeping the screensaver from acting at
> all.
> 
> So installing g-ss 2.26.1 shows the same behaviour as any 2.26 or 2.28:
> - stop typing
> - nothing happens (no dimming, no message in dbus-monitor)
> - after 6 minutes the screensaver blanks the screen
> 
> Does anybody see automatic screendimming with 2.26.x or 2.28.x?
> 

I think that this is "expected" since new gnome-screensaver is not supposed to report SessionPowerManagementIdleChanged, it should be reported by gnome-session instead and, of course, gnome-power-manager needs to use info from gnome-session instead of gnome-screensaver.

After reading gnome-power-manager changelog:
http://git.gnome.org/browse/gnome-power-manager/plain/ChangeLog?h=gnome-2-26

I found the following:
2009-01-27  Richard Hughes  <richard@hughsie.com>

	* src/gpm-screensaver.c: (gpm_screensaver_proxy_connect_more),
	(gpm_screensaver_class_init):
	* src/gpm-screensaver.h:
	gnome-screensaver no longer sends the SessionIdleChanged or
	SessionPowerManagementIdleChanged signals. We'll have to change the way
	we get idle information from gnome-session.

2009-01-28  Richard Hughes  <richard@hughsie.com>

	* src/gpm-common.h:
	* src/gpm-prefs-core.c: (gpm_prefs_sleep_slider_changed_cb),
	(gpm_prefs_setup_sleep_slider), (set_idle_hscale_stops),
	(prefs_setup_ac), (prefs_setup_battery), (prefs_setup_ups),
	(gpm_prefs_init), (gpm_prefs_finalize):
	* src/gpm-screensaver.c: (gpm_screensaver_init):
	* src/gpm-screensaver.h:
	Don't rely on the gnome-screensaver idle key now we are using
	gnome-session.

Then, in theory, it should work with gnome-power-manager-2.26 (and 2.28)
Comment 15 Vitus Jensen 2010-01-20 00:28:58 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > So installing g-ss 2.26.1 shows the same behaviour as any 2.26 or 2.28:
> > - stop typing
> > - nothing happens (no dimming, no message in dbus-monitor)
> > - after 6 minutes the screensaver blanks the screen
> > 
> > Does anybody see automatic screendimming with 2.26.x or 2.28.x?
> > 
> 
> I think that this is "expected" since new gnome-screensaver is not supposed to
> report SessionPowerManagementIdleChanged, it should be reported by
> gnome-session instead and, of course, gnome-power-manager needs to use info
> from gnome-session instead of gnome-screensaver.
...
> Then, in theory, it should work with gnome-power-manager-2.26 (and 2.28)

I have tested this with gnome-session-2.28, gnome-power-manager-2.28.2 and gnome-screensaver-2.28.0-r1: it works.  Kind of.  Display is dimmed after 1-2 minutes but as that setup is unable to detect that this is a laptop (no on-battery setup, gnome-pm doesn't change it's icon on battery) it's not really usable.

dbus-monitor shows
signal sender=:1.18 -> dest=(null destination) path=/org/gnome/PowerManager/Backlight; interface=org.gnome.PowerManager.Backlight; member=BrightnessChanged
   uint32 13
signal sender=:1.18 -> dest=(null destination) path=/org/gnome/PowerManager/Backlight; interface=org.gnome.PowerManager.Backlight; member=BrightnessChanged
   uint32 64

I think gnome-session-2.28 should require gnome-pm-2.28 (or perhaps 2.26), 2.22 didn't work.  And gnome-ss-2.26 should probably require gnome-session-2.28 as dimming won't work with gnome-session-2.26.  Or perhaps it's related to some USE flags?  devicekit is a requirement of gnome-session-2.28.  This whole stuff sounds kind of messy.

Comment 16 Vitus Jensen 2010-01-20 00:30:08 UTC
Created attachment 216954 [details]
diff of /etc/portage/ tree

If someone want's to test, the attached changes to a stable system were required to get gnome-session-2.28.
Comment 17 Pacho Ramos gentoo-dev 2010-01-20 18:43:01 UTC
Why didn't you try to install 2.26 stuff instead? It should require less changes and updates on a stable system :-)
Comment 18 Vitus Jensen 2010-01-23 13:40:49 UTC
(In reply to comment #17)
> Why didn't you try to install 2.26 stuff instead? It should require less
> changes and updates on a stable system :-)

Because comment #14 sounds as if gnome-session should provide the idle flag (via dbus: wrong assumption).  And as gnome-session-2.26 already is stable I went for the next version, 2.28.


> signal sender=:1.18 -> dest=(null destination)
> path=/org/gnome/PowerManager/Backlight;
> interface=org.gnome.PowerManager.Backlight; member=BrightnessChanged
>    uint32 13

I now assume this signal is given by gnome-power-manager and g-p-m gets idle directly from gnome-session without dbus involved.  Correct?
Comment 19 Vitus Jensen 2010-01-23 13:55:24 UTC
Created attachment 217242 [details]
diff of /etc/portage/ tree

Changes to portage configuration to allow gnome-power-manager-2.26 on stable systems.

This fixes the idle problem.  So gnome-screensaver-2.26 should depend on gnome-power-manager-2.26.
Comment 20 Pacho Ramos gentoo-dev 2010-01-23 14:12:00 UTC
(In reply to comment #19)
> Created an attachment (id=217242) [details]
> diff of /etc/portage/ tree
> 
> Changes to portage configuration to allow gnome-power-manager-2.26 on stable
> systems.
> 
> This fixes the idle problem.  So gnome-screensaver-2.26 should depend on
> gnome-power-manager-2.26.
> 

This is what I expected, now, we need to know why gnome-power-manager-2.26 couldn't go to stable yet (probably due bug 280944 )
Comment 21 Vitus Jensen 2010-01-23 16:37:49 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > Created an attachment (id=217242) [details] [details]
> > diff of /etc/portage/ tree
> > 
> > Changes to portage configuration to allow gnome-power-manager-2.26 on stable
> > systems.
> > 
> > This fixes the idle problem.  So gnome-screensaver-2.26 should depend on
> > gnome-power-manager-2.26.
> > 
> 
> This is what I expected, now, we need to know why gnome-power-manager-2.26
> couldn't go to stable yet (probably due bug 280944 )

Perhaps.  But even if gnome-power-manager-2.26 would go stable, it depends on devicekit which isn't stable either.

This leads to the question why gnome-screensaver-2.26 did go to stable, the ChangeLog mentions "New version for GNOME 2.26. Get idle time from xorg and idle detection from gnome-session.".  Very confusing as at least now not correct (see gnome-power-manager).
Comment 22 waynedpj 2010-01-25 19:54:47 UTC
can confirm that with current stable gnome-screensaver, gnome-power-manager, etc, no dimming of screen when idle.  however, screensaver does start after specified time.  also, screen sleeping does not power off screen, simply blanks the display with the backlight still on.  can confirm that setting brightness via panel applet, /sys, and function keys work fine.

running stable Gentoo on system76 Darter Ultra 3 (i.e. Clevo M722T).

thanks.
Comment 23 Vitus Jensen 2010-01-28 18:17:13 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > (In reply to comment #19)
> > > Created an attachment (id=217242) [details] [details] [details]
> > > diff of /etc/portage/ tree
> > > 
> > > Changes to portage configuration to allow gnome-power-manager-2.26 on stable
> > > systems.
> > > 
> > > This fixes the idle problem.  So gnome-screensaver-2.26 should depend on
> > > gnome-power-manager-2.26.
> > > 
> > 
> > This is what I expected, now, we need to know why gnome-power-manager-2.26
> > couldn't go to stable yet (probably due bug 280944 )
> 
> Perhaps.  But even if gnome-power-manager-2.26 would go stable, it depends on
> devicekit which isn't stable either.
...

And devicekit or g-p-m shouldn't go stable because that combination doesn't always display battery-related settings in gnome-power-preferences and sometimes suspends the machine without reason (reads wrong battery level?).  Best to remain at 2.24 for both gnome-power-manager and gnome-screensaver.  Unfortunately someone removed the later version from the repository, so better grab it while it's on your disk.
Comment 24 Pacho Ramos gentoo-dev 2010-01-28 19:06:45 UTC
(In reply to comment #23)
> And devicekit or g-p-m shouldn't go stable because that combination doesn't
> always display battery-related settings in gnome-power-preferences and
> sometimes suspends the machine without reason (reads wrong battery level?). 
> Best to remain at 2.24 for both gnome-power-manager and gnome-screensaver. 
> Unfortunately someone removed the later version from the repository, so better
> grab it while it's on your disk.
> 

The best is to try to fix these bugs if possible, since we won't be able to stay with 2.24 forever. Are all those problems already reported (with a separate bug report for each problem) ? If you have the ability to check on a "testing" system, would be also nice to know if these problems are fixed with 2.28...

Thanks a lot
Comment 25 waynedpj 2010-03-12 16:00:51 UTC
update: upgrading gnome-power-manager to 2.26.4 helped the dimming situation at least.  had to unmaks devicekit-003 to install it.
Comment 26 Pacho Ramos gentoo-dev 2010-04-14 16:40:50 UTC
Gnome 2.28 stabilization should fix this since it will raise all involved stuff to the same version again
Comment 27 Pacho Ramos gentoo-dev 2010-05-07 10:45:00 UTC
2.28 is already going to stable and I confirm it solved all this mess