我读到较新的 VirtualBox 支持具有双显示器的 Linux 客户机。当我启动 Arch VM 时,我能够启动两个显示器,但我无法让 Xorg 跨越到第二个显示器。它们始终以克隆模式显示。有人成功做到这一点吗?如果有,您可以分享您的 xorg.conf 吗?
编辑:我的 xorg.conf(我尝试使用增量 BusID 作为测试,但之前它们是相同的)。
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/OTF/"
FontPath "/usr/share/fonts/Type1/"
FontPath "/usr/share/fonts/100dpi/"
FontPath "/usr/share/fonts/75dpi/"
EndSection
Section "Module"
Load "record"
Load "dbe"
Load "dri2"
Load "glx"
Load "extmod"
Load "dri"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "Card0"
Screen 0
Driver "vboxvideo"
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "Card1"
Screen 1
Driver "vboxvideo"
BusID "PCI:0:2:1"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
答案1
我使用 randr 作为解决方法
xrandr --output VBOX1 --right-of VBOX0
我把它放在自动启动中。它会在你登录后运行
答案2
你的 conf 文件中有什么?如果你没有明确告诉它你有多个显示器,它只会克隆输出。如果你不确定如何修改 conf 来做到这一点,有几个很好的教程,比如xorg 架构维基。