GNOME Bugzilla – Bug 52063
xset/xscreensaver race condition
Last modified: 2004-12-22 21:47:04 UTC
Package: control-center Version: 1.2.4 Severity: normal >Originator: Christian Marillat >Organization: net >Synopsis: >Class: >Gnome-Libs-Release: gnome-libs-1.2.12 >Environment: System: Linux falcon.wanadoo.fr 2.4.2 #1 sam fév 24 22:44:49 CET 2001 i686 unknown Architecture: i686 Distribution: Debian Version: testing/unstable >Description: Hi, There appears to be a race condition between invoking xset and xscreensaver in the screensaver-properties-capplet. Upon startup, xscreensaver seems to reset a bunch of display stuff, including the DPMS state of the X blanker (which is what I noticed). This seems to be a new behavior in version 3.28. From the xscreensaver changelog: * Redid the creensaver Options' part of the control panel; xscreensaver now lets you configure your DPMS settings. For example: penumbra% xscreensaver-command -exit penumbra% /usr/bin/X11/xset +dpms penumbra% /usr/bin/X11/xset q | grep -i dpms DPMS (Energy Star): DPMS is Enabled penumbra% xscreensaver -no-splash -timeout 1 -nice 6 & penumbra% /usr/bin/X11/xset q | grep -i dpms DPMS (Energy Star): DPMS is Disabled screensaver-properties-capplet is running both xscreensaver and xset, but the latter's actions are getting overridden by xscreensaver. To test this, I replaced xset with the following crude script, which essentially calls the real xset, then repeatedly queries it to determine the current state of DPMS. ============================================================= #!/usr/bin/perl use strict; open OUT, ">>/tmp/xset.log" or die; print OUT "@ARGV ... "; if ( system('/usr/bin/X11/xset-real', @ARGV) ) { print OUT "error\n"; exit 1; } else { print OUT "ok\n"; } my $response; my $i = 0; my $flip = 0; while ( $i++ < 100 && $flip < 2) { local $_ = /usr/bin/X11/xset-real q | grep -i dpms; my $new_response = /Disabled/ ? 'Disabled' : 'Enabled'; if ( $new_response ne $response ) { my $date = ate; chomp $date; print STDERR ("$date: $new_response\n"); $response = $new_response; $flip++; } } ================================================================= Here's what I get when I run screensaver-properties-capplet and set DPMS to on ----------------------------------------------------- penumbra% screensaver-properties-capplet Sun Feb 11 10:57:32 EST 2001: Enabled Sun Feb 11 10:57:32 EST 2001: Disabled ----------------------------------------------------- For some reason the DPMS is being disabled, but *not* by another call to xset; the script produces a log file which indicates that only one call to xset was made. If I replace /usr/bin/X11/xscreensaver by the following script: ================================================================= #!/bin/sh echo xscreensaver "$@" ================================================================= I get this: ----------------------------------------------------- penumbra% screensaver-properties-capplet xscreensaver -no-splash -timeout 1 -nice 6 Sun Feb 11 11:00:51 EST 2001: Enabled penumbra% ----------------------------------------------------- So, no xscreensaver, no DPMS disable. If I put the original xscreensaver back, and add a 5 second sleep to the xset script, I get the following behavior: ----------------------------------------------------- penumbra% screensaver-properties-capplet Sun Feb 11 11:04:24 EST 2001: Enabled penumbra% ----------------------------------------------------- So, if xset waits long enough, things work. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-03-13 11:16 ------- Unknown version 1.2.x in product control-center. Setting version to the default, "unspecified". The original reporter (marillat.christian@wanadoo.fr) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, control-center-maint@bugzilla.gnome.org.
*** This bug has been marked as a duplicate of 53989 ***
Fixed in which release ? Christian