应该可以从 1 个显卡运行 2 个服务器,对吗?我可以让我的系统运行 2 个服务器2显卡(Nvidia 960 和主板显卡),但我无法使用其显示端口和 HDMI 端口仅在 Nvidia 卡上运行 2 X 服务器。
这是我的 xorg.conf 文件,用于 1 个显卡上的 2 个服务器(请注意,为了简洁起见,我在此处删除了所有 InputDevice 部分):
Section "ServerFlags"
Option "DefaultServerLayout" "seat0"
Option "AllowMouseOpenFail" "true"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
EndSection
Section "ServerLayout"
Identifier "seat0"
Screen "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Touchscreen0" "CorePointer"
Option "Seat" "seat0"
Option "SingleCard" "on"
EndSection
Section "ServerLayout"
Identifier "seat1"
Screen "Screen1" 0 0
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice "Touchscreen1" "CorePointer"
Option "Seat" "seat1"
Option "SingleCard" "on"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL E196FP"
HorizSync 31.0 - 80.0
VertRefresh 56.0 - 75.0
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "DELL E170S"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 76.0
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 960"
BusID "PCI:1:0:0"
EndSection
Section "Device"
Identifier "Videocard1"
Driver "vesa"
BusID "PCI:3:0:0"
Option "ProbeAllGpus" "false"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "NoLogo" "True"
Option "UseDisplayDevice" "DFP"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "DynamicTwinView" "False"
Option "metamodes" "DVI-I-0: 1280x1024 +0+0"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Videocard1"
Monitor "Monitor1"
DefaultDepth 24
Option "NoLogo" "True"
Option "UseDisplayDevice" "DFP"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "DynamicTwinView" "False"
Option "metamodes" "DFP-2: 1024x768 +0+0"
EndSection
我使用以下命令启动每个 X 服务器:
startx -- :0 -layout seat0
和
startx -- :1 -layout seat1 -sharevts
我需要更改什么才能使 Nvidia 卡成为两个 X 服务器的源?
答案1
您不能在一张卡上运行两个服务器:两个服务器都必须“拥有”相同的硬件寄存器集,这是行不通的。
但您可以将一台 X 服务器配置为使用两台屏幕。显示名称将类似于:0.0
and :0.1
(对于两个不同的服务器,而不是:0
and :1
)。为屏幕进行视频读出的硬件部分也称为“head”,因此ZaphodHeads
大多数 X 驱动程序中的选项都可以启用此配置,例如intel
和nouveau
(在 Zaphod Beeblebrox 之后)。参见例如这里为了nouveau
。
闭源nvidia
驱动没有这个选项IIRC,因为他们使用自己的平台无关的双景结构。
我只能给出intel
驱动程序的配置,因为我没有 Nvidia 卡,所以最好按照文档进行操作nouveau
。