一台设备上有双 X 屏幕

ale*_*ovo 5 linux ubuntu x11 multi-monitor ubuntu-mate

我使用的是 Ubuntu MATE 18.04。

\n

我相信它使用 LightDM 作为显示管理器。\n我有 2 台显示器连接到同一设备(Intel\xc2\xa0HD 板载显卡,有 2 个端口,1 个 HDMI,1 个 VGA)。

\n

由于我运行的应用程序的性质,我需要有 2 个独立的 X11 屏幕。我需要在它们之间移动鼠标,但除此之外它们应该是独立的。我不应该能够在显示器之间移动窗口。

\n

我相信采用一个显示器和两个屏幕(每个屏幕一个显示器)的设置是可行的。

\n

使用显示管理器 GUI 应用程序,我只需扩展一个显示器,并且它位于同一屏幕上。

\n
    \n
  • 我是否正确地认为一台显示器、2 个屏幕、每个屏幕一台显示器就能满足我的要求?

    \n
  • \n
  • 我该如何设置它?

    \n
  • \n
\n

我正在遵循本指南:

\n
    \n
  • 双显示器\n(位于\xc2\xa0the\xc2\xa0Gentoo\xc2\xa0Linux\xc2\xa0Wiki)
  • \n
\n

\n
    \n
  1. Linux Multihead \xe2\x80\x93 一张显卡上有更多屏幕

    \n
  2. \n
  3. 具有 Intel HD 显卡的 Ubuntu 中的双屏设置(at\xc2\xa0Ask\xc2\xa0Ubuntu)

    \n
  4. \n
  5. Xorg:独立模式(位于\xc2\xa0Unix&Linux)

    \n
  6. \n
  7. 在一张卡上配置多个 X 屏幕\n(at\xc2\xa0nvidia.com)\xe2\x80\x83(this\xc2\xa0does\xc2\xa0not\xc2\xa0mention\xc2\xa0ZaphodHeads)

    \n
  8. \n
\n

它接缝了我想要的称为 ZaphodHeads \xe2\x80\x93 具有同一设备的多个屏幕。

\n

然而,结果 I\xc2\xa0get 是 2 个空白屏幕,只有文本光标位于 \xc2\xa0 左上角。

\n

在我看来这就是问题所在:

\n
[    44.380] (II) intel(0): Output VIRTUAL1 using monitor section MonitorR\n[    44.380] (II) intel(0): Enabled output VIRTUAL1\n[    44.380] (II) intel(0): EDID for output VIRTUAL1\n[    44.380] (II) intel(0): Output VIRTUAL1 disconnected\n[    44.380] (WW) intel(0): No outputs definitely connected, trying again...\n[    44.380] (II) intel(0): Output VIRTUAL1 disconnected\n[    44.380] (WW) intel(0): Unable to find connected outputs - setting 1024x768 initial framebuffer\n
Run Code Online (Sandbox Code Playgroud)\n

我的配置:

\n

Xrandr:

\n
$ xrandr\n\nVGA-1 connected (normal left inverted right x axis y axis)    1920x1080     60.00 +    1600x1200     60.00      1680x1050     59.95  1400x1050     59.98      1600x900      60.00      1280x1024     75.02 \n60.02      1440x900      59.89      1280x960      60.00      1360x768      59.95      1280x800      74.93    59.81      1152x864      75.00    59.97      1280x720      60.00      1024x768      75.03    60.00      800x600       75.00    60.32      640x480       75.00    59.94 \n\nHDMI-1 connected primary 2560x1080+0+0 (normal left inverted right x axis y axis) 673mm x 284mm    2560x1080     60.00*+    1920x1080    \n60.00    50.00    59.94      1920x1080i    60.00    50.00    59.94      1680x1050     59.88      1600x900      60.00      1280x1024     75.02 \n60.02      1152x864      75.00      1280x720      60.00    50.00    59.94      1024x768      75.03    60.00      800x600       75.00    60.32      720x576       50.00      720x480       60.00    59.94      640x480       75.00    60.00    59.94      720x400       70.08   DP-1 disconnected (normal left inverted right x axis y axis)\n
Run Code Online (Sandbox Code Playgroud)\n

PCI设备:

\n
$ lspci | grep -i vga | cut -d " " -f 1 \n\n00:02.0\n
Run Code Online (Sandbox Code Playgroud)\n

Xorg.conf:

\n
$ cat /etc/X11/xorg.conf\n\nSection "ServerLayout"\n    Identifier     "LayoutDual"\n    Screen      0  "ScreenR" 0 0\n    Screen      1  "ScreenE" RightOf "ScreenR" EndSection\n\nSection "ServerFlags"\n    Option      "DefaultServerLayout" "LayoutDual" EndSection\n\nSection "device"\n    Identifier "IntelR"\n    Driver     "intel"\n    Option     "AccelMethod"    "sna"\n    Screen     0\n    BusId      "PCI:0:2:0"\n    Option     "ZaphodHeads"    "HDMI-1"\n    #Option     "NoAccel" "true" EndSection\n\nSection "device"\n    Identifier "IntelE"\n    Driver     "intel"\n    Option     "AccelMethod"    "sna"\n    Screen     1\n    BusId      "PCI:0:2:0"\n    Option     "ZaphodHeads"   "VGA-1"\n#    Option     "NoAccel" "true" EndSection\n\nSection "Monitor"\n    Identifier   "MonitorE"\n    VendorName   "Vendor"\n    ModelName    "Model"\n    Option       "Rotate" "right" EndSection\n\nSection "Monitor"\n    Identifier   "MonitorR"\n    VendorName   "Vendor"\n    ModelName    "Model" EndSection\n\n\nSection "Screen"\n    Identifier "ScreenE"\n    Device     "IntelE"\n    Monitor    "MonitorE"\n    Option     "Rotate" "right"\n    DefaultDepth     24\n    SubSection "Display"\n        Depth     24\n    EndSubSection EndSection\n\nSection "Screen"\n    Identifier "ScreenR"\n    Device     "IntelR"\n    Monitor    "MonitorR"\n    DefaultDepth     24\n#   Option      "DPI" "96 x 96"\n    SubSection "Display"\n        Depth     24\n        Modes "2048x2048"\n    EndSubSection EndSection\n
Run Code Online (Sandbox Code Playgroud)\n

Xorg log:

\n
$ cat /var/log/Xorg.0.log\n\n[    44.028] X Protocol Version 11, Revision 0\n[    44.028] Build Operating System: Linux 4.4.0-138-generic x86_64 Ubuntu\n[    44.028] Current Operating System: Linux simu 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64\n[    44.028] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-88-generic root=UUID=54ac0618-2b10-49ee-bca4-d9ba7634ed46 ro quiet splash vt.handoff=1\n[    44.028] Build Date: 25 October 2018  04:11:27PM\n[    44.028] xorg-server 2:1.19.6-1ubuntu4.2 (For technical support please see http://www.ubuntu.com/support) \n[    44.028] Current version of pixman: 0.34.0\n[    44.028]    Before reporting problems, check http://wiki.x.org\n    to make sure that you have the latest version.\n[    44.028] Markers: (--) probed, (**) from config file, (==) default setting,\n    (++) from command line, (!!) notice, (II) informational,\n    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.\n[    44.028] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Feb 26 19:59:18 2020\n[    44.043] (==) Using config file: "/etc/X11/xorg.conf"\n[    44.043] (==) Using system config directory "/usr/share/X11/xorg.conf.d"\n[    44.091] (**) Option "defaultserverlayout" "LayoutDual"\n[    44.091] (**) ServerLayout "LayoutDual"\n[    44.091] (**) |-->Screen "ScreenR" (0)\n[    44.091] (**) |   |-->Monitor "MonitorR"\n[    44.091] (**) |   |-->Device "IntelR"\n[    44.091] (**) |-->Screen "ScreenE" (1)\n[    44.091] (**) |   |-->Monitor "MonitorE"\n[    44.091] (**) |   |-->Device "IntelE"\n[    44.091] (==) Automatically adding devices\n[    44.091] (==) Automatically enabling devices\n[    44.091] (==) Automatically adding GPU devices\n[    44.091] (==) Automatically binding GPU devices\n[    44.091] (==) Max clients allowed: 256, resource mask: 0x1fffff\n[    44.103] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.\n[    44.103]    Entry deleted from font path.\n[    44.103] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.\n[    44.103]    Entry deleted from font path.\n[    44.103] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.\n[    44.103]    Entry deleted from font path.\n[    44.103] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.\n[    44.103]    Entry deleted from font path.\n[    44.103] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.\n[    44.103]    Entry deleted from font path.\n[    44.103] (==) FontPath set to:\n    /usr/share/fonts/X11/misc,\n    /usr/share/fonts/X11/Type1,\n    built-ins\n[    44.103] (==) ModulePath set to "/usr/lib/xorg/modules"\n[    44.103] (II) The server relies on udev to provide the list of input devices.\n    If no devices become available, reconfigure udev or disable AutoAddDevices.\n[    44.103] (II) Loader magic: 0x557171c1d020\n[    44.103] (II) Module ABI versions:\n[    44.103]    X.Org ANSI C Emulation: 0.4\n[    44.103]    X.Org Video Driver: 23.0\n[    44.103]    X.Org XInput driver : 24.1\n[    44.103]    X.Org Server Extension : 10.0\n[    44.104] (++) using VT number 7\n\n[    44.104] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration\n[    44.104] (II) xfree86: Adding drm device (/dev/dri/card0)\n[    44.124] (--) PCI:*(0:0:2:0) 8086:0122:8086:2111 rev 9, Mem @ 0xf7800000/4194304, 0xe0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072\n[    44.124] (II) LoadModule: "glx"\n[    44.144] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so\n[    44.271] (II) Module glx: vendor="X.Org Foundation"\n[    44.271]    compiled for 1.19.6, module version = 1.0.0\n[    44.271]    ABI class: X.Org Server Extension, version 10.0\n[    44.271] (II) LoadModule: "intel"\n[    44.271] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so\n[    44.346] (II) Module intel: vendor="X.Org Foundation"\n[    44.346]    compiled for 1.19.5, module version = 2.99.917\n[    44.346]    Module class: X.Org Video Driver\n[    44.346]    ABI class: X.Org Video Driver, version 23.0\n[    44.346] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:\n    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,\n    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,\n    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,\n    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43\n[    44.346] (II) intel: Driver for Intel(R) HD Graphics\n[    44.346] (II) intel: Driver for Intel(R) Iris(TM) Graphics\n[    44.346] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics\n[    44.368] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20171023\n[    44.368] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20171229-1 (Timo Aaltonen <tjaalton@debian.org>)\n[    44.368] (II) intel(0): SNA compiled for use with valgrind\n[    44.379] (II) intel(1): Using Kernel Mode Setting driver: i915, version 1.6.0 20171023\n[    44.379] (II) intel(1): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20171229-1 (Timo Aaltonen <tjaalton@debian.org>)\n[    44.379] (II) intel(1): SNA compiled for use with valgrind\n[    44.379] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 3000\n[    44.379] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx; using a maximum of 4 threads\n[    44.379] (**) intel(0): Depth 24, (--) framebuffer bpp 32\n[    44.379] (==) intel(0): RGB weight 888\n[    44.379] (==) intel(0): Default visual is TrueColor\n[    44.379] (**) intel(0): Option "AccelMethod" "sna"\n[    44.379] (**) intel(0): Option "ZaphodHeads" "HDMI-1"\n[    44.380] (--) intel(0): Using a maximum size of 256x256 for hardware cursors\n[    44.380] (II) intel(0): Output VIRTUAL1 using monitor section MonitorR\n[    44.380] (II) intel(0): Enabled output VIRTUAL1\n[    44.380] (II) intel(0): EDID for output VIRTUAL1\n[    44.380] (II) intel(0): Output VIRTUAL1 disconnected\n[    44.380] (WW) intel(0): No outputs definitely connected, trying again...\n[    44.380] (II) intel(0): Output VIRTUAL1 disconnected\n[    44.380] (WW) intel(0): Unable to find connected outputs - setting 1024x768 initial framebuffer\n[    44.380] (==) intel(0): TearFree disabled\n[    44.380] (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)\n[    44.380] (==) intel(0): DPI set to (96, 96)\n[    44.380] (II) Loading sub module "dri3"\n[    44.380] (II) LoadModule: "dri3"\n[    44.380] (II) Module "dri3" already built-in\n[    44.380] (II) Loading sub module "dri2"\n[    44.380] (II) LoadModule: "dri2"\n[    44.380] (II) Module "dri2" already built-in\n[    44.380] (II) Loading sub module "present"\n[    44.380] (II) LoadModule: "present"\n[    44.380] (II) Module "present" already built-in\n[    44.380] (--) intel(1): Integrated Graphics Chipset: Intel(R) HD Graphics 3000\n[    44.380] (--) intel(1): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx; using a maximum of 4 threads\n[    44.380] (**) intel(1): Depth 24, (--) framebuffer bpp 32\n[    44.380] (==) intel(1): RGB weight 888\n[    44.380] (==) intel(1): Default visual is TrueColor\n[    44.380] (**) intel(1): Option "AccelMethod" "sna"\n[    44.380] (**) intel(1): Option "ZaphodHeads" "VGA-1"\n[    44.380] (--) intel(1): Using a maximum size of 256x256 for hardware cursors\n[    44.380] (II) intel(1): Output VIRTUAL1 using monitor section MonitorE\n[    44.381] (**) intel(1): Option "Rotate" "right"\n[    44.381] (II) intel(1): Enabled output VIRTUAL1\n[    44.381] (II) intel(1): EDID for output VIRTUAL1\n[    44.381] (II) intel(1): Output VIRTUAL1 disconnected\n[    44.381] (WW) intel(1): No outputs definitely connected, trying again...\n[    44.381] (II) intel(1): Output VIRTUAL1 disconnected\n[    44.381] (WW) intel(1): Unable to find connected outputs - setting 1024x768 initial framebuffer\n[    44.381] (==) intel(1): TearFree disabled\n[    44.381] (==) intel(1): Using gamma correction (1.0, 1.0, 1.0)\n[    44.381] (==) intel(1): DPI set to (96, 96)\n[    44.381] (II) Loading sub module "dri3"\n[    44.381] (II) LoadModule: "dri3"\n[    44.381] (II) Module "dri3" already built-in\n[    44.381] (II) Loading sub module "dri2"\n[    44.381] (II) LoadModule: "dri2"\n[    44.381] (II) Module "dri2" already built-in\n[    44.381] (II) Loading sub module "present"\n[    44.381] (II) LoadModule: "present"\n[    44.381] (II) Module "present" already built-in\n[    44.381] (==) Depth 24 pixmap format is 32 bpp\n[    44.434] (II) intel(0): SNA initialized with Sandybridge (gen6, gt2) backend\n[    44.434] (==) intel(0): Backing store enabled\n[    44.434] (==) intel(0): Silken mouse enabled\n[    44.434] (II) intel(0): HW Cursor enabled\n[    44.434] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.\n[    44.434] (==) intel(0): DPMS enabled\n[    44.434] (==) intel(0): Display hotplug detection enabled\n[    44.434] (II) intel(0): [DRI2] Setup complete\n[    44.434] (II) intel(0): [DRI2]   DRI driver: i965\n[    44.434] (II) intel(0): [DRI2]   VDPAU driver: va_gl\n[    44.434] (II) intel(0): direct rendering: DRI2 enabled\n[    44.434] (II) intel(0): hardware support for Present enabled\n[    44.434] (--) RandR disabled\n[    44.434] (II) intel(1): SNA initialized with Sandybridge (gen6, gt2) backend\n[    44.434] (==) intel(1): Backing store enabled\n[    44.434] (==) intel(1): Silken mouse enabled\n[    44.434] (II) intel(1): HW Cursor enabled\n[    44.434] (II) intel(1): RandR 1.2 enabled, ignore the following RandR disabled message.\n[    44.434] (==) intel(1): DPMS enabled\n[    44.434] (==) intel(1): Display hotplug detection enabled\n[    44.434] (II) intel(1): [DRI2] Setup complete\n[    44.434] (II) intel(1): [DRI2]   DRI driver: i965\n[    44.434] (II) intel(1): [DRI2]   VDPAU driver: va_gl\n[    44.434] (II) intel(1): direct rendering: DRI2 enabled\n[    44.434] (II) intel(1): hardware support for Present enabled\n[    44.434] (WW) intel(1): Option "Rotate" is not used\n[    44.434] (--) RandR disabled\n[    44.463] (II) SELinux: Disabled on system\n[    44.749] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer\n[    44.749] (II) AIGLX: enabled GLX_ARB_create_context\n[    44.749] (II) AIGLX: enabled GLX_ARB_create_context_profile\n[    44.749] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile\n[    44.749] (II) AIGLX: enabled GLX_INTEL_swap_event\n[    44.749] (II) AIGLX: enabled GLX_SGI_swap_control\n[    44.749] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB\n[    44.749] (II) AIGLX: enabled GLX_ARB_fbconfig_float\n[    44.749] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float\n[    44.749] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n[    44.749] (II) AIGLX: enabled GLX_ARB_create_context_robustness\n[    44.749] (II) AIGLX: Loaded and initialized i965\n[    44.749] (II) GLX: Initialized DRI2 GL provider for screen 0\n[    44.757] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer\n[    44.757] (II) AIGLX: enabled GLX_ARB_create_context\n[    44.757] (II) AIGLX: enabled GLX_ARB_create_context_profile\n[    44.757] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile\n[    44.757] (II) AIGLX: enabled GLX_INTEL_swap_event\n[    44.757] (II) AIGLX: enabled GLX_SGI_swap_control\n[    44.757] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB\n[    44.757] (II) AIGLX: enabled GLX_ARB_fbconfig_float\n[    44.757] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float\n[    44.757] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n[    44.757] (II) AIGLX: enabled GLX_ARB_create_context_robustness\n[    44.757] (II) AIGLX: Loaded and initialized i965\n[    44.757] (II) GLX: Initialized DRI2 GL provider for screen 1\n[    45.054] (II) config/udev: Adding input device Power Button (/dev/input/event1)\n[    45.054] (**) Power Button: Applying InputClass "libinput keyboard catchall"\n[    45.054] (II) LoadModule: "libinput"\n[    45.054] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so\n[    45.095] (II) Module libinput: vendor="X.Org Foundation"\n[    45.095]    compiled for 1.19.6, module version = 0.27.1\n[    45.095]    Module class: X.Org XInput Driver\n[    45.095]    ABI class: X.Org XInput driver, version 24.1\n[    45.095] (II) Using input driver \'libinput\' for \'Power Button\'\n[    45.095] (**) Power Button: always reports core events\n[    45.095] (**) Option "Device" "/dev/input/event1"\n[    45.095] (**) Option "_source" "server/udev"\n[    45.095] (II) event1  - Power Button: is tagged by udev as: Keyboard\n[    45.095] (II) event1  - Power Button: device is a keyboard\n[    45.095] (II) event1  - Power Button: device removed\n[    45.108] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1"\n[    45.108] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)\n[    45.108] (**) Option "xkb_model" "pc105"\n[    45.108] (**) Option "xkb_layout" "us"\n[    45.108] (II) event1  - Power Button: is tagged by udev as: Keyboard\n[    45.108] (II) event1  - Power Button: device is a keyboard\n[    45.109] (II) config/udev: Adding input device Video Bus (/dev/input/event2)\n[    45.109] (**) Video Bus: Applying InputClass "libinput keyboard catchall"\n[    45.109] (II) Using input driver \'libinput\' for \'Video Bus\'\n[    45.109] (**) Video Bus: always reports core events\n[    45.109] (**) Option "Device" "/dev/input/event2"\n[    45.109] (**) Option "_source" "server/udev"\n[    45.109] (II) event2  - Video Bus: is tagged by udev as: Keyboard\n[    45.109] (II) event2  - Video Bus: device is a keyboard\n[    45.109] (II) event2  - Video Bus: device removed\n[    45.124] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input2/event2"\n[    45.124] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)\n[    45.124] (**) Option "xkb_model" "pc105"\n[    45.124] (**) Option "xkb_layout" "us"\n[    45.124] (II) event2  - Video Bus: is tagged by udev as: Keyboard\n[    45.124] (II) event2  - Video Bus: device is a keyboard\n[    45.125] (II) config/udev: Adding input device Power Button (/dev/input/event0)\n[    45.125] (**) Power Button: Applying InputClass "libinput keyboard catchall"\n[    45.125] (II) Using input driver \'libinput\' for \'Power Button\'\n[    45.125] (**) Power Button: always reports core events\n[    45.125] (**) Option "Device" "/dev/input/event0"\n[    45.125] (**) Option "_source" "server/udev"\n[    45.126] (II) event0  - Power Button: is tagged by udev as: Keyboard\n[    45.126] (II) event0  - Power Button: device is a keyboard\n[    45.126] (II) event0  - Power Button: device removed\n[    45.140] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0/event0"\n[    45.140] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)\n[    45.140] (**) Option "xkb_model" "pc105"\

Ste*_*und 0

你们有startx/xinit作为单一程序吗?

\n

杀死 LightDM,阅读 man\xe2\x80\xafpage xinit,然后我\xc2\xa0认为你应该\n能够做你想做的事(不,\xc2\xa0I\xc2\xa0不认为 LightDM 是为了支持这个而编写的用法。)

\n

它可能包括编写定制的xorg.conf.

\n