
如何在 Ubuntu 上為雙 GTX 設定雙顯示器
我正在設定 PC,配備一對 GeForce GTX 1070(均為 ASUS TURBO 1070)卡和一台透過 DP(GPU-0) 和 HDMI(GPU-1) 連接到每個卡的飛利浦 246E FHD 顯示器。PC 配置
DELL WorkStation Precision T7500(2009 或 2010 年製造)
CPU:X5690 * 2
內存:16GB * 12 (=192GB)
GPU:ASUS TURBO GTX 1070 * 2(不使用 SLI 電纜)
Ubuntu 顯示管理器:gdm3
安裝Ubuntu 20.04時,我檢查了
·正常安裝
·安裝Ubuntu時下載更新
·安裝圖形和wifi硬體的第三方軟體...
我安裝了 Ubuntu 20.04,然後重新啟動,第二個顯示器(連接到 GPU-1)無法運作。
------圖片:第二台飛利浦顯示器無法運作------
所以我設定了“NVIDIA X SERVER SETTINGS”,如下所示。
------圖片:第一台顯示器的 X 伺服器設定------
圖:第二台顯示器的 X 伺服器設置
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 440.82
Section "ServerLayout"
# Removed Option "Xinerama" "0"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" 1920 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "Files"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Philips PHL 246E7"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Philips PHL 246E7"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1070"
BusID "PCI:3:0:0"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1070"
BusID "PCI:4:0:0"
EndSection
Section "Screen"
# Removed Option "metamodes" "GPU-bb9972e4-0457-d2b7-c62f-9aa988ef66e4.GPU-0.DP-3: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, GPU-850dc788-8ca1-f53b-5edd-54c338e6fed5.GPU-1.HDMI-1: nvidia-auto-select +1920+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
# Removed Option "BaseMosaic" "on"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-6"
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-2"
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On, AllowGSYNC=Off}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
重新啟動後,我仍然在一台顯示器上看到 GNOME。然而,另一台顯示器是黑屏,只有預設的 X 遊標(右側的發光只是顯示器上的反射):
------圖:第二台顯示器上的 X 遊標------
這是我的 nvidia-smi 訊息。
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1070 Off | 00000000:03:00.0 On | N/A |
| 34% 64C P0 41W / 151W | 436MiB / 8118MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 1070 Off | 00000000:04:00.0 On | N/A |
| 24% 44C P8 7W / 151W | 53MiB / 8119MiB | 11% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1103 G /usr/lib/xorg/Xorg 35MiB |
| 0 1707 G /usr/lib/xorg/Xorg 170MiB |
| 0 1917 G /usr/bin/gnome-shell 125MiB |
| 0 3201 G /usr/lib/firefox/firefox 2MiB |
| 0 3278 G /usr/lib/firefox/firefox 2MiB |
| 0 5499 G ...094687058528,131072 --disable-features= 36MiB |
| 0 5731 G /usr/lib/firefox/firefox 2MiB |
| 0 5774 G /usr/lib/firefox/firefox 2MiB |
| 0 5830 G /usr/lib/firefox/firefox 2MiB |
| 0 7789 G /usr/lib/firefox/firefox 12MiB |
| 0 7826 G /usr/lib/firefox/firefox 2MiB |
| 1 1103 G /usr/lib/xorg/Xorg 14MiB |
| 1 1707 G /usr/lib/xorg/Xorg 15MiB |
+-----------------------------------------------------------------------------+
我檢查了這些網站作為參考。
https://askubuntu.com/questions/1194621/gnome-ignoring-second-monitor-ubuntu-19-10
4 個顯示器,2 個 NVIDIA 顯示卡 - ubuntu 不工作
https://collaboradev.com/2016/09/30/arch-linux-Hydra-build/