My XServer crashes when I unplug the video cable and then try to use an xrandr command on the unplugged output while a fullscreen OpenGL application is running.
This is how I can reproduce it on my Radeon HD 6320 Linux box:
1) DisplayPort is connected and the fullscreen OpenGL application is running fine.
'xrandr -q' gives following output:
DFP1 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 60.0*+
1920x1080 60.0
1600x1200 60.0
1680x1050 60.0
1400x1050 60.0
1280x1024 60.0
1440x900 60.0
1280x960 60.0
1280x800 60.0
1280x768 60.0
1280x720 60.0
1024x768 60.0
1024x600 60.0
800x600 60.3
800x480 60.3
640x480 59.9
DFP2 disconnected (normal left inverted right x axis y axis)
CRT1 disconnected (normal left inverted right x axis y axis)
2) Unplug DisplayPort while a fullscreen OpenGL application is running.
Now xrandr -q gives following output:
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 4480 x 1920
DFP1 disconnected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
DFP2 disconnected (normal left inverted right x axis y axis)
CRT1 disconnected (normal left inverted right x axis y axis)
1920x1200 (0x98) 154.0MHz
h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 74.0KHz
v: height 1200 start 1203 end 1209 total 1235 clock 60.0Hz
At this point the application is still running (although no monitor is attached).
3) Type 'xrandr --output DFP1 --off'. This causes the XServer to crash and it takes the OpenGL application along.
Now 'xrandr -q' gives following output:
Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 4480 x 1920
DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 disconnected (normal left inverted right x axis y axis)
CRT1 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1600x1200 60.0*+
1400x1050 60.0
1600x900 60.0
1280x1024 60.0
1440x900 59.9
1280x960 60.0
1366x768 59.8
1360x768 60.0
1280x800 59.8
1152x864 60.0
1280x768 59.9
1280x720 60.0
1024x768 60.0
1024x600 60.0
800x600 60.3
800x480 60.0
720x480 60.0
640x480 59.9
I've tested this with FGLRX 13.1, 13.4, 13.10 and 13.11. The XServer I'm using is 1.9.4.
The XServer log is this:
[2660097.426] 0: X (xorg_backtrace+0x26) [0x4a0096]
[2660097.426] 1: X (0x400000+0x60ad9) [0x460ad9]
[2660097.427] 2: /lib/libpthread.so.0 (0x7f5060f8f000+0xe970) [0x7f5060f9d970]
[2660097.427] 3: /usr/lib/xorg/modules/drivers/fglrx_drv.so (swlDalDisplaySetBlank+0x6) [0x7f505e005a36]
[2660097.427] 4: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_x760_FGLRXClientGone+0x18c) [0x7f505deb5d9c]
[2660097.427] 5: X (FreeResourceByType+0x137) [0x449f87]
[2660097.428] 6: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_x760_atiddxExtensionsDisableExclusiveMode+0x94) [0x7f505deb6214]
[2660097.428] 7: /usr/lib/xorg/modules/drivers/fglrx_drv.so (atiddxExtensionsDisableExclusiveMode+0xd) [0x7f505de301bd]
[2660097.428] 8: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7f505dabe000+0x54c528) [0x7f505e00a528]
[2660097.429] 9: /usr/lib/xorg/modules/drivers/fglrx_drv.so (swlCfExclusiveModeHandler+0x6f) [0x7f505e0080bf]
[2660097.429] 10: /usr/lib/xorg/modules/drivers/fglrx_drv.so (swlCwddeCI+0x12a) [0x7f505e001a6a]
[2660097.430] 11: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7f505dabe000+0x3fc12f) [0x7f505deba12f]
[2660097.430] 12: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7f505dabe000+0x3f8e93) [0x7f505deb6e93]
[2660097.430] 13: X (0x400000+0x2d222) [0x42d222]
[2660097.430] 14: X (0x400000+0x211ea) [0x4211ea]
[2660097.430] 15: /lib/libc.so.6 (__libc_start_main+0xff) [0x7f505fa63c3f]
[2660097.430] 16: X (0x400000+0x20db9) [0x420db9]
[2660097.430] Segmentation fault at address (nil)
[2660097.430]
Fatal server error:
[2660097.430] Caught signal 11 (Segmentation fault). Server aborting
[2660097.430]
[2660097.430]
Please consult the The X.Org Foundation support
fglrxinfo gives this:
display: :0.0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6320 Graphics
OpenGL version string: 4.2.12325 Compatibility Profile Context 13.10