![xrandr、xorg 测试屏幕错误 -- 默认似乎是唯一有效模式](https://linux22.com/image/77978/xrandr%E3%80%81xorg%20%E6%B5%8B%E8%AF%95%E5%B1%8F%E5%B9%95%E9%94%99%E8%AF%AF%20--%20%E9%BB%98%E8%AE%A4%E4%BC%BC%E4%B9%8E%E6%98%AF%E5%94%AF%E4%B8%80%E6%9C%89%E6%95%88%E6%A8%A1%E5%BC%8F.png)
运行 Arch Linux、内核 4.2.5-1、Lightdm 1.16.5、xorg-server 1.17.4-2、nvidia 255.11-4、GTX 780 双链路 dvi 输出。
我有一台 QNIX Evolution II 2710,正在尝试对其进行超频,但在使用 xorg 时遇到了一些问题。总结一下:如果我以错误的方式浏览 xorg 的配置,我会得到一个测试屏幕。我已经尝试更换输出端口和双 DVI 电缆 - 没有任何变化。以下是我的 xorg.conf 的相关部分。行被注释,因为我从当前配置中复制/粘贴了它,并且我更喜欢有一个工作桌面:)
Section "Monitor"
# HorizSync 88.8 - 88.8
# VertRefresh 48.0 - 120.0
Identifier "Monitor0"
VendorName "Unknown"
# ModelName "HYO DUAL-DVI"
# ModeLine "2560x1440_60" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
# ModeLine "2560x1440_86" 330.00 2560 2608 2640 2652 1440 1441 1444 1445 +hsync +vsync
# ModeLine "2560x1440_96" 519.25 2560 2776 3056 3552 1440 1443 1448 1524 -hsync +vsync
# ModeLine "2560x1440_96_2" 400.00 2560 2608 2640 2744 1440 1443 1448 1512 +hsync +vsync
# ModeLine "2560x1440_99" 536.50 2560 2776 3056 3552 1440 1443 1448 1527 -hsync +vsync
# ModeLine "2560x1440_120" 661.25 2560 2784 3064 3568 1440 1443 1448 1545 -hsync +vsync
# Modeline "2560x1440_120_2" 459.86 2560 2608 2640 2652 1440 1441 1444 1445 +hsync +vsync
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 780"
Option "NoLogo" "True"
Option "ConnectedMonitor" "DFP-3"
# Option "CustomEDID" "DFP-3: /etc/X11/2710_edid_60.bin"
Option "IgnoreEDIDChecksum" "DFP-3"
EndSection
Section "Screen"
# Option "UseEDID" "False"
# Option "UseEDIDDPI" "False"
# Option "UseEDIDFreqs" "False"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "IgnoreEDIDChecksum" "True"
Option "ExactModeTimingsDVI" "True"
Option "ModeValidation" "AllowNon60hzmodesDFPModes, NoEDIDDFPMaxSizeCheck, NoVertRefreshCheck, NoHorizSyncCheck, NoDFPNativeResolutionCheck, NoMaxSizeCheck, NoMaxPClkCheck, AllowNonEdidModes"
# NoEDIDModes
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-3"
Option "metamodes" "nvidia-auto-select +0+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
Option "Coolbits" "26"
SubSection "Display"
Depth 24
EndSubSection
# Option "metamodes" "DFP-3: 2560x1440_60 +0 +0"
# Option "metamodes" "DFP-3: 2560x1440_96 +0 +0"
# Option "metamodes" "DFP-3: 2560x1440_99 +0 +0"
# Option "metamodes" "DFP-3: 2560x1440_120 +0 +0"
EndSection
上面的模型行是由 cvt 生成的模型行和我在博客文章中找到的一些用于超频同一显示器的模型行的组合。每个单一模式都会产生 xorg 测试屏幕(循环 RGBW 颜色)。我还专门保留了“NoEDIDModes”选项,因为这保证了 xorg 启动时的测试屏幕。尝试在复制默认模式之外的地方添加任何模型行会产生 xrandr 错误:
me@host /etc/X11 % xrandr --addmode DVI-D-0 2560x1440_96_2
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 39
Current serial number in output stream: 40
所以我然后以日志级别 6 启动 x 并深入研究生成的 Xorg.2。这里使用的 xorg.conf 与上述conf中未注释的模型行、检查和适当的元模式一起。我不会费心发布完整的日志,因为它有 1500 行“模式 320x240d73 无效”,但这里有一些我认为有趣的部分:
[ 38519.330] (II) NVIDIA(GPU-0): --- Building ModePool for DFP-3 ---
[ 38519.330] (WW) NVIDIA(GPU-0): Unrecognized ModeValidation token "AllowNon60hzmodesDFPModes";
[ 38519.330] (WW) NVIDIA(GPU-0): ignoring.
[ 38519.330] (WW) NVIDIA(GPU-0): Unrecognized ModeValidation token "NoEDIDDFPMaxSizeCheck";
[ 38519.330] (WW) NVIDIA(GPU-0): ignoring.
[ 38519.330] (WW) NVIDIA(GPU-0): Unrecognized ModeValidation token
[ 38519.330] (WW) NVIDIA(GPU-0): "NoDFPNativeResolutionCheck"; ignoring.
[ 38519.353] (II) NVIDIA(0): Using MetaMode string: "nvidia-auto-select +0+0"
[ 38519.353] (II) NVIDIA(0): Requested modes:
[ 38519.353] (II) NVIDIA(0): "nvidia-auto-select+0+0"
[ 38519.353] (II) NVIDIA(0): Validated MetaModes:
[ 38519.353] (II) NVIDIA(0): MetaMode "nvidia-auto-select+0+0":
[ 38519.353] (II) NVIDIA(0): Size: 1024 x 768
[ 38519.353] (II) NVIDIA(0): DFP-3: "nvidia-auto-select"
[ 38519.353] (II) NVIDIA(0): Size : 1024 x 768
[ 38519.353] (II) NVIDIA(0): Offset : +0 +0
[ 38519.353] (II) NVIDIA(0): Panning
[ 38519.353] (II) NVIDIA(0): Domain : 1024 x 768
[ 38519.353] (II) NVIDIA(0): Tracking Area: 1024 x 768 +0 +0
[ 38519.353] (II) NVIDIA(0): Border : 0,0,0,0
[ 38519.398] (II) NVIDIA(0): Setting mode "nvidia-auto-select+0+0"
就是这样......没有错误或警告,但我注意到当我尝试使用此元模式选项时,由于某种原因它选择了元模式“nvidia-auto-select”:
Option "metamodes" "DFP-3: 2560x1440_96 +0 +0"
接下来,我将监视器的 edid 导出到 .bin 文件,并尝试使用文件中的相同内容覆盖默认计时(概念证明,如果我可以使用 edid 文件而不是 modeline/metamode)。 Xorg 测试屏幕;我的 xorg.log 中有以下内容:
[ 39803.648] (**) NVIDIA(0): Option "IgnoreEDIDChecksum" "True"
[ 39803.759] (WW) NVIDIA(0): The EDID read for display device DVI-D-0 is invalid:
[ 39803.759] (WW) NVIDIA(0): - The EDID has a bad checksum. The "IgnoreEDIDChecksum" X configuration option may be used to attempt using mode timings in this EDID in spite of this error. A corrupt EDID may have mode timings beyond the capabilities of your display, and could damage your hardware. Please use with care.
[ 39803.778] (WW) NVIDIA(0): DFP-3 does not have an EDID, or its EDID does not contain a
[ 39803.778] (WW) NVIDIA(0): maximum image size; cannot compute DPI from DFP-3's EDID.
至少这次我犯了一个错误。除非我使用 IgnoreEDIDChecksum 选项,并且我亲自检查了 EDID 的校验和以确认它实际上是正确的。我用我想要的模型行手工制作了一个 edid.bin ,但不幸的是我无法在不出现这样的错误的情况下测试它。
任何帮助/评论表示赞赏:)