Bug 504912 - XScreensaver wrong behavior with Xrandr
XScreensaver wrong behavior with Xrandr
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: xscreensaver (Show other bugs)
11
All Linux
low Severity urgent
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-09 22:23 EDT by Paul Smith
Modified: 2009-06-15 22:41 EDT (History)
2 users (show)

See Also:
Fixed In Version: 5.08-10.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-15 22:41:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
My xsession-errors file (3.66 KB, text/plain)
2009-06-10 07:55 EDT, Paul Smith
no flags Details
My Xorg.0.log file (114.02 KB, text/plain)
2009-06-10 13:32 EDT, Paul Smith
no flags Details
Trial source (360 bytes, text/plain)
2009-06-10 14:15 EDT, Mamoru TASAKA
no flags Details
test-randr.c (in xscreensaver source) (11.30 KB, text/plain)
2009-06-10 17:16 EDT, Mamoru TASAKA
no flags Details
Screensaver preferences window (31.02 KB, image/png)
2009-06-11 07:15 EDT, Paul Smith
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Gentoo 249680 None None None Never

  None (edit)
Description Paul Smith 2009-06-09 22:23:17 EDT
When I try to activate the xscreensaver (from the screensaver window), I get the following error:

"The XScreenSaver daemon doesn't seem to be running
on display ":0.0".  Launch it now?"

and then, when I launch it, I get

"The xscreensaver daemon did not start up properly.

Please check your $PATH and permissions."

I am running XFCE.

Paul
Comment 1 Mamoru TASAKA 2009-06-10 00:59:07 EDT
CC-ing to Kevin. Kevin, are you seeing this problem?
(I have not tried yet).
Comment 2 Kevin Fenzi 2009-06-10 01:06:25 EDT
No, I don't. 

Note that Xfce will look for gnome-screensaver first, and start it if it's installed. 
If it's not then it will look for xscreensaver and start that. 

Paul: Is gnome-screensaver running? Do you see two 'screensaver' prefs in the menu? 
Does one open gnome-screensavers prefs and work?

Finally, any output in ~/.xsession-errors?
Comment 3 Paul Smith 2009-06-10 07:53:43 EDT
(In reply to comment #2)
> No, I don't. 
> 
> Note that Xfce will look for gnome-screensaver first, and start it if it's
> installed. 
> If it's not then it will look for xscreensaver and start that. 
> 
> Paul: Is gnome-screensaver running? Do you see two 'screensaver' prefs in the
> menu? 
> Does one open gnome-screensavers prefs and work?

Kevin: I did see two 'screensaver' prefs in the menu, but not now, after I removed gnome-screensavers.

> Finally, any output in ~/.xsession-errors?  

It is attached.

Paul
Comment 4 Paul Smith 2009-06-10 07:55:03 EDT
Created attachment 347209 [details]
My xsession-errors file
Comment 5 Mamoru TASAKA 2009-06-10 12:59:09 EDT
Well I guess Xrandr is not working properly on your machine.
Would you
- Try $ xscreensaver -verbose -sync ?
- And attach /etc/xorg.conf & /var/log/Xorg.0.log ?
Comment 6 Paul Smith 2009-06-10 13:28:11 EDT
(In reply to comment #5)
> Well I guess Xrandr is not working properly on your machine.
> Would you
> - Try $ xscreensaver -verbose -sync ?
> - And attach /etc/xorg.conf & /var/log/Xorg.0.log ?  

Thanks, Mamoru. I got the following:

$ xscreensaver -verbose -sync
xscreensaver 5.08, copyright (c) 1991-2008 by Jamie Zawinski <jwz@jwz.org>.
xscreensaver: 18:23:31: running as psmith/psmith (500/500)
xscreensaver: 18:23:31: in process 3470.

##############################################################################

xscreensaver: 18:23:31: X Error!  PLEASE REPORT THIS BUG.

##############################################################################

X Error of failed request:  166
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  20 ()
  Serial number of failed request:  73
  Current serial number in output stream:  73

xscreensaver: 18:23:31: dumping core (because of synchronous X Error)
xscreensaver: 18:23:31: see http://www.jwz.org/xscreensaver/bugs.html
			for bug reporting information.

xscreensaver: 18:23:31: current directory is /home/psmith
xscreensaver: 18:23:31: running as psmith/psmith (500/500)
Aborted
$ 

Paul
Comment 7 Paul Smith 2009-06-10 13:32:02 EDT
Created attachment 347260 [details]
My Xorg.0.log file
Comment 8 Paul Smith 2009-06-10 13:33:33 EDT
Mamoru,

I do not have the file

/etc/xorg.conf

Paul
Comment 9 Mamoru TASAKA 2009-06-10 13:52:33 EDT
Sorry, /etc/X11/xorg.conf
Comment 10 Paul Smith 2009-06-10 13:59:49 EDT
(In reply to comment #9)
> Sorry, /etc/X11/xorg.conf  

No xorg.conf, Mamoru:

# updatedb
# dir /etc/X11/xorg.conf
dir: cannot access /etc/X11/xorg.conf: No such file or directory
# locate xorg.conf
/usr/share/man/man5/xorg.conf.5.gz
# 

Paul
Comment 11 Mamoru TASAKA 2009-06-10 14:15:34 EDT
Created attachment 347270 [details]
Trial source

(In reply to comment #10)
> (In reply to comment #9)
> > Sorry, /etc/X11/xorg.conf  
> 
> No xorg.conf, Mamoru:

Okay.
Then would you try to compile/execute the attached C file
(with -lX11 -lXt)? From your xscreensaver output I guess
the attached program will fail with some way...
Comment 12 Paul Smith 2009-06-10 14:33:48 EDT
(In reply to comment #11)
> Created an attachment (id=347270) [details]
> Trial source
> 
> (In reply to comment #10)
> > (In reply to comment #9)
> > > Sorry, /etc/X11/xorg.conf  
> > 
> > No xorg.conf, Mamoru:
> 
> Okay.
> Then would you try to compile/execute the attached C file
> (with -lX11 -lXt)? From your xscreensaver output I guess
> the attached program will fail with some way...  

No compilation error, and when I run the generated executable:

$ ./lixo
Display: :0.0
$

Paul
Comment 13 Mamoru TASAKA 2009-06-10 14:42:35 EDT
Umm.....  then would you try from gdb ?
i.e.

# debuginfo-install xscreensaver
$ gdb xscreensaver
(gdb) run -sync -verbose
Comment 14 Paul Smith 2009-06-10 14:46:23 EDT
(In reply to comment #13)
> Umm.....  then would you try from gdb ?
> i.e.
> 
> # debuginfo-install xscreensaver
> $ gdb xscreensaver
> (gdb) run -sync -verbose  

Got the following:

(gdb) run -sync -verbose
Starting program: /usr/bin/xscreensaver -sync -verbose
xscreensaver 5.08, copyright (c) 1991-2008 by Jamie Zawinski <jwz@jwz.org>.
xscreensaver: 19:44:12: running as psmith/psmith (500/500)
xscreensaver: 19:44:12: in process 2990.

##############################################################################

xscreensaver: 19:44:13: X Error!  PLEASE REPORT THIS BUG.

##############################################################################

X Error of failed request:  166
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  20 ()
  Serial number of failed request:  73
  Current serial number in output stream:  73

xscreensaver: 19:44:13: dumping core (because of synchronous X Error)
xscreensaver: 19:44:13: see http://www.jwz.org/xscreensaver/bugs.html
			for bug reporting information.

xscreensaver: 19:44:13: current directory is /home/psmith
xscreensaver: 19:44:13: running as psmith/psmith (500/500)

Program received signal SIGABRT, Aborted.
0x00000035d20332f5 in raise () from /lib64/libc.so.6
(gdb) 

Paul
Comment 15 Mamoru TASAKA 2009-06-10 15:42:54 EDT
Please type
----------------------------
(gdb) where
----------------------------
then.
Comment 16 Paul Smith 2009-06-10 15:53:25 EDT
(In reply to comment #15)
> Please type
> ----------------------------
> (gdb) where
> ----------------------------
> then.  

Got the following:

(gdb) run -sync -verbose
Starting program: /usr/bin/xscreensaver -sync -verbose
xscreensaver 5.08, copyright (c) 1991-2008 by Jamie Zawinski <jwz@jwz.org>.
xscreensaver: 20:51:22: running as psmith/psmith (500/500)
xscreensaver: 20:51:22: in process 3625.

##############################################################################

xscreensaver: 20:51:23: X Error!  PLEASE REPORT THIS BUG.

##############################################################################

X Error of failed request:  166
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  20 ()
  Serial number of failed request:  73
  Current serial number in output stream:  73

xscreensaver: 20:51:23: dumping core (because of synchronous X Error)
xscreensaver: 20:51:23: see http://www.jwz.org/xscreensaver/bugs.html
			for bug reporting information.

xscreensaver: 20:51:23: current directory is /home/psmith
xscreensaver: 20:51:23: running as psmith/psmith (500/500)

Program received signal SIGABRT, Aborted.
0x00000035d20332f5 in raise () from /lib64/libc.so.6
(gdb) where
#0  0x00000035d20332f5 in raise () from /lib64/libc.so.6
#1  0x00000035d2034b20 in abort () from /lib64/libc.so.6
#2  0x000000000040a53b in sync ()
#3  0x00000000004071ea in sync ()
#4  0x00000035d38463c4 in _XError () from /usr/lib64/libX11.so.6
#5  0x00000035d384d126 in _XReply () from /usr/lib64/libX11.so.6
#6  0x00000035d8404211 in XRRGetCrtcInfo () from /usr/lib64/libXrandr.so.2
#7  0x000000000040cb69 in sync ()
#8  0x000000000040824b in sync ()
#9  0x00000035d201ea2d in __libc_start_main () from /lib64/libc.so.6
#10 0x0000000000405649 in sync ()
#11 0x00007fffffffe0d8 in ?? ()
#12 0x000000000000001c in ?? ()
#13 0x0000000000000003 in ?? ()
#14 0x00007fffffffe400 in ?? ()
#15 0x0000000000000000 in ?? ()
(gdb) 

Paul
Comment 17 Mamoru TASAKA 2009-06-10 16:11:48 EDT
Umm... did you actually try "debuginfo-install xscreensaver" as root
before trying to call "gdb xscreensaver" as normal user?
Comment 18 Paul Smith 2009-06-10 16:32:40 EDT
(In reply to comment #17)
> Umm... did you actually try "debuginfo-install xscreensaver" as root
> before trying to call "gdb xscreensaver" as normal user?  

Just did it:

(gdb) run -sync -verbose
Starting program: /usr/bin/xscreensaver -sync -verbose
xscreensaver 5.08, copyright (c) 1991-2008 by Jamie Zawinski <jwz@jwz.org>.
xscreensaver: 21:29:44: running as psmith/psmith (500/500)
xscreensaver: 21:29:44: in process 4079.

##############################################################################

xscreensaver: 21:29:44: X Error!  PLEASE REPORT THIS BUG.

##############################################################################

X Error of failed request:  166
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  20 ()
  Serial number of failed request:  73
  Current serial number in output stream:  73

xscreensaver: 21:29:44: dumping core (because of synchronous X Error)
xscreensaver: 21:29:44: see http://www.jwz.org/xscreensaver/bugs.html
			for bug reporting information.

xscreensaver: 21:29:44: current directory is /home/psmith
xscreensaver: 21:29:44: running as psmith/psmith (500/500)

Program received signal SIGABRT, Aborted.
0x00000035d20332f5 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Current language:  auto; currently minimal
(gdb) where
#0  0x00000035d20332f5 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00000035d2034b20 in *__GI_abort () at abort.c:88
#2  0x000000000040a53b in saver_exit (si=0x7fffffffdcf0, status=-1, 
    dump_core_reason=0x423648 "because of synchronous X Error")
    at ../../driver/windows.c:904
#3  0x00000000004071ea in saver_ehandler (dpy=0x6466d0, error=0x7fffffffd8a0)
    at ../../driver/xscreensaver.c:374
#4  0x00000035d38463c4 in _XError (dpy=0x6466d0, rep=0x656fe0)
    at XlibInt.c:2928
#5  0x00000035d384d126 in _XReply (dpy=0x6466d0, rep=<value optimized out>, 
    extra=0, discard=0) at xcb_io.c:506
#6  0x00000035d8404211 in XRRGetCrtcInfo (dpy=0x6466d0, resources=0x667340, 
    crtc=13560591197754948) at XrrCrtc.c:54
#7  0x000000000040cb69 in randr_scan_monitors (errP=<value optimized out>, 
    dpy=<value optimized out>) at ../../driver/screens.c:440
#8  scan_monitors (errP=<value optimized out>, dpy=<value optimized out>)
    at ../../driver/screens.c:682
#9  update_screen_layout (errP=<value optimized out>, 
    dpy=<value optimized out>) at ../../driver/screens.c:976
#10 0x000000000040824b in initialize_per_screen_info (
    si=<value optimized out>, toplevel_shell=<value optimized out>)
    at ../../driver/xscreensaver.c:825
---Type <return> to continue, or q <return> to quit---
#11 main (si=<value optimized out>, toplevel_shell=<value optimized out>)
    at ../../driver/xscreensaver.c:1384
(gdb) 

Paul
Comment 19 Mamoru TASAKA 2009-06-10 17:16:01 EDT
Created attachment 347295 [details]
test-randr.c (in xscreensaver source)

Thank you.
Then would you try if the attached program works?
(compile with "-g -lXrandr -lX11 -lXt")

If this program causes segv, would you try this from gdb
and tell me what "(gdb) where" says?
Comment 20 Paul Smith 2009-06-10 17:33:54 EDT
(In reply to comment #19)
> Created an attachment (id=347295) [details]
> test-randr.c (in xscreensaver source)
> 
> Thank you.
> Then would you try if the attached program works?
> (compile with "-g -lXrandr -lX11 -lXt")
> 
> If this program causes segv, would you try this from gdb
> and tell me what "(gdb) where" says?  

The result is below. I do not know whether the following fact is connected to this problem: whenever I logout, the display settings are lost.

Paul

--------------------------------

$ cd /tmp/
[paulus@localhost tmp]$ ./test
test: 22:29:31: XRRQueryExtension(dpy, ...) ==> 99, 165
test: 22:29:31: XRRQueryVersion(dpy, ...) ==> 1, 3

test: 22:29:31: Screen 0
test: 22:29:31:   Available Rotations:	 0 90 180 270
test: 22:29:31:   Current Rotation:	 0
test: 22:29:31:   Available Reflections:	 X Y
test: 22:29:31:   Current Reflections:	 none
test: 22:29:31:     size 0: 1280 x 1024	 rates: 75
test: 22:29:31:     size 1: 1280 x 960	 rates: 60
test: 22:29:31:     size 2: 1152 x 864	 rates: 75
test: 22:29:31:   + size 3: 1024 x 768	 rates: 85 75 70 60 43
test: 22:29:31:     size 4: 832 x 624	 rates: 75
test: 22:29:31:     size 5: 800 x 600	 rates: 72 75 60 56
test: 22:29:31:     size 6: 640 x 480	 rates: 75 73 67 60
test: 22:29:31:     size 7: 720 x 400	 rates: 88 70

test: awaiting events...

	(If you resize the screen or add/remove monitors, this should
	notice that and print stuff.  Otherwise, hit ^C.)

test: screen 0: RRScreenChangeNotify event
test: screen 0: old size: 	1024 x 768
test: screen 0: old root 0x162:	1024 x 768
test: screen 0: new size: 	1024 x 768
test: screen 0: new root 0x162:	1152 x 864

test: screen 0: RRScreenChangeNotify event
test: screen 0: old size: 	1024 x 768
test: screen 0: old root 0x162:	1152 x 864
test: screen 0: new size: 	1152 x 864
test: screen 0: new root 0x162:	1152 x 864

test: screen 0: RRScreenChangeNotify event
test: screen 0: old size: 	1152 x 864
test: screen 0: old root 0x162:	1152 x 864
test: screen 0: new size: 	1152 x 864
test: screen 0: new root 0x162:	1152 x 864

test: screen 0: RRScreenChangeNotify event
test: screen 0: old size: 	1152 x 864
test: screen 0: old root 0x162:	1152 x 864
test: screen 0: new size: 	1152 x 864
test: screen 0: new root 0x162:	1024 x 768

test: screen 0: RRScreenChangeNotify event
test: screen 0: old size: 	1152 x 864
test: screen 0: old root 0x162:	1024 x 768
test: screen 0: new size: 	1024 x 768
test: screen 0: new root 0x162:	1024 x 768

test: screen 0: RRScreenChangeNotify event
test: screen 0: old size: 	1024 x 768
test: screen 0: old root 0x162:	1024 x 768
test: screen 0: new size: 	1024 x 768
test: screen 0: new root 0x162:	1024 x 768

^C
$
Comment 21 Mamoru TASAKA 2009-06-11 00:33:44 EDT
Sorry.. would you recompile with "-g -lXrandr -lX11 -lXt -DHAVE_RANDR_12"
and try again?
Comment 22 Paul Smith 2009-06-11 05:37:04 EDT
(In reply to comment #21)
> Sorry.. would you recompile with "-g -lXrandr -lX11 -lXt -DHAVE_RANDR_12"
> and try again?  

The result is below:

$ ./test
test: 10:35:01: XRRQueryExtension(dpy, ...) ==> 99, 165
test: 10:35:01: XRRQueryVersion(dpy, ...) ==> 1, 3

test: 10:35:01: Screen 0
test: 10:35:01:   Available Rotations:	 0 90 180 270
test: 10:35:01:   Current Rotation:	 0
test: 10:35:01:   Available Reflections:	 X Y
test: 10:35:01:   Current Reflections:	 none
test: 10:35:01:     size 0: 1280 x 1024	 rates: 75
test: 10:35:01:     size 1: 1280 x 960	 rates: 60
test: 10:35:01:     size 2: 1152 x 864	 rates: 75
test: 10:35:01:   + size 3: 1024 x 768	 rates: 85 75 70 60 43
test: 10:35:01:     size 4: 832 x 624	 rates: 75
test: 10:35:01:     size 5: 800 x 600	 rates: 72 75 60 56
test: 10:35:01:     size 6: 640 x 480	 rates: 75 73 67 60
test: 10:35:01:     size 7: 720 x 400	 rates: 88 70

test: 10:35:01:   Output 0: VGA-0: connected (137)
test: 10:35:01:   + CRTC 0 (137): 1024x768+0+0
test: 10:35:01:     CRTC 1 (138): 0x0+0+0

test: 10:35:01:   Output 1: DVI-I-0: disconnected (0)


test: awaiting events...

	(If you resize the screen or add/remove monitors, this should
	notice that and print stuff.  Otherwise, hit ^C.)

^C
$ 

Paul
Comment 23 Mamoru TASAKA 2009-06-11 06:38:51 EDT
Thank you.

Now would you try the following?
http://kojipkgs.fedoraproject.org/packages/xscreensaver/5.08/10.fc11/
Comment 24 Paul Smith 2009-06-11 07:15:37 EDT
Created attachment 347379 [details]
Screensaver preferences window
Comment 25 Paul Smith 2009-06-11 07:16:52 EDT
(In reply to comment #23)
> Thank you.
> 
> Now would you try the following?
> http://kojipkgs.fedoraproject.org/packages/xscreensaver/5.08/10.fc11/  

Thanks, Mamoru. Now, after having updated the xscreensavers rpms, I have the xscreensaver working fine, except the following detail: after having done a first preview of the screensaver theme (clicking on the preview button), the square in the screensaver preferences window gets dark and does not show the compass as it showed before hitting the preview button. (Please, see the attached screen-shot.)

Paul
Comment 26 Mamoru TASAKA 2009-06-11 10:34:51 EDT
(In reply to comment #25)
> (In reply to comment #23)
> > Thank you.
> > 
> > Now would you try the following?
> > http://kojipkgs.fedoraproject.org/packages/xscreensaver/5.08/10.fc11/  
> 
> Thanks, Mamoru. Now, after having updated the xscreensavers rpms, I have the
> xscreensaver working fine, 

Thank you for confirming.

> except the following detail: after having done a
> first preview of the screensaver theme (clicking on the preview button), the
> square in the screensaver preferences window gets dark and does not show the
> compass as it showed before hitting the preview button. (Please, see the
> attached screen-shot.)

Well, this is the "expected" behavior on current xscreensaver
code. Currently when xscreensaver-demo tries to show 
fullwindow preview mode,
- xscreensaver-demo kills the hack shown in the preferences window.
  This is because we don't want to let the invisible hack (in preference
  window) left (in fullwindow preview mode) and waste the resource in vain.
- and xscreensaver-demo asks "xscreensaver" to show the hack in demo
  mode (so actually when "xscreensaver" is dead preview from xscreensaver-demo
  does not work)
- however "xscreensaver" does not tell "xscreensaver-demo" anything
  when xscreensaver fullwindow "demo" ends.

In my memory jwz said that as we can make xscreensaver-demo show
the hack in the preference window again easily he did not feel
to "fix" this behavior. So for now I want to leave this as it is.
Comment 27 Fedora Update System 2009-06-11 11:47:06 EDT
xscreensaver-5.08-10.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/xscreensaver-5.08-10.fc11
Comment 28 Paul Smith 2009-06-11 11:47:55 EDT
(In reply to comment #26)
> Well, this is the "expected" behavior on current xscreensaver
> code. Currently when xscreensaver-demo tries to show 
> fullwindow preview mode,
> - xscreensaver-demo kills the hack shown in the preferences window.
>   This is because we don't want to let the invisible hack (in preference
>   window) left (in fullwindow preview mode) and waste the resource in vain.
> - and xscreensaver-demo asks "xscreensaver" to show the hack in demo
>   mode (so actually when "xscreensaver" is dead preview from xscreensaver-demo
>   does not work)
> - however "xscreensaver" does not tell "xscreensaver-demo" anything
>   when xscreensaver fullwindow "demo" ends.
> 
> In my memory jwz said that as we can make xscreensaver-demo show
> the hack in the preference window again easily he did not feel
> to "fix" this behavior. So for now I want to leave this as it is.  

Thanks, Mamoru, for your detailed explanation. I agree with the arguments put forward.

Paul
Comment 29 Fedora Update System 2009-06-11 11:48:11 EDT
xscreensaver-5.08-10.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/xscreensaver-5.08-10.fc10
Comment 30 Fedora Update System 2009-06-11 11:49:08 EDT
xscreensaver-5.08-10.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/xscreensaver-5.08-10.fc9
Comment 31 Fedora Update System 2009-06-15 22:21:14 EDT
xscreensaver-5.08-10.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 32 Fedora Update System 2009-06-15 22:24:03 EDT
xscreensaver-5.08-10.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 33 Fedora Update System 2009-06-15 22:41:51 EDT
xscreensaver-5.08-10.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.