当显示器在启动时断开连接时启用 Xorg 视频输出

当显示器在启动时断开连接时启用 Xorg 视频输出

我们拥有配置了 Xorg / lightdm / xfce4 的最新 Debian Jesse 盒子。它们被设置为自动登录并在启动时运行一些程序。这通常工作得很好。

问题是在启动时没有插入显示器(由于 KVM 开关位置错误,或者只是忘记插入显示器电缆)。 Xorg 仍然启动,没有检测到监视器(如预期的那样),并且似乎以标称分辨率创建了一个未连接到任何视频输出的帧缓冲区。其他进程全部启动,输出到该帧缓冲区。Xorg.0.log显示这个:

[    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)

如果我现在插入显示器,似乎 EDID 没问题,但视频输出仍然处于禁用状态。我可以ctrl-alt-F1获取文本控制台并登录,但无法弄清楚如何启用视频输出并获取附加到它的帧缓冲区。

xrandr -d :0 --prop说:

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

所以我们看到显示器现在连接到 VGA1。尝试xrandr -d :0 --output VGA1 --auto(以及各种模型行设置的变化)都会导致:

xrandr: Configure crtc 0 failed

我不明白这想告诉我什么......

两个问题/问题:

  1. 如果最初没有检测到显示器,是否有办法强制 Xorg 默认启用 VGA 输出,即使分辨率不太理想?

  2. 如果做不到这一点,如何在插入显示器后启用视频输出?

编辑:这是输出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

相关内容