如何設定帶有 Nvidia 驅動程式的雙頭顯示器和旋轉的一台顯示器?

如何設定帶有 Nvidia 驅動程式的雙頭顯示器和旋轉的一台顯示器?

我有一個整合的 ION GPU,它由專有驅動程式支持,但我始終無法讓開源驅動程式工作。我希望左側螢幕正常,但右側螢幕旋轉。我該如何實現這個目標?

答案1

nvidia-settings我花了一段時間才解決這個問題,所以我想與其他人分享。(在 Arch 上,運行sudo pacman -S nvidia nvidia-utils。)

首先,我們需要產生一個xorg.confusing nvidia-settings.從 GUI 終端運行sudo nvidia-settings.

  1. 從左側選單中選擇“X 伺服器顯示配置”。
  2. 在右側,將“配置”更改為“單獨的 X 螢幕(需要重新啟動 X”)。
  3. 選取“啟用 Xinerama”。
  4. 點選「儲存到X設定檔」;/etc/xorg.conf會起作用,或者您可以將其作為新文件添加到/etc/xorg.conf.d- 例如/etc/xorg.conf.d/10-monitors.conf.

現在,我們需要編輯這個文件。在您最喜歡的編輯器中將其打開為root.例如,運行gksu gedit /etc/xorg.confsudo vim /etc/xorg.conf.

找到正確的Section "Screen".我透過找到正確的Section "Monitor"然後找到相應的來做到這一點Section "Screen"

找到看起來像這樣的行

Option "metamodes" "DFP-1: 1920x1080 +0+0"

並添加{ Rotation=Left },所以它看起來像

Option "metamodes" "DFP-1: 1920x1080 +0+0 { Rotation=Left }".

筆記 DFP-1可能是DFP-0,取決於您正在旋轉的顯示器;決議也可能有所不同。

例子

我的xorg.conf讀法如下

Section "ServerLayout"
Identifier     "Layout0"
Screen      0  "Screen0" 0 28
Screen      1  "Screen1" 1280 0
InputDevice    "Keyboard0" "CoreKeyboard"
InputDevice    "Mouse0" "CorePointer"
Option         "Xinerama" "1"
EndSection

Section "Files"
EndSection

Section "InputDevice"
Identifier     "Mouse0"
Driver         "mouse"
Option         "Protocol" "auto"
Option         "Device" "/dev/psaux"
Option         "Emulate3Buttons" "no"
Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
Identifier     "Keyboard0"
Driver         "kbd"
EndSection

Section "InputClass"
Identifier         "Keyboard Defaults"
MatchIsKeyboard    "yes"
Option         "XkbLayout" "gb"
EndSection

Section "Monitor"
Identifier     "Monitor1"
VendorName     "Unknown"
ModelName      "HP w2228h"
HorizSync       24.0 - 83.0
VertRefresh     48.0 - 76.0
Option         "DPMS"
EndSection

Section "Monitor"
Identifier     "Monitor0"
VendorName     "Unknown"
ModelName      "DELL 1703FP"
HorizSync       30.0 - 80.0
VertRefresh     56.0 - 76.0
Option         "DPMS"
EndSection

Section "Device"
Identifier     "Device1"
Driver         "nvidia"
VendorName     "NVIDIA Corporation"
BoardName      "ION"
BusID          "PCI:3:0:0"
Screen          1
EndSection

Section "Device"
Identifier     "Device0"
Driver         "nvidia"
VendorName     "NVIDIA Corporation"
BoardName      "ION"
BusID          "PCI:3:0:0"
Screen          0
EndSection

Section "Screen"
Identifier     "Screen1"
Device         "Device1"
Monitor        "Monitor1"
DefaultDepth    24
Option         "TwinView" "On"
Option         "Stereo" "0"
Option         "metamodes" "DFP-1: 1920x1080 +0+0 { Rotation=Left }"
    SubSection     "Display"
    Depth       24
    EndSubSection
EndSection

Section "Screen"
Identifier     "Screen0"
Device         "Device0"
Monitor        "Monitor0"
DefaultDepth    24
Option         "TwinView" "On"
Option         "Stereo" "0"
Option         "nvidiaXineramaInfoOrder" "DFP-0"
Option         "metamodes" "DFP-0: 1280x1024 +0+0"
    SubSection     "Display"
    Depth       24
    EndSubSection
EndSection

Section "Extensions"
Option         "Composite" "Disable"
EndSection

參考

  1. Linux 雙顯示器設定:Nvidia 和 Xinerama 指南:僅旋轉一台顯示器

答案2

最新版本的閉源 NVIDIA 驅動程式似乎支援 randr(請參閱http://www.phoronix.com/scan.php?page=news_item&px=MTA5NTY)。只需使用最新的驅動程式和您選擇的 RandR 前端即可。例如,arandr 允許您移動顯示器並改變它們的方向。

相關內容