我拥有的
- 两张视频卡。英伟达 1050 和 英伟达 1050 Ti
- 四个显示器。一种是 4k,一种是全高清,两种是 1920x1200。最后两个是纵向模式。
英伟达-SMI:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.28 Driver Version: 455.28 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 105... Off | 00000000:01:00.0 On | N/A |
| 43% 53C P0 N/A / 75W | 1178MiB / 4034MiB | 6% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 1050 Off | 00000000:08:00.0 Off | N/A |
| 0% 28C P8 N/A / 65W | 6MiB / 2000MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 160537 G /usr/bin/X 1016MiB |
| 0 N/A N/A 160872 G ...AAAAAAAAA= --shared-files 6MiB |
| 0 N/A N/A 161444 G ...AAAAAAAA== --shared-files 107MiB |
| 0 N/A N/A 163168 G kitty 2MiB |
| 1 N/A N/A 160537 G /usr/bin/X 4MiB |
| 1 N/A N/A 160872 G ...AAAAAAAAA= --shared-files 0MiB |
| 1 N/A N/A 161444 G ...AAAAAAAA== --shared-files 0MiB |
| 1 N/A N/A 163168 G kitty 0MiB |
+-----------------------------------------------------------------------------+
现在如何运作
所有显示器均连接至 1050 Ti。作品。配置是这样的:
- 组织:
# Managed by ansible. Editing is useless
# Sheridan
Section "Device"
Identifier "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
Driver "nvidia"
VendorName "NVidia Corporation"
BoardName "GeForce GTX 1050 Ti (GP107)"
Option "NoRenderExtension" "off"
Option "IndirectMemoryAccess" "on"
Option "IgnoreEDID" "off"
Option "UseEDID" "on"
Option "NoLogo" "off"
Option "RandRRotation" "on"
Option "MultiGPU" "off"
Option "SLI" "off"
Option "AllowSHMPixmaps" "on"
BusID "PCI:01:00:0"
EndSection
Section "Device"
Identifier "Device_nvidia_corporation_geforce_gtx_1050__gp107_"
Driver "nvidia"
VendorName "NVidia Corporation"
BoardName "GeForce GTX 1050 (GP107)"
Option "NoRenderExtension" "off"
Option "IndirectMemoryAccess" "on"
Option "IgnoreEDID" "off"
Option "UseEDID" "on"
Option "NoLogo" "off"
Option "RandRRotation" "on"
Option "MultiGPU" "off"
Option "SLI" "off"
Option "AllowSHMPixmaps" "on"
BusID "PCI:08:00:0"
EndSection
# center: LG 27UL500-W -> 3840x2160@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ DP-0
Section "Monitor"
Identifier "Monitor_lg_27ul500_w_first_dp_0"
VendorName "LG"
ModelName "27UL500-W"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__lg_27ul500_w_first_dp_0"
Device "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
Monitor "Monitor_lg_27ul500_w_first_dp_0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
# top: LG 22MP55 -> 1920x1080@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ DVI-D-0
Section "Monitor"
Identifier "Monitor_lg_22mp55_first_dvi_d_0"
VendorName "LG"
ModelName "22MP55"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__lg_22mp55_first_dvi_d_0"
Device "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
Monitor "Monitor_lg_22mp55_first_dvi_d_0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
# left: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ HDMI-1
Section "Monitor"
Identifier "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_1"
VendorName "Iiyama"
ModelName "ProLite XU2395WSU-B1"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__iiyama_prolite_xu2395wsu_b1_first_hdmi_1"
Device "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
Monitor "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_1"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
# right: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# first: NVidia Corporation GeForce GTX 1050 Ti (GP107) @ HDMI-0
Section "Monitor"
Identifier "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_0"
VendorName "Iiyama"
ModelName "ProLite XU2395WSU-B1"
Option "DPMS"
EndSection
Section "Screen"
Identifier "Screen_nvidia_corporation_geforce_gtx_1050_ti__gp107__iiyama_prolite_xu2395wsu_b1_first_hdmi_0"
Device "Device_nvidia_corporation_geforce_gtx_1050_ti__gp107_"
Monitor "Monitor_iiyama_prolite_xu2395wsu_b1_first_hdmi_0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
- Xrandr初始化脚本:
#!/bin/bash
xrandr --setprovideroutputsource 1 0
# center: LG 27UL500-W -> 3840x2160@60
# top: LG 22MP55 -> 1920x1080@60
# left: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# right: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
xrandr --verbose --dpi 96 \
--output "DP-0" --mode 3840x2160 --rate 60 --primary \
--output "DVI-D-0" --mode 1920x1080 --rate 60 --above "DP-0" \
--output "HDMI-1" --mode 1920x1200 --rate 60 --left-of "DP-0" --rotate right \
--output "HDMI-0" --mode 1920x1200 --rate 60 --right-of "DP-0" --rotate left \
启动时,X 接收有关卡和监视器的信息。此外,当窗口管理器启动时,将执行 xrandr 初始化脚本,并将监视器部署并对齐到我需要的位置。
我想要的是
- 将 4k 显示器连接到 1050 Ti
- 将其他显示器连接到 1050
也就是说,我想在两个显卡之间分配负载
我尝试过什么
将三个显示器切换到第二个显卡。
兰德尔
更改初始化脚本不会给出结果。 xrandr 不想轮换显示器。错误是这样的:xrandr: output HDMI-1-0 cannot use rotation "right" reflection "none"
此外,如果我删除旋转选项,监视器将不会启动。仅活动的 4k 显示器连接到主显卡。
- Xrandr初始化脚本:
#!/bin/bash
xrandr --setprovideroutputsource 1 0
# center: LG 27UL500-W -> 3840x2160@60
# top: LG 22MP55 -> 1920x1080@60
# left: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
# right: Iiyama ProLite XU2395WSU-B1 -> 1920x1200@60
xrandr --verbose --dpi 96 \
--output "DP-0" --mode 3840x2160 --rate 60 --primary \
--output "DVI-D-1-0" --mode 1920x1080 --rate 60 --above "DP-0" \
--output "HDMI-1-0" --mode 1920x1200 --rate 60 --left-of "DP-0" --rotate right \
--output "DP-1-1" --mode 1920x1200 --rate 60 --right-of "DP-0" --rotate left \
nvidia 设置
我还尝试使用 nvidia-settings 配置 xorg.conf。显示器初始化正确,侧面显示器旋转正确。但是当我启动 opengl 应用程序时(例如,猫咪),界面开始变慢。桌面/窗口之间的切换开始变慢很多(切换需要几秒钟)。同时nvidia-smi dmon
显示1050已加载100%:
# gpu pwr gtemp mtemp sm mem enc dec mclk pclk
# Idx W C C % % % % MHz MHz
0 - 57 - 7 9 0 0 3504 1303
1 - 52 - 100 4 0 0 3504 1657
0 - 57 - 7 9 0 0 3504 1303
1 - 52 - 100 4 0 0 3504 1657
0 - 57 - 7 9 0 0 3504 1303
1 - 52 - 100 4 0 0 3504 1657
0 - 57 - 10 11 0 0 3504 1303
1 - 52 - 100 5 0 0 3504 1657
0 - 57 - 11 13 0 0 3504 1303
1 - 52 - 100 4 0 0 3504 1657
0 - 57 - 7 9 0 0 3504 1303
1 - 52 - 100 5 0 0 3504 1657
0 - 57 - 11 14 0 0 3504 1303
1 - 52 - 100 4 0 0 3504 1657
0 - 57 - 7 9 0 0 3504 1303
1 - 52 - 100 6 0 0 3504 1657
- xorg.conf:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 455.28
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 1200 1080
Screen 1 "Screen1" 1200 0
Screen 2 "Screen2" 0 1080
Screen 3 "Screen3" 5040 1080
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "1"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from data in "/etc/conf.d/gpm"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol"
Option "Device" "/dev/input/mice"
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 "LG Electronics LG HDR 4K"
HorizSync 135.0 - 135.0
VertRefresh 48.0 - 61.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor1"
VendorName "Unknown"
ModelName "LG Electronics 22MP55"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor2"
VendorName "Unknown"
ModelName "Idek Iiyama PL2395W"
HorizSync 30.0 - 89.0
VertRefresh 50.0 - 76.0
Option "DPMS"
EndSection
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor3"
VendorName "Unknown"
ModelName "Idek Iiyama PL2395W"
HorizSync 30.0 - 89.0
VertRefresh 50.0 - 76.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1050 Ti"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1050"
BusID "PCI:8:0:0"
Screen 0
EndSection
Section "Device"
Identifier "Device2"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1050"
BusID "PCI:8:0:0"
Screen 1
EndSection
Section "Device"
Identifier "Device3"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1050"
BusID "PCI:8:0:0"
Screen 2
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-2"
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, AllowGSYNCCompatible=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-0"
Option "metamodes" "DVI-D-0: nvidia-auto-select +0+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen2"
Device "Device2"
Monitor "Monitor2"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-1"
Option "metamodes" "HDMI-0: nvidia-auto-select +0+0 {rotation=right}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen3"
Device "Device3"
Monitor "Monitor3"
DefaultDepth 24
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-3"
Option "metamodes" "DP-1: nvidia-auto-select +0+0 {rotation=left}"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
操作系统:Gentoo Linux
软件包版本:
[ebuild R ] x11-base/xorg-server-1.20.8-r1:0/1.20.8::gentoo USE="ipv6 (libglvnd) systemd udev wayland xorg -debug -dmx -doc (-elogind) -kdrive -libressl -minimal (-selinux) -static-libs -suid -unwind -xcsecurity -xephyr -xnest -xvfb" 0 KiB
[ebuild R ] x11-apps/xrandr-1.5.1::gentoo 0 KiB
[ebuild R ] x11-drivers/nvidia-drivers-455.28-r1:0/455::gentoo USE="X driver gtk3 kms (libglvnd) multilib tools uvm wayland -compat -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild R ] x11-base/xorg-x11-7.4-r3::gentoo USE="fonts" 0 KiB
你能告诉我我还能尝试什么吗?我忘记了什么?我哪里做错了?