透過 xrandr 在多顯示器設定中新增分辨率

透過 xrandr 在多顯示器設定中新增分辨率

我有兩個具有不同最大值的顯示器。解析度(2560x1440 和 1920x1080)。在 Windows 中,我可以為兩台顯示器配置最大分辨率,但在 Linux 中(manjaro、專有的 nvidia 驅動程式和 xrandr 1.5),較大顯示器的分辨率僅限於 2048x1152。我讀了幾個問題/線程/文章如何透過 xrandr 添加自訂分辨率,但這些都不適合我。這是我的問題:

xrandr 的輸出:

Screen 0: minimum 8 x 8, current 3968 x 1152, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected 1920x1080+2048+0 (normal left inverted right x axis y axis) 478mm x 269mm
   1920x1080     60.00*+
   ... skipped few lines .... 
   640x480       75.00    72.81    59.94  
HDMI-0 connected primary 2048x1152+0+0 (normal left inverted right x axis y axis) 553mm x 311mm
   2048x1152     60.00*+
   ... skipped few lines ...                                                                              
   640x480       75.00    59.94    59.93                                                                      
DVI-I-3 disconnected (normal left inverted right x axis y axis)

我使用 cvt 生成新的自訂解析度:

$ cvt 2560 1440 60
# 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

現在我想建立新的結果:

xrandr --newmode 2560x1440_60.00 312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

xrandr 的輸出現在看起來像這樣:

Screen 0: minimum 8 x 8, current 3968 x 1152, maximum 16384 x 16384                                           
DVI-I-0 disconnected (normal left inverted right x axis y axis)                                               
DVI-I-1 disconnected (normal left inverted right x axis y axis)                                               
DVI-I-2 connected 1920x1080+2048+0 (normal left inverted right x axis y axis) 478mm x 269mm                   
   1920x1080     60.00*+                                                                                      
   ... skipped few lines ...                                                             
   640x480       75.00    72.81    59.94                                                                      
HDMI-0 connected primary 2048x1152+0+0 (normal left inverted right x axis y axis) 553mm x 311mm               
   2048x1152     60.00*+                                                                                      
   ... skipped few lines ...  
   640x480       75.00    59.94    59.93  
DVI-I-3 disconnected (normal left inverted right x axis y axis)
  2560x1440_60.00 (0x313) 312.250MHz -HSync +VSync
        h: width  2560 start 2752 end 3024 total 3488 skew    0 clock  89.52KHz
        v: height 1440 start 1443 end 1448 total 1493           clock  59.96Hz

如果我現在想將此解析度新增至輸出 HDMI-0,我會收到以下錯誤:

$ xrandr --addmode HDMI-0 2560x1440_60.00
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:  33
  Current serial number in output stream:  34

過去,我能夠成功地使用此方法根據需要設定我的顯示器,在不同的電腦(筆記型電腦+外接顯示器,兩者俱有相同的解析度)上沒有任何問題。我真的很感激任何建議。

答案1

nVidia 驅動程式有嚴格的 EDID 政策,即使它們有問題。

  • 它有一個 xorg 選項來忽略 EDID 並從圖形適配器支援的所有解析度中進行選擇。使用以下之一:

    Option "UseEDID" "boolean"
    Option "ModeValidation" "NoEdidModes"
    

    可能會忽略部分功能:

    Option "UseEDIDFreqs" "FALSE"
    Option "IgnoreEDIDChecksum" "<con-1>, <con-2>"
    

    或更進階的 EDID 驗證調整,請參閱參考以取得支援的值:

    Option "ModeValidation" "string"
    
  • 它還可以選擇注入 EDID 的更正/修改副本。警告:這很危險,並非所有顯示器都堅固耐用。

    Option "CustomEDID" "<con-1>:</pathto/edid1.bin>; <con-2>:</pathto/edid2.bin>"
    

參考:

筆記:

順便說一句,驗證它是否已檢索 EDID 數據,使用:

xrandr --verbose

相關內容