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 52063 - xset/xscreensaver race condition
xset/xscreensaver race condition
Status: RESOLVED DUPLICATE of bug 53989
Product: gnome-control-center
Classification: Core
Component: [obsolete] screensaver
unspecified
Other other
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2001-03-13 16:15 UTC by marillat.christian
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description marillat.christian 2001-03-13 16:16:12 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.

Comment 1 Rachel Hestilow 2001-09-13 16:33:33 UTC
*** This bug has been marked as a duplicate of 53989 ***
Comment 2 Christian Marillat 2001-09-13 17:18:46 UTC
Fixed in which release ?

Christian