一台设备上有双 X 屏幕

一台设备上有双 X 屏幕

我使用的是 Ubuntu MATE 18.04。

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

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

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

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

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

  • 我该如何设置它?

我正在遵循本指南:

  1. Linux Multihead – 一张显卡上有更多屏幕

  2. Ubuntu 中采用 Intel HD 显卡的双屏设置(在询问 Ubuntu)

  3. Xorg:独立模式(在 Unix 和 Linux 上)

  4. 在一张卡上配置多个 X 屏幕 (在 nvidia.com)(这没有提到 ZaphodHeads)

它接缝我想要的是所谓的 ZaphodHeads – 同一设备的多个屏幕。

然而,我得到的结果是 2 个空白屏幕,只有文本光标位于左上角。

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

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

我的配置:

Xrandr

$ xrandr

VGA-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 
60.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 

HDMI-1 connected primary 2560x1080+0+0 (normal left inverted right x axis y axis) 673mm x 284mm    2560x1080     60.00*+    1920x1080    
60.00    50.00    59.94      1920x1080i    60.00    50.00    59.94      1680x1050     59.88      1600x900      60.00      1280x1024     75.02 
60.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)

PCI设备:

$ lspci | grep -i vga | cut -d " " -f 1 

00:02.0

Xorg.conf

$ cat /etc/X11/xorg.conf

Section "ServerLayout"
    Identifier     "LayoutDual"
    Screen      0  "ScreenR" 0 0
    Screen      1  "ScreenE" RightOf "ScreenR" EndSection

Section "ServerFlags"
    Option      "DefaultServerLayout" "LayoutDual" EndSection

Section "device"
    Identifier "IntelR"
    Driver     "intel"
    Option     "AccelMethod"    "sna"
    Screen     0
    BusId      "PCI:0:2:0"
    Option     "ZaphodHeads"    "HDMI-1"
    #Option     "NoAccel" "true" EndSection

Section "device"
    Identifier "IntelE"
    Driver     "intel"
    Option     "AccelMethod"    "sna"
    Screen     1
    BusId      "PCI:0:2:0"
    Option     "ZaphodHeads"   "VGA-1"
#    Option     "NoAccel" "true" EndSection

Section "Monitor"
    Identifier   "MonitorE"
    VendorName   "Vendor"
    ModelName    "Model"
    Option       "Rotate" "right" EndSection

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


Section "Screen"
    Identifier "ScreenE"
    Device     "IntelE"
    Monitor    "MonitorE"
    Option     "Rotate" "right"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
    EndSubSection EndSection

Section "Screen"
    Identifier "ScreenR"
    Device     "IntelR"
    Monitor    "MonitorR"
    DefaultDepth     24
#   Option      "DPI" "96 x 96"
    SubSection "Display"
        Depth     24
        Modes "2048x2048"
    EndSubSection EndSection

Xorg log

$ cat /var/log/Xorg.0.log

[    44.028] X Protocol Version 11, Revision 0
[    44.028] Build Operating System: Linux 4.4.0-138-generic x86_64 Ubuntu
[    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
[    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
[    44.028] Build Date: 25 October 2018  04:11:27PM
[    44.028] xorg-server 2:1.19.6-1ubuntu4.2 (For technical support please see http://www.ubuntu.com/support) 
[    44.028] Current version of pixman: 0.34.0
[    44.028]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    44.028] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    44.028] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Feb 26 19:59:18 2020
[    44.043] (==) Using config file: "/etc/X11/xorg.conf"
[    44.043] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    44.091] (**) Option "defaultserverlayout" "LayoutDual"
[    44.091] (**) ServerLayout "LayoutDual"
[    44.091] (**) |-->Screen "ScreenR" (0)
[    44.091] (**) |   |-->Monitor "MonitorR"
[    44.091] (**) |   |-->Device "IntelR"
[    44.091] (**) |-->Screen "ScreenE" (1)
[    44.091] (**) |   |-->Monitor "MonitorE"
[    44.091] (**) |   |-->Device "IntelE"
[    44.091] (==) Automatically adding devices
[    44.091] (==) Automatically enabling devices
[    44.091] (==) Automatically adding GPU devices
[    44.091] (==) Automatically binding GPU devices
[    44.091] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    44.103] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    44.103]    Entry deleted from font path.
[    44.103] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    44.103]    Entry deleted from font path.
[    44.103] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    44.103]    Entry deleted from font path.
[    44.103] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    44.103]    Entry deleted from font path.
[    44.103] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    44.103]    Entry deleted from font path.
[    44.103] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[    44.103] (==) ModulePath set to "/usr/lib/xorg/modules"
[    44.103] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    44.103] (II) Loader magic: 0x557171c1d020
[    44.103] (II) Module ABI versions:
[    44.103]    X.Org ANSI C Emulation: 0.4
[    44.103]    X.Org Video Driver: 23.0
[    44.103]    X.Org XInput driver : 24.1
[    44.103]    X.Org Server Extension : 10.0
[    44.104] (++) using VT number 7

[    44.104] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    44.104] (II) xfree86: Adding drm device (/dev/dri/card0)
[    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
[    44.124] (II) LoadModule: "glx"
[    44.144] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    44.271] (II) Module glx: vendor="X.Org Foundation"
[    44.271]    compiled for 1.19.6, module version = 1.0.0
[    44.271]    ABI class: X.Org Server Extension, version 10.0
[    44.271] (II) LoadModule: "intel"
[    44.271] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[    44.346] (II) Module intel: vendor="X.Org Foundation"
[    44.346]    compiled for 1.19.5, module version = 2.99.917
[    44.346]    Module class: X.Org Video Driver
[    44.346]    ABI class: X.Org Video Driver, version 23.0
[    44.346] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    44.346] (II) intel: Driver for Intel(R) HD Graphics
[    44.346] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    44.346] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    44.368] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20171023
[    44.368] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20171229-1 (Timo Aaltonen <[email protected]>)
[    44.368] (II) intel(0): SNA compiled for use with valgrind
[    44.379] (II) intel(1): Using Kernel Mode Setting driver: i915, version 1.6.0 20171023
[    44.379] (II) intel(1): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20171229-1 (Timo Aaltonen <[email protected]>)
[    44.379] (II) intel(1): SNA compiled for use with valgrind
[    44.379] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 3000
[    44.379] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx; using a maximum of 4 threads
[    44.379] (**) intel(0): Depth 24, (--) framebuffer bpp 32
[    44.379] (==) intel(0): RGB weight 888
[    44.379] (==) intel(0): Default visual is TrueColor
[    44.379] (**) intel(0): Option "AccelMethod" "sna"
[    44.379] (**) intel(0): Option "ZaphodHeads" "HDMI-1"
[    44.380] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[    44.380] (II) intel(0): Output VIRTUAL1 using monitor section MonitorR
[    44.380] (II) intel(0): Enabled output VIRTUAL1
[    44.380] (II) intel(0): EDID for output VIRTUAL1
[    44.380] (II) intel(0): Output VIRTUAL1 disconnected
[    44.380] (WW) intel(0): No outputs definitely connected, trying again...
[    44.380] (II) intel(0): Output VIRTUAL1 disconnected
[    44.380] (WW) intel(0): Unable to find connected outputs - setting 1024x768 initial framebuffer
[    44.380] (==) intel(0): TearFree disabled
[    44.380] (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
[    44.380] (==) intel(0): DPI set to (96, 96)
[    44.380] (II) Loading sub module "dri3"
[    44.380] (II) LoadModule: "dri3"
[    44.380] (II) Module "dri3" already built-in
[    44.380] (II) Loading sub module "dri2"
[    44.380] (II) LoadModule: "dri2"
[    44.380] (II) Module "dri2" already built-in
[    44.380] (II) Loading sub module "present"
[    44.380] (II) LoadModule: "present"
[    44.380] (II) Module "present" already built-in
[    44.380] (--) intel(1): Integrated Graphics Chipset: Intel(R) HD Graphics 3000
[    44.380] (--) intel(1): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx; using a maximum of 4 threads
[    44.380] (**) intel(1): Depth 24, (--) framebuffer bpp 32
[    44.380] (==) intel(1): RGB weight 888
[    44.380] (==) intel(1): Default visual is TrueColor
[    44.380] (**) intel(1): Option "AccelMethod" "sna"
[    44.380] (**) intel(1): Option "ZaphodHeads" "VGA-1"
[    44.380] (--) intel(1): Using a maximum size of 256x256 for hardware cursors
[    44.380] (II) intel(1): Output VIRTUAL1 using monitor section MonitorE
[    44.381] (**) intel(1): Option "Rotate" "right"
[    44.381] (II) intel(1): Enabled output VIRTUAL1
[    44.381] (II) intel(1): EDID for output VIRTUAL1
[    44.381] (II) intel(1): Output VIRTUAL1 disconnected
[    44.381] (WW) intel(1): No outputs definitely connected, trying again...
[    44.381] (II) intel(1): Output VIRTUAL1 disconnected
[    44.381] (WW) intel(1): Unable to find connected outputs - setting 1024x768 initial framebuffer
[    44.381] (==) intel(1): TearFree disabled
[    44.381] (==) intel(1): Using gamma correction (1.0, 1.0, 1.0)
[    44.381] (==) intel(1): DPI set to (96, 96)
[    44.381] (II) Loading sub module "dri3"
[    44.381] (II) LoadModule: "dri3"
[    44.381] (II) Module "dri3" already built-in
[    44.381] (II) Loading sub module "dri2"
[    44.381] (II) LoadModule: "dri2"
[    44.381] (II) Module "dri2" already built-in
[    44.381] (II) Loading sub module "present"
[    44.381] (II) LoadModule: "present"
[    44.381] (II) Module "present" already built-in
[    44.381] (==) Depth 24 pixmap format is 32 bpp
[    44.434] (II) intel(0): SNA initialized with Sandybridge (gen6, gt2) backend
[    44.434] (==) intel(0): Backing store enabled
[    44.434] (==) intel(0): Silken mouse enabled
[    44.434] (II) intel(0): HW Cursor enabled
[    44.434] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    44.434] (==) intel(0): DPMS enabled
[    44.434] (==) intel(0): Display hotplug detection enabled
[    44.434] (II) intel(0): [DRI2] Setup complete
[    44.434] (II) intel(0): [DRI2]   DRI driver: i965
[    44.434] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[    44.434] (II) intel(0): direct rendering: DRI2 enabled
[    44.434] (II) intel(0): hardware support for Present enabled
[    44.434] (--) RandR disabled
[    44.434] (II) intel(1): SNA initialized with Sandybridge (gen6, gt2) backend
[    44.434] (==) intel(1): Backing store enabled
[    44.434] (==) intel(1): Silken mouse enabled
[    44.434] (II) intel(1): HW Cursor enabled
[    44.434] (II) intel(1): RandR 1.2 enabled, ignore the following RandR disabled message.
[    44.434] (==) intel(1): DPMS enabled
[    44.434] (==) intel(1): Display hotplug detection enabled
[    44.434] (II) intel(1): [DRI2] Setup complete
[    44.434] (II) intel(1): [DRI2]   DRI driver: i965
[    44.434] (II) intel(1): [DRI2]   VDPAU driver: va_gl
[    44.434] (II) intel(1): direct rendering: DRI2 enabled
[    44.434] (II) intel(1): hardware support for Present enabled
[    44.434] (WW) intel(1): Option "Rotate" is not used
[    44.434] (--) RandR disabled
[    44.463] (II) SELinux: Disabled on system
[    44.749] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[    44.749] (II) AIGLX: enabled GLX_ARB_create_context
[    44.749] (II) AIGLX: enabled GLX_ARB_create_context_profile
[    44.749] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[    44.749] (II) AIGLX: enabled GLX_INTEL_swap_event
[    44.749] (II) AIGLX: enabled GLX_SGI_swap_control
[    44.749] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[    44.749] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[    44.749] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[    44.749] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[    44.749] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[    44.749] (II) AIGLX: Loaded and initialized i965
[    44.749] (II) GLX: Initialized DRI2 GL provider for screen 0
[    44.757] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[    44.757] (II) AIGLX: enabled GLX_ARB_create_context
[    44.757] (II) AIGLX: enabled GLX_ARB_create_context_profile
[    44.757] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[    44.757] (II) AIGLX: enabled GLX_INTEL_swap_event
[    44.757] (II) AIGLX: enabled GLX_SGI_swap_control
[    44.757] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[    44.757] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[    44.757] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[    44.757] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[    44.757] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[    44.757] (II) AIGLX: Loaded and initialized i965
[    44.757] (II) GLX: Initialized DRI2 GL provider for screen 1
[    45.054] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[    45.054] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[    45.054] (II) LoadModule: "libinput"
[    45.054] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[    45.095] (II) Module libinput: vendor="X.Org Foundation"
[    45.095]    compiled for 1.19.6, module version = 0.27.1
[    45.095]    Module class: X.Org XInput Driver
[    45.095]    ABI class: X.Org XInput driver, version 24.1
[    45.095] (II) Using input driver 'libinput' for 'Power Button'
[    45.095] (**) Power Button: always reports core events
[    45.095] (**) Option "Device" "/dev/input/event1"
[    45.095] (**) Option "_source" "server/udev"
[    45.095] (II) event1  - Power Button: is tagged by udev as: Keyboard
[    45.095] (II) event1  - Power Button: device is a keyboard
[    45.095] (II) event1  - Power Button: device removed
[    45.108] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1"
[    45.108] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[    45.108] (**) Option "xkb_model" "pc105"
[    45.108] (**) Option "xkb_layout" "us"
[    45.108] (II) event1  - Power Button: is tagged by udev as: Keyboard
[    45.108] (II) event1  - Power Button: device is a keyboard
[    45.109] (II) config/udev: Adding input device Video Bus (/dev/input/event2)
[    45.109] (**) Video Bus: Applying InputClass "libinput keyboard catchall"
[    45.109] (II) Using input driver 'libinput' for 'Video Bus'
[    45.109] (**) Video Bus: always reports core events
[    45.109] (**) Option "Device" "/dev/input/event2"
[    45.109] (**) Option "_source" "server/udev"
[    45.109] (II) event2  - Video Bus: is tagged by udev as: Keyboard
[    45.109] (II) event2  - Video Bus: device is a keyboard
[    45.109] (II) event2  - Video Bus: device removed
[    45.124] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input2/event2"
[    45.124] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)
[    45.124] (**) Option "xkb_model" "pc105"
[    45.124] (**) Option "xkb_layout" "us"
[    45.124] (II) event2  - Video Bus: is tagged by udev as: Keyboard
[    45.124] (II) event2  - Video Bus: device is a keyboard
[    45.125] (II) config/udev: Adding input device Power Button (/dev/input/event0)
[    45.125] (**) Power Button: Applying InputClass "libinput keyboard catchall"
[    45.125] (II) Using input driver 'libinput' for 'Power Button'
[    45.125] (**) Power Button: always reports core events
[    45.125] (**) Option "Device" "/dev/input/event0"
[    45.125] (**) Option "_source" "server/udev"
[    45.126] (II) event0  - Power Button: is tagged by udev as: Keyboard
[    45.126] (II) event0  - Power Button: device is a keyboard
[    45.126] (II) event0  - Power Button: device removed
[    45.140] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0/event0"
[    45.140] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 8)
[    45.140] (**) Option "xkb_model" "pc105"
[    45.140] (**) Option "xkb_layout" "us"
[    45.141] (II) event0  - Power Button: is tagged by udev as: Keyboard
[    45.141] (II) event0  - Power Button: device is a keyboard
[    45.142] (II) config/udev: Adding input device UC02 UC02 (/dev/input/event3)
[    45.142] (**) UC02 UC02: Applying InputClass "libinput keyboard catchall"
[    45.142] (II) Using input driver 'libinput' for 'UC02 UC02'
[    45.142] (**) UC02 UC02: always reports core events
[    45.142] (**) Option "Device" "/dev/input/event3"
[    45.142] (**) Option "_source" "server/udev"
[    45.143] (II) event3  - UC02 UC02: is tagged by udev as: Keyboard
[    45.143] (II) event3  - UC02 UC02: device is a keyboard
[    45.143] (II) event3  - UC02 UC02: device removed
[    45.156] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.3/0003:0000:0000.0001/input/input3/event3"
[    45.156] (II) XINPUT: Adding extended input device "UC02 UC02" (type: KEYBOARD, id 9)
[    45.156] (**) Option "xkb_model" "pc105"
[    45.156] (**) Option "xkb_layout" "us"
[    45.157] (II) event3  - UC02 UC02: is tagged by udev as: Keyboard
[    45.157] (II) event3  - UC02 UC02: device is a keyboard
[    45.157] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event10)
[    45.157] (II) No input driver specified, ignoring this device.
[    45.157] (II) This device may have been added with another device file.
[    45.158] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event11)
[    45.158] (II) No input driver specified, ignoring this device.
[    45.158] (II) This device may have been added with another device file.
[    45.158] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event6)
[    45.158] (II) No input driver specified, ignoring this device.
[    45.158] (II) This device may have been added with another device file.
[    45.159] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event7)
[    45.159] (II) No input driver specified, ignoring this device.
[    45.159] (II) This device may have been added with another device file.
[    45.159] (II) config/udev: Adding input device HDA Intel PCH Line (/dev/input/event8)
[    45.160] (II) No input driver specified, ignoring this device.
[    45.160] (II) This device may have been added with another device file.
[    45.160] (II) config/udev: Adding input device HDA Intel PCH Line Out (/dev/input/event9)
[    45.160] (II) No input driver specified, ignoring this device.
[    45.160] (II) This device may have been added with another device file.
[    45.161] (II) config/udev: Adding input device Telink Wireless Receiver (/dev/input/event4)
[    45.161] (**) Telink Wireless Receiver: Applying InputClass "libinput pointer catchall"
[    45.161] (**) Telink Wireless Receiver: Applying InputClass "libinput keyboard catchall"
[    45.161] (II) Using input driver 'libinput' for 'Telink Wireless Receiver'
[    45.161] (**) Telink Wireless Receiver: always reports core events
[    45.161] (**) Option "Device" "/dev/input/event4"
[    45.161] (**) Option "_source" "server/udev"
[    45.162] (II) event4  - Telink Wireless Receiver: is tagged by udev as: Keyboard Mouse
[    45.162] (II) event4  - Telink Wireless Receiver: device is a pointer
[    45.162] (II) event4  - Telink Wireless Receiver: device is a keyboard
[    45.162] (II) event4  - Telink Wireless Receiver: device removed
[    45.180] (II) libinput: Telink Wireless Receiver: needs a virtual subdevice
[    45.180] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:248A:8367.0002/input/input4/event4"
[    45.180] (II) XINPUT: Adding extended input device "Telink Wireless Receiver" (type: MOUSE, id 10)
[    45.180] (**) Option "AccelerationScheme" "none"
[    45.180] (**) Telink Wireless Receiver: (accel) selected scheme none/0
[    45.180] (**) Telink Wireless Receiver: (accel) acceleration factor: 2.000
[    45.180] (**) Telink Wireless Receiver: (accel) acceleration threshold: 4
[    45.181] (II) event4  - Telink Wireless Receiver: is tagged by udev as: Keyboard Mouse
[    45.181] (II) event4  - Telink Wireless Receiver: device is a pointer
[    45.181] (II) event4  - Telink Wireless Receiver: device is a keyboard
[    45.182] (II) config/udev: Adding input device Telink Wireless Receiver (/dev/input/mouse0)
[    45.182] (II) No input driver specified, ignoring this device.
[    45.182] (II) This device may have been added with another device file.
[    45.183] (II) config/udev: Adding input device Telink Wireless Receiver (/dev/input/event5)
[    45.183] (**) Telink Wireless Receiver: Applying InputClass "libinput keyboard catchall"
[    45.183] (II) Using input driver 'libinput' for 'Telink Wireless Receiver'
[    45.183] (**) Telink Wireless Receiver: always reports core events
[    45.183] (**) Option "Device" "/dev/input/event5"
[    45.183] (**) Option "_source" "server/udev"
[    45.184] (II) event5  - Telink Wireless Receiver: is tagged by udev as: Keyboard
[    45.184] (II) event5  - Telink Wireless Receiver: device is a keyboard
[    45.184] (II) event5  - Telink Wireless Receiver: device removed
[    45.204] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.1/0003:248A:8367.0003/input/input5/event5"
[    45.204] (II) XINPUT: Adding extended input device "Telink Wireless Receiver" (type: KEYBOARD, id 11)
[    45.204] (**) Option "xkb_model" "pc105"
[    45.204] (**) Option "xkb_layout" "us"
[    45.205] (II) event5  - Telink Wireless Receiver: is tagged by udev as: Keyboard
[    45.205] (II) event5  - Telink Wireless Receiver: device is a keyboard
[    45.213] (**) Telink Wireless Receiver: Applying InputClass "libinput pointer catchall"
[    45.213] (**) Telink Wireless Receiver: Applying InputClass "libinput keyboard catchall"
[    45.213] (II) Using input driver 'libinput' for 'Telink Wireless Receiver'
[    45.213] (**) Telink Wireless Receiver: always reports core events
[    45.213] (**) Option "Device" "/dev/input/event4"
[    45.213] (**) Option "_source" "_driver/libinput"
[    45.213] (II) libinput: Telink Wireless Receiver: is a virtual subdevice
[    45.213] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:248A:8367.0002/input/input4/event4"
[    45.213] (II) XINPUT: Adding extended input device "Telink Wireless Receiver" (type: KEYBOARD, id 12)
[    45.213] (**) Option "xkb_model" "pc105"
[    45.213] (**) Option "xkb_layout" "us"

两个屏幕都是黑色的,光标位于左上角。

我需要配置 LightDM 才能接受此设置吗?

答案1

我对您想要的设置有很多经验。您必须制作自定义 xorg.conf。如果您有英特尔图形适配器 ZaphodHeads 就是您的方法。这是一个例子:

Section "ServerLayout"
    Identifier     "LayoutDual"
    Screen      0  "ScreenR" 0 0
    Screen      1  "ScreenE" RightOf "ScreenR"
EndSection

Section "ServerFlags"
    Option      "DefaultServerLayout" "LayoutDual"
EndSection

Section "device"
    Identifier "IntelR"
    Driver     "intel"
    #Option     "AccelMethod"    "sna"
    Screen     0
    BusId      "PCI:0:2:0"
    Option     "ZaphodHeads"    "eDP1"
    Option     "NoAccel" "true"
EndSection

Section "device"
    Identifier "IntelE"
    Driver     "intel"
    Screen     1
    BusId      "PCI:0:2:0"
    Option     "ZaphodHeads"   "HDMI2"
    Option     "NoAccel" "true"
EndSection

Section "Monitor"
    Identifier   "MonitorE"
    VendorName   "Vendor"
    ModelName    "Model"
    Option       "Rotate" "right"
EndSection

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


Section "Screen"
    Identifier "ScreenE"
    Device     "IntelE"
    Monitor    "MonitorE"
    Option     "Rotate" "right"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
    EndSubSection
EndSection

Section "Screen"
    Identifier "ScreenR"
    Device     "IntelR"
    Monitor    "MonitorR"
    DefaultDepth     24
#   Option      "DPI" "96 x 96"
    SubSection "Display"
        Depth     24
        Modes "2048x2048"
    EndSubSection
EndSection

输入lspci命令行以查看图形适配器连接的位置。它在 BusId 中定义。如果你有更多,这会非常有用。如果您只有一个,则它是可选的。键入xrandr,查看您的驱动程序可以识别哪些输出。示例中加速器被禁用。如果需要,您可以启用它们。您可以制作更多布局,然后指定将在DefaultServerLayout部分中使用的布局。

这是一个 NVidia 示例:

Section "ServerLayout"
    Identifier     "LayoutDual"
    Screen      0  "ScreenR" 0 0
    Screen      1  "ScreenL" LeftOf "ScreenR"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules/extensions/nvidia"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "unix/:7100"
EndSection

Section "Module"
    Load  "dbe"
    Load  "extmod"
    Load  "type1"
    Load  "freetype"
    Load  "glx"
EndSection

Section "ServerFlags"
    Option      "DefaultServerLayout" "LayoutDual"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "auto"
    Option      "Device" "/dev/input/mice"
    Option      "Emulate3Buttons" "no"
    Option      "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
    Option      "XkbLayout" "us"
    Option      "XkbModel" "pc105"
EndSection

Section "Monitor"
    Identifier   "MonitorL"
    VendorName   "Vendor"
    ModelName    "Model"
    HorizSync    20.0 - 120.0
    VertRefresh  30.0 - 120.0
EndSection

Section "Monitor"
    Identifier   "MonitorR"
    VendorName   "Vendor"
    ModelName    "Model"
    HorizSync    28.0 - 55.0
    VertRefresh  43.0 - 72.0
EndSection

Section "Device"
    Identifier  "DeviceL"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    BoardName   "Quadro FX 380"
    Option      "ConnectedMonitor" "DFP,CRT"
    Option      "UseDisplayDevice" "CRT-1"
    Option      "CustomEDID" "CRT-1:/etc/X11/ADP361.bin"
    BusID       "PCI:1:0:0"
    Screen      1
EndSection

Section "Device"
    Identifier  "DeviceR"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"
    BoardName   "Quadro FX 380"
    Option      "ConnectedMonitor" "DFP,DFP"
    Option      "UseDisplayDevice" "DFP-0"
    Option      "CustomEDID" "DFP-0:/etc/X11/ISIS.bin"
    BusID       "PCI:1:0:0"
    Screen      0
EndSection

Section "Screen"
    Identifier "ScreenL"
    Device     "DeviceL"
    Monitor    "MonitorL"
    DefaultDepth     24
    Option      "TwinView" "0"
    Option      "metamodes" "CRT-1: 1200x1920 +0+0"
    SubSection "Display"
            Depth     24
    EndSubSection
EndSection

Section "Screen"
    Identifier "ScreenR"
    Device     "DeviceR"
    Monitor    "MonitorR"
    DefaultDepth     24
    Option      "TwinView" "0"
    Option      "metamodes" "DFP-0: 2048x2048 +0+0"
    SubSection "Display"
            Depth     24
    EndSubSection
EndSection

答案2

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

杀死 LightDM,阅读其手册页xinit,然后我认为您应该能够做您想做的事情(不,我不认为 LightDM 是为了支持这种用法而编写的。)

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

答案3

我在使用 Xfce 的 Debian-11 上遇到了同样的问题(两个空白屏幕,只有光标)。我设法通过在 xorg.conf 中强制使用“模式设置”驱动程序(而不是 intel)来解决这个问题,如下所示

Section "Device"                                                                                                                                     
#   Identifier "Intel Graphics"
#   Driver     "intel"                                                                  
   Identifier "Modesetting"                                                                                                                
   Driver     "modesetting"
   Option "AccelMethod" "sna"                                                                                                                 
EndSection 

为什么它解决了我的问题?

我在 xorg.log 中发现的错误如下

xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)

通过谷歌搜索上述错误消息,我找到了

https://github.com/dnschneid/crouton/issues/2926

接受了一些提示并尝试了一下(尽管该页面处理完全不同的问题),瞧!有效。

相关内容