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 355279 - Gnome-screensaver doesn't display screensaver
Gnome-screensaver doesn't display screensaver
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: general
2.16.x
Other Linux
: Normal major
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
: 376172 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-10 13:04 UTC by Alex Smith
Modified: 2006-12-28 14:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
output from strace `pidof gnome-screensaver` (87.28 KB, application/x-gzip)
2006-10-20 08:00 UTC, Serge Gavrilov
  Details
g-p-m verbose output (2.93 KB, text/plain)
2006-10-20 19:49 UTC, Joe Marcus Clarke
  Details
test patch (997 bytes, patch)
2006-11-06 19:03 UTC, Richard Hughes
none Details | Review

Description Alex Smith 2006-09-10 13:04:33 UTC
I'm using Gnome 2.16 on Frugalware Linux, and I've selected a screensaver in the preferences. The preview and fullscreen previews display OK, but when the screensaver activates or I press Lock Screen, all I get is a blank screen. The screen still gets locked, just the screensaver doesn't show. The really interesting thing, however, is that if I kill the gnome-screensaver daemon and restart it, the screensaver then displays how it should. I'm reporting this as a bug because I can't find any problems on my machine that could cause this, and also it happens on one of the other Frugalware developers' computer on a fresh install.

Any ideas? Thanks, Alex
Comment 1 William Jon McCann 2006-09-15 16:39:58 UTC
Can you run it with debug logging:
gnome-screensaver --no-daemon --debug

and post the output here?

Thanks.
Comment 2 Alex Smith 2006-09-15 18:16:31 UTC
It won't get anything useful. As I said, if I kill the daemon and restart it (be it with --no-daemon --debug, or without any args) it works fine.
Comment 3 Alex Smith 2006-09-15 18:19:46 UTC
If it does make any difference even if the output is of when gnome-screensaver is working how it should, it's here: http://frugalware.org/paste/71
Comment 4 William Jon McCann 2006-09-15 18:24:04 UTC
If you reproduce it with debugging enabled then we can see if it is throttled.  You can do this by modifying how your distro starts g-s.  By default that is in gnome-settings-daemon.

You can also try checking whether gnome-power-manager thinks the lid is closed or something.  Try running g-p-m:
gnome-power-manager --no-daemon --verbose
Comment 5 William Jon McCann 2006-09-15 18:28:32 UTC
Sorry I should have mentioned that if you add --debug to where gnome-screensaver is started in g-s-d and it will log debug messages to a file in /tmp.
Comment 6 Alex Smith 2006-09-15 20:16:37 UTC
http://frugalware.org/~alex/gscreensaver.log

That log contains 2 attempts to Lock the screen.
Comment 7 William Jon McCann 2006-09-15 20:18:34 UTC
Excellent.  But I don't seem to have read permission on that.
Comment 8 Alex Smith 2006-09-15 20:20:55 UTC
Uhhh.... Oops :)

Fixed.
Comment 9 Serge Gavrilov 2006-10-20 07:54:03 UTC
I confirm the bug. It can be reproduced winth Gnome 2.16, Gentoo. When I start
gnome-screensaver it work well. But after several hours I found gnome-screensaver only showing black screen. After restarting daemon everiting is OK for some time.
I attach the output of 

strace -p `pidof gnome-screensaver`

which corresponds to the instant when I invoked

gnome-screensaver-command -a

(and saw black screen instead of screensaver). I use random mode and I have ported 
xscreensaver savers to be used with gnome-screensaver. It seems that time 
gnome-screensaver accessed /usr/libexec/gnome-screensaver/bsod, but it did not start it. 
Comment 10 Serge Gavrilov 2006-10-20 08:00:30 UTC
Created attachment 75055 [details]
output from strace `pidof gnome-screensaver`
Comment 11 Joe Marcus Clarke 2006-10-20 19:00:57 UTC
I have confirmed the same behavior on FreeBSD, and it does appear to be related to gnome-power-manager.  If I restart gnome-power-manager once I start seeing the behavior, then g-s works as expected.  Note: this is on a desktop machine, so g-p-m shouldn't think the lid is closed.

I have started running g-p-m in debugging mode to see if I can find out why it is not behaving correctly.  The problem seems to start after the first time g-p-m puts the display to sleep, so I should have some results soon.
Comment 12 Joe Marcus Clarke 2006-10-20 19:49:05 UTC
Created attachment 75096 [details]
g-p-m verbose output

This is the g-p-m output after g-s goes idle and locks the screen.  g-p-m enables DPMS one minute later, and puts the display to sleep.  After this occurs, future requests to g-s to lock the screen result in a blank screen.  Restarting g-p-m or g-s fixes the problem.

It seems like g-s is not resetting state correctly.
Comment 13 William Jon McCann 2006-11-06 15:51:32 UTC
Looks to me like g-p-m is adding 3 throttlers and only removing one.  Richard?
Comment 14 Richard Hughes 2006-11-06 19:03:12 UTC
Created attachment 76106 [details] [review]
test patch

You are indeed right - this is a g-p-m bug. Does appling this patch to 2-16 fix things?
Comment 15 Stu Hood 2006-11-06 19:12:24 UTC
(In reply to comment #11)
> Note: this is on a desktop machine, so g-p-m shouldn't think the lid is closed.

Yea, it shouldn't be able to throttle three times unless one of them is related to the lid.

Can you attached the output of `lshal -m` during this process? We're looking for a stray/imaginary button press that might have activated the lid throttling.
Comment 16 Joe Marcus Clarke 2006-11-06 23:21:53 UTC
I can confirm the the above patch does apply to 2.16, and so far, the problem has not reoccurred.
Comment 17 Richard Hughes 2006-11-07 19:46:09 UTC
Thanks for testing that so fast Joe.

Applied to 2-16:

2006-11-07  Richard Hughes <richard@hughsie.com>

	* src/gpm-manager.c: (update_dpms_throttle):
	When we add a DPMS state throttle, remove the last one if set.
	This fixes the bug where the screensaver would not show if
	DPMS had been allowed to activate. Fixes #355279.

Please re-open this bug if this happens with the patch.

Cheers for the debugging Jon - nice one.

Richard.
Comment 18 Alex Smith 2006-11-08 07:07:51 UTC
Any chance of being applied to 2.17.x?
Comment 19 Richard Hughes 2006-11-08 08:41:02 UTC
Done yesterday. Thanks.
Comment 20 Sam Morris 2006-11-18 16:48:11 UTC
Could someone please confirm or deny whether this bug affects g-p-m 2.14? AFAIR, gnome-screensaver stopped displaying its screen savers when I upgraded to GNOME 2.16, but I'm not 100% sure, and don't have any way to downgrade at the moment to test it out. I tried in VMware, but it appears that VMware does not emulate DPMS, so I can't get g-p-m to put the screen into standby.
Comment 21 Alex Smith 2006-11-18 17:15:40 UTC
I can confirm that it does not affect it, this bug was definitely introduced in 2.16, I've got an old box running 2.14 and the screensaver works there.
Comment 22 William Jon McCann 2006-11-20 21:11:13 UTC
*** Bug 376172 has been marked as a duplicate of this bug. ***
Comment 23 Alex Smith 2006-12-28 13:36:03 UTC
Hmm, I hate to say it but I just noticed that this still occurs, even with the latest gnome-screensaver and g-p-m
Comment 24 Alex Smith 2006-12-28 14:16:06 UTC
Oh, I should also mention that it happens if I remove g-p-m, too.