在运行 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 无法在右侧屏幕上显示任何内容,并且两个屏幕都无法使用。唯一的解决方案是手动关闭计算机(通过按按钮),拔下右侧屏幕的插头并再次启动。

我缺少什么?

编辑

我发现vesa默认驱动不支持多头。

这是输出$ pkg info -a -o | grep video

videoproto-2.3.2               x11/videoproto
xf86-video-ati-6.14.6_3        x11-drivers/xf86-video-ati
xf86-video-intel-2.7.1_8       x11-drivers/xf86-video-intel
xf86-video-mach64-6.9.4_3      x11-drivers/xf86-video-mach64
xf86-video-nv-2.1.20_4         x11-drivers/xf86-video-nv
xf86-video-openchrome-0.3.3_3  x11-drivers/xf86-video-openchrome
xf86-video-r128-6.9.2_3        x11-drivers/xf86-video-r128
xf86-video-vesa-2.3.3_3        x11-drivers/xf86-video-vesa

这也是 的输出$ sysctl hw.model hw.machine hw.ncpu

hw.model: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
hw.machine: amd64
hw.ncpu: 8

答案1

Vesa 不支持双显示。您需要使用本机驱动程序启动 X,在本例中为 Intel 驱动程序。

英特尔确实支持许多主板的双头。您可以通过xrandr(临时)或xorg configuration(重新启动持久)实现双头。

读这个。英特尔对双头设置有很好的记录

相关内容