
我正在嘗試在 Debian 10 上運行具有 HDMI 轉 VGA 適配器的 Samsung SyncMaster 226 NW 顯示器。
在 Linux 中,唯一被偵測為可用的解析度是 1280×720、1024×768、800×600 和 640x480。
但實際的原生解析度為1680×1050,雙啟動Windows時可設定並使用此解析度。
我嘗試使用xrandr
添加自訂分辨率,首先使用它cvt
來生成模型行。用於為 xrandr 建立新模式的命令是
xrandr --newmode "1680×1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
這樣做之後,運行xrandr
返回
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
1024x768 60.00*+ 60.00
1280x720 60.00
800x600 60.32
640x480 59.94
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
USB-C-0 disconnected (normal left inverted right x axis y axis)
1680x1050_60.00 (0x1e4) 146.250MHz -HSync +VSync
h: width 1680 start 1784 end 1960 total 2240 skew 0 clock 65.29KHz
v: height 1050 start 1053 end 1059 total 1089 clock 59.95Hz
但是,當嘗試使用
xrandr --addmode HDMI-0 "1680×1050_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: 43
Current serial number in output stream: 44
被退回。使用
xrandr --output HDMI-0 --mode "1680×1050_60.00"
回
xrandr: 找不到模式 1680x1050_60.00` 作為錯誤。
如何正確將輸出解析度設定為 1680x1050?
答案1
我剛剛花了 2-3 個小時來解決同樣的問題。太煩人了,xrandr 似乎根本不適用於新的 nvidia 驅動程式。現在,在瘋狂和瘋狂之後,我終於想出了一個解決方案,希望它對你有用。
在終端“nvidia-settings”中啟動,切換到“X伺服器顯示配置”,點擊底部的按鈕“儲存到X設定檔”,然後按一下“顯示預覽”。現在,在此預覽中,請前往「Section「Monitor」..... EndSection」區塊並儲存以供以後使用。這就是我如何發現 xorg.conf 的監視器設定的。請注意,還有其他方法,但對於 nvidia 用戶來說,這種方法應該非常安全且方便。
然後取得適合您的解析度的“Modeline”,在終端機中輸入:
cvt 1680x1050
並保存輸出以供以後使用。
好的,現在您只需將所有這些內容新增至 xorg.conf 檔案中,例如 /etc/X11/xorg.conf.d/10-monitor.conf (這至少是我的發行版的路徑)。由於我既沒有您的監視器部分也沒有您的模型線,我將為您提供一個帶有我的監視器部分和我的模型線的示例(我想要的/未檢測到的分辨率是1920x1080 ):
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Acer B246HL"
HorizSync 30.0 - 80.0
VertRefresh 55.0 - 76.0
Option "DPMS"
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
EndSection
Section "Device"
Identifier "Card0"
Driver "nvidia"
Option "HDMI-0" "Monitor1"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080_60.00"
EndSubSection
EndSection
因此,在「監視器」部分中,您只需保留第一行(標識符)並將其餘行替換為您從 nvidia 設定中儲存的內容,最後一行是 cvt 命令的輸出。設備部分應該適合你。螢幕部分只需將“模式”行變更為您的模式名稱,因此可能類似於模式“1680x1050_60.00”
在我的裝置部分中還有一行“BusID“PCI:39:0:0””,但我認為您不需要它。但是,我通過執行“X -configure”得到了該行(xorg 不得運行)。 BusID 應位於產生的 xorg.conf.new 中。奇怪的是,在我的例子中,它與 lspci 的 BusID 不同。
此外,如果您想運行多個顯示器(像我一樣),只需添加帶有標識符“Monitor2”等的新顯示器部分,然後在設備部分中相應地添加例如“選項“HDMI-1”“Monitor2” ,然後最後在螢幕部分新增監視器,如「監視器「Monitor2」」。
就我而言,奇怪的是,我有 3 個完全相同的顯示器,其中一個始終無法被 nvidia-modeset 識別。與 EDID 有關,可以透過以下方式找到錯誤:
dmesg | grep EDID