我正在尝试使用便宜的 2 端口 VGA 交换机(搜索:)Round Press Button Two Way VGA Switch Splitter Black
。
只需要two VGA in
和one VGA out
(不电源输入)。但是,当我启动XFCE
Debian 会话时,我无法将分辨率更改为显示器的推荐分辨率(HP Pavilion v220 Monitor
即)1680x1050
。
查看X log
使用交换机启动时我可以看到以下内容:
[ 26.355] (II) intel(0): EDID for output VGA1
[ 26.355] (II) intel(0): Printing probed modes for output VGA1
[ 26.355] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 26.355] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 26.355] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz e)
[ 26.355] (II) intel(0): Modeline "848x480"x60.0 33.75 848 864 976 1088 480 486 494 517 +hsync +vsync (31.0 kHz e)
[ 26.355] (II) intel(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 489 492 525 -hsync -vsync (31.5 kHz e)
[ 26.356] (II) intel(0): EDID for output HDMI1
如果我使用直接电缆连接:
[ 26.404] (II) intel(0): EDID for output VGA1
[ 26.404] (II) intel(0): Manufacturer: HWP Model: 26fe Serial#: 16843009
[ 26.404] (II) intel(0): Year: 2008 Week: 13
[ 26.404] (II) intel(0): EDID Version: 1.3
[ 26.404] (II) intel(0): Analog Display Input, Input Voltage Level: 0.700/0.700 V
[ 26.404] (II) intel(0): Sync: Separate
[ 26.404] (II) intel(0): Max Image Size [cm]: horiz.: 47 vert.: 30
[ 26.404] (II) intel(0): Gamma: 2.20
[ 26.404] (II) intel(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
[ 26.404] (II) intel(0): Default color space is primary color space
[ 26.404] (II) intel(0): First detailed timing is preferred mode
[ 26.404] (II) intel(0): redX: 0.644 redY: 0.333 greenX: 0.286 greenY: 0.606
[ 26.404] (II) intel(0): blueX: 0.152 blueY: 0.076 whiteX: 0.313 whiteY: 0.329
[ 26.404] (II) intel(0): Supported established timings:
[ 26.404] (II) intel(0): 720x400@70Hz
[ 26.405] (II) intel(0): 640x480@60Hz
[ 26.405] (II) intel(0): 640x480@75Hz
[ 26.405] (II) intel(0): 800x600@60Hz
[ 26.405] (II) intel(0): 800x600@75Hz
[ 26.405] (II) intel(0): 832x624@75Hz
[ 26.405] (II) intel(0): 1024x768@60Hz
[ 26.405] (II) intel(0): 1024x768@75Hz
[ 26.405] (II) intel(0): 1280x1024@75Hz
[ 26.405] (II) intel(0): 1152x864@75Hz
[ 26.405] (II) intel(0): Manufacturer's mask: 0
[ 26.405] (II) intel(0): Supported standard timings:
[ 26.405] (II) intel(0): #0: hsize: 1152 vsize 720 refresh: 60 vid: 113
[ 26.405] (II) intel(0): #1: hsize: 1280 vsize 960 refresh: 60 vid: 16513
[ 26.405] (II) intel(0): #2: hsize: 1280 vsize 1024 refresh: 60 vid: 32897
[ 26.405] (II) intel(0): #3: hsize: 1440 vsize 900 refresh: 60 vid: 149
[ 26.405] (II) intel(0): #4: hsize: 1600 vsize 1000 refresh: 60 vid: 169
[ 26.405] (II) intel(0): #5: hsize: 1680 vsize 1050 refresh: 60 vid: 179
[ 26.405] (II) intel(0): Supported detailed timing:
[ 26.405] (II) intel(0): clock: 146.2 MHz Image Size: 473 x 296 mm
[ 26.405] (II) intel(0): h_active: 1680 h_sync: 1784 h_sync_end 1960 h_blank_end 2240 h_border: 0
[ 26.405] (II) intel(0): v_active: 1050 v_sync: 1053 v_sync_end 1059 v_blanking: 1089 v_border: 0
[ 26.405] (II) intel(0): Ranges: V min: 56 V max: 76 Hz, H min: 30 H max: 81 kHz, PixClock max 165 MHz
[ 26.405] (II) intel(0): Monitor name: HP v220
[ 26.405] (II) intel(0): Serial No: CNT81361N2
[ 26.405] (II) intel(0): EDID (in hex):
[ 26.405] (II) intel(0): 00ffffffffffff0022f0fe2601010101
[ 26.405] (II) intel(0): 0d120103682f1e78eed525a455499b27
[ 26.405] (II) intel(0): 135054a56b807100814081809500a900
[ 26.405] (II) intel(0): b3000101010121399030621a274068b0
[ 26.405] (II) intel(0): 3600d9281100001c000000fd00384c1e
[ 26.405] (II) intel(0): 5110000a202020202020000000fc0048
[ 26.405] (II) intel(0): 5020763232300a2020202020000000ff
[ 26.405] (II) intel(0): 00434e5438313336314e320a202000c5
[ 26.405] (II) intel(0): Printing probed modes for output VGA1
[ 26.405] (II) intel(0): Modeline "1680x1050"x60.0 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync (65.3 kHz eP)
[ 26.405] (II) intel(0): Modeline "1600x1000"x60.0 133.16 1600 1704 1872 2144 1000 1001 1004 1035 -hsync +vsync (62.1 kHz)
[ 26.405] (II) intel(0): Modeline "1280x1024"x75.0 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)
[ 26.405] (II) intel(0): Modeline "1280x1024"x60.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 26.405] (II) intel(0): Modeline "1440x900"x59.9 106.50 1440 1520 1672 1904 900 903 909 934 -hsync +vsync (55.9 kHz e)
[ 26.405] (II) intel(0): Modeline "1280x960"x60.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz e)
[ 26.405] (II) intel(0): Modeline "1152x864"x75.0 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync (67.5 kHz e)
[ 26.405] (II) intel(0): Modeline "1152x720"x60.0 67.28 1152 1208 1328 1504 720 721 724 746 -hsync +vsync (44.7 kHz)
[ 26.405] (II) intel(0): Modeline "1024x768"x75.1 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync (60.1 kHz e)
[ 26.405] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 26.405] (II) intel(0): Modeline "832x624"x74.6 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync (49.7 kHz e)
[ 26.405] (II) intel(0): Modeline "800x600"x75.0 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync (46.9 kHz e)
[ 26.405] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 26.405] (II) intel(0): Modeline "640x480"x75.0 31.50 640 656 720 840 480 481 484 500 -hsync -vsync (37.5 kHz e)
[ 26.405] (II) intel(0): Modeline "640x480"x60.0 25.20 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 26.405] (II) intel(0): Modeline "720x400"x70.1 28.32 720 738 846 900 400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 26.406] (II) intel(0): EDID for output HDMI1
因此,直到 X 真正识别 Modeline 之前,我将无法从我的 XFCE 会话中选择它(xfce4-display-settings
)。
我该怎么做才能修复这个问题?我现在确实想使用不正确的 Modeline 设置来刻录我的显示器。我希望有一个工具可以直接从我的edid
(例如get-edid
)文件生成正确的 Xorg 文件:
$ xxd /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-VGA-1/edid
0000000: 00ff ffff ffff ff00 22f0 fe26 0101 0101 ........"..&....
0000010: 0d12 0103 682f 1e78 eed5 25a4 5549 9b27 ....h/.x..%.UI.'
0000020: 1350 54a5 6b80 7100 8140 8180 9500 a900 .PT.k.q..@......
0000030: b300 0101 0101 2139 9030 621a 2740 68b0 ......!9.0b.'@h.
0000040: 3600 d928 1100 001c 0000 00fd 0038 4c1e 6..(.........8L.
0000050: 5110 000a 2020 2020 2020 0000 00fc 0048 Q... .....H
0000060: 5020 7632 3230 0a20 2020 2020 0000 00ff P v220. ....
0000070: 0043 4e54 3831 3336 314e 320a 2020 00c5 .CNT81361N2. ..
我甚至无法使用著名的CustomEDID
解决方案来修复 Xorg 级别的问题:
[ 25.360] (WW) intel(0): Option "ConnectedMonitor" is not used
[ 25.360] (WW) intel(0): Option "UseEDID" is not used
[ 25.360] (WW) intel(0): Option "CustomEDID" is not used
[ 25.360] (WW) intel(0): Option "IgnoreEDID" is not used
当然,一个不成熟的解决方案是xorg.conf
像石器时代那样对东西进行硬编码(parse-edit
与手动编辑的 X.org 日志文件混合):
$ cat /etc/X11/xorg.conf
Section "Monitor"
Identifier "HP v220"
ModelName "HP v220"
VendorName "HWP"
# Monitor Manufactured week 13 of 2008
# EDID version 1.3
# Analog Display
DisplaySize 470 300
Gamma 2.20
Option "DPMS" "true"
Horizsync 30-81
VertRefresh 56-76
# Maximum pixel clock is 160MHz
# Modeline "Mode 0" -hsync +vsync
Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
Modeline "1600x1000" 133.16 1600 1704 1872 2144 1000 1001 1004 1035 -hsync +vsync
Modeline "1280x1024" 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync
Modeline "1280x1024" 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
Modeline "1440x900" 106.50 1440 1520 1672 1904 900 903 909 934 -hsync +vsync
Modeline "1280x960" 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync
Modeline "1152x864" 108.00 1152 1216 1344 1600 864 865 868 900 +hsync +vsync
Modeline "1152x720" 67.28 1152 1208 1328 1504 720 721 724 746 -hsync +vsync
Modeline "1024x768" 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
Modeline "1024x768" 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
Modeline "832x624" 57.28 832 864 928 1152 624 625 628 667 -hsync -vsync
Modeline "800x600" 49.50 800 816 896 1056 600 601 604 625 +hsync +vsync
Modeline "800x600" 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync
Modeline "640x480" 31.50 640 656 720 840 480 481 484 500 -hsync -vsync
Modeline "640x480" 25.20 640 656 752 800 480 490 492 525 -hsync -vsync
Modeline "720x400" 28.32 720 738 846 900 400 412 414 449 -hsync +vsync
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "HP v220"
EndSection
但帧缓冲区仍然会保留为:
$ fbset -i
mode "1024x768"
geometry 1024 768 1024 768 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
而不是像这样:
$ fbset -i
mode "1680x1050"
geometry 1680 1050 1680 1050 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
我还喜欢我的 GRUB2 以全分辨率运行这一事实。
我正在寻找可以解决低级问题的方法。
答案1
由于CustomEDID
尚未实施,请intel
参阅这里,另一种解决方案就是使用drm_kms_helper.edid_firmare
模块。就我的情况来说:
# ls -al /lib/firmware/edid/HPv220.edid.bin
-rw-r--r-- 1 root root 128 Nov 14 15:32 /lib/firmware/edid/HPv220.edid.bin
# cat /etc/default/grub
[...]
GRUB_CMDLINE_LINUX="drm_kms_helper.edid_firmware=edid/HPv220.edid.bin"
# update-grub
# reboot
grub 屏幕使用的是其他默认分辨率,但这是可以接受的。现在我的会话具有正确的分辨率,无需调整 stone-agexorg.conf
文件。最重要的是 fb 已正确初始化:
$ fbset -i
mode "1680x1050"
geometry 1680 1050 1680 1050 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
现在我的dmesg
输出 100% 相同(除了内核命令行)。