Unexpected behaviour of xrandr and the Intel driver on monitor hotplug
Hello,
Before I file bugs, I'd like to check that the behaviour I'm seeing is unexpected. In all testing, I'm on an Intel 945 platform, running Fedora 12 for most of the stack (including the kernel), but with recent git master of xserver, xf86-video-intel, libdrm and mesa.
In all cases, I'm testing the behaviour of the system with the command "xrandr --prop". I'm trying to use xrandr to replace an external EDID parser in our product; the ultimate goal is to present the user with the xrandr modes to choose from, flagging the monitor's preferred mode as such, but permitting users to force other modes (e.g. because your VGA over Cat5e solution doesn't handle the display's native resolution). The mode set in the xorg.conf file is named "NTB-vesa_cvt-1360x768".
I'm seeing two problems, which I'll describe, then give xrandr output for, so that you can see what's confusing me.
The first bit of misbehaviour I'm seeing is caching of EDID across hotplug events. If I boot my system with no display attached, I correctly see no EDID property. When I connect a monitor via VGA, using cabling that supports DDC, I see EDID. When I unplug the monitor, I continue to see the old EDID. When I then plug in using a cable that doesn't support DDC, I see an extra mode appear in the mode list, but the EDID has not changed. Connecting using the original cable, or disconnecting cables completely removes this extra mode.
In xrandr terms:
On boot without a cable:
# xrandr --prop Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096 VGA1 disconnected 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm NTB-vesa_cvt-1360x768 59.8*+ 1600x1200 60.0 1400x1050 60.0 1280x1024 60.0 1280x960 60.0 1024x768 60.0 800x600 60.3 640x480 60.0 59.9 DVI1 disconnected (normal left inverted right x axis y axis)
Attach a monitor to VGA1:
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1920x1200 60.0 +
1600x1200 60.0
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
DVI1 disconnected (normal left inverted right x axis y axis)Unplug that monitor (where's this EDID coming from?):
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 disconnected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
DVI1 disconnected (normal left inverted right x axis y axis)Plug in a different monitor via a cable that doesn't support DDC (where's the EDID coming from? Where does 848x480 come from?):
# xrandr --prop
VGA1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1280x1024 60.0
1024x768 60.0
800x600 60.3
848x480 60.0
640x480 60.0 59.9
DVI1 disconnected (normal left inverted right x axis y axis)Finally, unplug the cable (where's this EDID from? Why has 848x480 disappeared?):
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 disconnected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
DVI1 disconnected (normal left inverted right x axis y axis)The second misbehaviour I'm seeing is that the list of modes isn't predictable in the presence of hotplug. If I boot without EDID available, I get one list of modes; if I make EDID available by changing cables, I get a second list of modes. If I then change cables back to the no EDID cable, I get a third list of modes - I was expecting the first list again.
In xrandr terms:
Boot without cable (it'd be nice to know how to trim this modelist, for backwards compatibility reasons, but I can live with the full list):
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096 VGA1 disconnected 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
NTB-vesa_cvt-1360x768 59.8*+
1600x1200 60.0 1400x1050 60.0 1280x1024 60.0 1280x960 60.0 1024x768 60.0 800x600 60.3 640x480 60.0 59.9
DVI1 disconnected (normal left inverted right x axis y axis)
Connect monitor with EDID:
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1920x1200 60.0 +
1600x1200 60.0
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
DVI1 disconnected (normal left inverted right x axis y axis)Disconnect monitor (why've I lost lots of modes that I had before I connected the monitor? Why do I still have EDID?):
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 disconnected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
DVI1 disconnected (normal left inverted right x axis y axis)Connect a monitor without DDC support (why do I have EDID still? Where's 848x480 from?):
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 connected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1280x1024 60.0
1024x768 60.0
800x600 60.3
848x480 60.0
640x480 60.0 59.9
DVI1 disconnected (normal left inverted right x axis y axis)Disconnect again (why's 848x480 no longer present?):
# xrandr --prop
Screen 0: minimum 320 x 200, current 1360 x 768, maximum 4096 x 4096
VGA1 disconnected 1360x768+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
EDID:
00ffffffffffff0010ac29a053315933
111201030e342078eab325ac5130b426
105054a54b008180a940714f01010101
010101010101283c80a070b023403020
360007442100001a000000ff00435832
363838344e335931530a000000fc0044
454c4c20323430385746500a000000fd
00384c1e5311000a202020202020005f
NTB-vesa_cvt-1360x768 59.8*+
1280x1024 60.0
1024x768 60.0
800x600 60.3
640x480 60.0
DVI1 disconnected (normal left inverted right x axis y axis)Should I file bugs for these, and start chasing down what's going on, or is this expected behaviour? If it's expected, can someone explain why I'm seeing what I'm seeing?
Signature · 4 lines
Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/
Quoted 7 lines · Simon Farnsworth
The first bit of misbehaviour I'm seeing is caching of EDID across hotplug events. If I boot my system with no display attached, I correctly see no EDID property. When I connect a monitor via VGA, using cabling that supports DDC, I see EDID. When I unplug the monitor, I continue to see the old EDID. When I then plug in using a cable that doesn't support DDC, I see an extra mode appear in the mode list, but the EDID has not changed. Connecting using the original cable, or disconnecting cables completely removes this extra mode.
commit 725398322d05486109375fbb85c3404108881e17
Author: Zhao Yakui <[email protected]> Date: Thu Mar 4 08:25:55 2010 +0000
drm: remove the EDID blob stored in the EDID property when it is disconnected
Now the EDID property will be updated when the corresponding EDID can be obtained from the external display device. But after the external device is plugged-out, the EDID property is not updated. In such case we still get the corresponding EDID property although it is already detected as disconnected.
https://bugs.freedesktop.org/show_bug.cgi?id=26743
Quoted 5 lines
The second misbehaviour I'm seeing is that the list of modes isn't predictable in the presence of hotplug. If I boot without EDID available, I get one list of modes; if I make EDID available by changing cables, I get a second list of modes. If I then change cables back to the no EDID cable, I get a third list of modes - I was expecting the first list again.
Probably a side effect of the above.
- ajax
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Adam Jackson
Quoted 8 lines · Simon Farnsworth
The first bit of misbehaviour I'm seeing is caching of EDID across hotplug events. If I boot my system with no display attached, I correctly see no EDID property. When I connect a monitor via VGA, using cabling that supports DDC, I see EDID. When I unplug the monitor, I continue to see the old EDID. When I then plug in using a cable that doesn't support DDC, I see an extra mode appear in the mode list, but the EDID has not changed. Connecting using the original cable, or disconnecting cables completely removes this extra mode.
Quoted 4 lines
commit
725398322d05486109375fbb85c3404108881e17Author: Zhao Yakui <[email protected]> Date: Thu Mar 4 08:25:55 2010 +0000
Adding that to my kernel build nearly fixed things for me. I still can't explain why the 848x480 mode appears when I connect a DDC-crippled cable to the GMA 945, but I can live with that, I suspect (it looks to be XServer side, anyway, and I'm about to have to generate patches there, as I don't want default modes).
Signature · 4 lines
Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/
Quoted 15 lines · Simon Farnsworth
Quoted 10 lines · Adam Jackson
Quoted 8 lines · Simon Farnsworth
The first bit of misbehaviour I'm seeing is caching of EDID across hotplug events. If I boot my system with no display attached, I correctly see no EDID property. When I connect a monitor via VGA, using cabling that supports DDC, I see EDID. When I unplug the monitor, I continue to see the old EDID. When I then plug in using a cable that doesn't support DDC, I see an extra mode appear in the mode list, but the EDID has not changed. Connecting using the original cable, or disconnecting cables completely removes this extra mode.
Quoted 4 lines
commit
725398322d05486109375fbb85c3404108881e17Author: Zhao Yakui <[email protected]> Date: Thu Mar 4 08:25:55 2010 +0000
Quoted 5 lines
Adding that to my kernel build nearly fixed things for me. I still can't explain why the 848x480 mode appears when I connect a DDC-crippled cable to the GMA 945, but I can live with that, I suspect (it looks to be XServer side, anyway, and I'm about to have to generate patches there, as I don't want default modes).
848x480 just barely fits in the default sync ranges, is why.
- ajax
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx