We have up-to-date Debian Jesse boxes configured with Xorg / lightdm / xfce4. They're set up to auto login and run some programs at startup. This normally works just fine.
The problem is when there's no monitor plugged in at boot time (due to KVM switch in wrong position, or simply forgot to plug in monitor cable). Xorg still starts, does not detect a monitor (as expected), and seems to create a frame buffer at a nominal resolution that's not connected to any video outputs. The other processes all start, outputting to that frame buffer. Xorg.0.log
shows this:
[ 20.650] (II) intel(0): Output VGA1 has no monitor section
[ 20.651] (II) intel(0): Output HDMI1 has no monitor section
[ 20.651] (II) intel(0): Output DP1 has no monitor section
[ 20.652] (II) intel(0): EDID for output VGA1
[ 20.653] (II) intel(0): EDID for output HDMI1
[ 20.653] (II) intel(0): EDID for output DP1
[ 20.653] (II) intel(0): Output VGA1 disconnected
[ 20.653] (II) intel(0): Output HDMI1 disconnected
[ 20.653] (II) intel(0): Output DP1 disconnected
[ 20.653] (WW) intel(0): No outputs definitely connected, trying again...
...
[ 20.653] (WW) intel(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
[ 20.653] (II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
[ 20.653] (II) intel(0): Kernel page flipping support detected, enabling
[ 20.653] (==) intel(0): DPI set to (96, 96)
If I now plug in a monitor, it seems to EDID just fine, but the video output remains disabled. I can ctrl-alt-F1
to get a text console and log in, but can't figure out how to enable the video output and get the frame buffer attached to it.
xrandr -d :0 --prop
says:
Screen 0: minimum 320 x 200, current 320 x 200, maximum 8192 x 8192
VGA1 connected (normal left inverted right x axis y axis)
EDID:
00ffffffffffff0010ac4a40554e4743
151401030a351e78ea9eb5a259559b25
0e5054a54b00714f8180d1c001010101
010101010101023a801871382d40582c
4500132a2100001e000000ff0031344b
304e30355043474e550a000000fc0044
454c4c2047323431300a2020000000fd
00384c1e5312000a202020202020009b
1920x1080 60.00 +
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.08 60.00
800x600 75.00 60.32
640x480 75.00 60.00
720x400 70.08
HDMI1 disconnected (normal left inverted right x axis y axis)
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
DP1 disconnected (normal left inverted right x axis y axis)
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
So we're seeing the monitor now attached to VGA1. Trying xrandr -d :0 --output VGA1 --auto
(and variations with various modeline settings) all result in:
xrandr: Configure crtc 0 failed
I can't figure out what this is trying to tell me...
Two problems / questions:
If there a way to force Xorg to default to enabling the VGA output when no monitors are initially detected, even if it's at a less than ideal resolution?
Failing that, how can I enable the video output once a monitor is plugged in?
Edit: Here's the output from xrandr -d :0 --verbose
:
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 connected (normal left inverted right x axis y axis)
Identifier: 0x41
Timestamp: 21055
Subpixel: unknown
Clones: HDMI1
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff0010ac4a40554e4743
151401030a351e78ea9eb5a259559b25
0e5054a54b00714f8180d1c001010101
010101010101023a801871382d40582c
4500132a2100001e000000ff0031344b
304e30355043474e550a000000fc0044
454c4c2047323431300a2020000000fd
00384c1e5312000a202020202020009b
1920x1080 (0x99) 148.500MHz +HSync +VSync +preferred
h: width 1920 start 2008 end 2052 total 2200 skew 0 clock 67.50KHz
v: height 1080 start 1084 end 1089 total 1125 clock 60.00Hz
1280x1024 (0x9a) 135.000MHz +HSync +VSync
h: width 1280 start 1296 end 1440 total 1688 skew 0 clock 79.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 75.02Hz
1280x1024 (0x9b) 108.000MHz +HSync +VSync
h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 63.98KHz
v: height 1024 start 1025 end 1028 total 1066 clock 60.02Hz
1152x864 (0x9c) 108.000MHz +HSync +VSync
h: width 1152 start 1216 end 1344 total 1600 skew 0 clock 67.50KHz
v: height 864 start 865 end 868 total 900 clock 75.00Hz
1024x768 (0x9d) 78.800MHz +HSync +VSync
h: width 1024 start 1040 end 1136 total 1312 skew 0 clock 60.06KHz
v: height 768 start 769 end 772 total 800 clock 75.08Hz
1024x768 (0x9e) 65.000MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz
v: height 768 start 771 end 777 total 806 clock 60.00Hz
800x600 (0x9f) 49.500MHz +HSync +VSync
h: width 800 start 816 end 896 total 1056 skew 0 clock 46.88KHz
v: height 600 start 601 end 604 total 625 clock 75.00Hz
800x600 (0xa0) 40.000MHz +HSync +VSync
h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz
v: height 600 start 601 end 605 total 628 clock 60.32Hz
640x480 (0xa1) 31.500MHz -HSync -VSync
h: width 640 start 656 end 720 total 840 skew 0 clock 37.50KHz
v: height 480 start 481 end 484 total 500 clock 75.00Hz
640x480 (0xa2) 25.200MHz -HSync -VSync
h: width 640 start 656 end 752 total 800 skew 0 clock 31.50KHz
v: height 480 start 490 end 492 total 525 clock 60.00Hz
720x400 (0xa3) 28.320MHz -HSync +VSync
h: width 720 start 738 end 846 total 900 skew 0 clock 31.47KHz
v: height 400 start 412 end 414 total 449 clock 70.08Hz
HDMI1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x42
Timestamp: 21055
Subpixel: unknown
Clones: VGA1
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
DP1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x43
Timestamp: 21055
Subpixel: unknown
Clones:
CRTCs: 0 1
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
xrandr --verbose
? (when the monitor is plugged in) – dervishe May 10 '16 at 18:16--crtc 1
option with your xrandr config ? something like:xrandr -d :0 --output VGA1 --mode 1920x1080 --crtc 1
and eventually disable each other outputs – dervishe May 10 '16 at 19:40--crtc 0
and--crtc 1
(as well as explicitly specifying the mode), with the same result (Configure crtc 0/1 failed
). Are there some permissions required for configuring the crtc timing? I'm running xrandr as an unprivileged user (the auto-login user, owner of the .Xauthority file). – Mike Blackwell May 10 '16 at 20:41