在运行 X.org 的 FreeBSD 上设置多头环境

在运行 X.org 的 FreeBSD 上设置多头环境

我的目标是设置一个多头环境:我需要在两个屏幕上都提供扩展桌面,并能够将窗口从一个屏幕拖放到另一个屏幕。左侧屏幕在VGA端口上,右侧屏幕插入HDMI端口。

我尝试了一下,xorg.conf但似乎无法设置正确的配置以使多头工作。

这是我的xorg.conf

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/local/lib/xorg/modules"
    FontPath     "/usr/local/lib/X11/fonts/misc/"
    FontPath     "/usr/local/lib/X11/fonts/TTF/"
    FontPath     "/usr/local/lib/X11/fonts/OTF"
    FontPath     "/usr/local/lib/X11/fonts/Type1/"
    FontPath     "/usr/local/lib/X11/fonts/100dpi/"
    FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
    Load  "dbe"
    Load  "dri"
    Load  "dri2"
    Load  "extmod"
    Load  "record"
    Load  "glx"
EndSection

Section "InputDevice"
    Identifier   "Keyboard0"
    Driver      "evdev"
        Option       "XkbLayout" "fr"
        #Option      "XkbModel" "pc105"
        #Option      "Device" "/dev/ukbd0"
        #Option      "CoreKeyboard"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "auto"
    Option      "Device" "/dev/sysmouse"
    Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "ShadowFB"              # [<bool>]
        #Option     "DefaultRefresh"        # [<bool>]
        #Option     "ModeSetClearScreen"    # [<bool>]
    Identifier  "Card0"
    Driver      "vesa"
    VendorName  "Intel Corporation"
    BoardName   "Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

我读了某处我需要设置VirtualModes指令,因此我修改了配置如下:

Section "Screen"
    # ...
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Virtual   3600 1080
        Modes     "1920x1080" "1680x1050"
    EndSubSection
EndSection

结果是主屏幕上的图像模糊不清。虽然我可以移动鼠标,但看到桌面实际上已经扩展。但它无法使用,并且仅在一个屏幕上运行。

我也已XRandr按照安装本文档但输出$ xrandr -q如下:

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1920 x 1200, maximum 1920 x 1200
default connected 1920x1200+0+0 0mm x 0mm
   1920x1200      0.00* 
   1600x1200      0.00  
   1280x1024      0.00  
   1024x768       0.00  
   800x600        0.00  
   640x480        0.00  

所以我看到只检测到一个屏幕,因此我无法运行以下命令来按照我的意愿显示两个屏幕:

$ xrandr --output <RightScreen> --right-of default

因为我不知道 的名字<RightScreen>

最奇怪的是,在HDMI插入右侧屏幕的情况下重新启动时,启动信息出现在右侧屏幕上,而主(左侧)屏幕上什么都没有出现。当我登录时,XFCE 无法在右侧屏幕上显示任何内容,导致两个屏幕都无法使用。唯一的解决方案是手动关闭计算机(按下按钮),拔下右侧屏幕并再次启动。

我遗漏了什么?我对 Linux 世界还很陌生,FreeBSD如果我做错了什么,请多多包涵。

任何帮助都将不胜感激。谢谢!

相关内容