什么可能阻止鼠标在xrandr屏幕之间移动?

我按照这个教程中的步骤进行操作。

在我登录到Gnome后,我可以将鼠标来回移动,但是一旦任务栏加载完成,鼠标就被限制在当前屏幕上(无法在屏幕之间移动)。

这是我的xorg.conf文件:

 Section "ServerLayout"
            Identifier     "Layout0"
            Screen      0  "DisplayLinkScreen" 0 0
            Screen   1  "Screen0" LeftOf "DisplayLinkScreen"
            InputDevice    "Keyboard0" "CoreKeyboard"
            InputDevice    "Mouse0" "CorePointer"
            Option     "Xinerama" "0" #Could not get this to work it has to be disable
EndSection

Section "Files"
 ModulePath   "/usr/local/lib/xorg/modules/drivers"
 ModulePath      "/usr/lib/xorg/modules/drivers"
 ModulePath      "/usr/local/lib"

 ModulePath   "/usr/lib/xorg/modules"
 FontPath     "/usr/share/fonts/X11/misc"
 FontPath     "/usr/share/fonts/X11/cyrillic"
 FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
 FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
 FontPath     "/usr/share/fonts/X11/Type1"
 FontPath     "/usr/share/fonts/X11/100dpi"
 FontPath     "/usr/share/fonts/X11/75dpi"
 FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
 FontPath     "built-ins"
EndSection

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

Section "InputDevice"
 Identifier  "Keyboard0"
 Driver      "kbd"
EndSection

Section "InputDevice"
 Identifier  "Mouse0"
 Driver      "mouse"
 Option     "Protocol" "auto"
 Option      "Device" "/dev/psaux" 
 # Option     "Device" "/dev/input/mice"
 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     "NoAccel"             # [<bool>]
        #Option     "SWcursor"            # [<bool>]
        #Option     "ColorKey"            # <i>
        #Option     "CacheLines"          # <i>
        #Option     "Dac6Bit"             # [<bool>]
        #Option     "DRI"                 # [<bool>]
        #Option     "NoDDC"               # [<bool>]
        #Option     "ShowCache"           # [<bool>]
        #Option     "XvMCSurfaces"        # <i>
        #Option     "PageFlip"            # [<bool>]
 Identifier  "Card0"
 Driver      "intel"
 VendorName  "Intel Corporation"
 BoardName   "Core Processor Integrated Graphics Controller"
 BusID       "PCI:0:2:0"
 Option     "DPMS"
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

Section "Monitor"
    Identifier     "DisplayLinkMonitor"
EndSection
Section "Device"
    Identifier  "DisplayLinkDevice"
    Driver  "displaylink"
    Option   "fbdev" "/dev/fb0"
EndSection
Section "Screen"
    Identifier      "DisplayLinkScreen"
    Device          "DisplayLinkDevice"
    Monitor         "DisplayLinkMonitor"
    SubSection "Display"
        Depth       24
        Modes       "1920x1200" "1920x1080" "1680x1050" "1600x1200" "1440x900" "1366x768" "1280x1024" "1280x960" "1280x800"  "1280x768"  "1152x864" "1024x768" "800x600" "640x480" 
    EndSubSection
EndSection

任何帮助都将不胜感激。我离让这个工作成功如此之近!

@Tim祝你好运,我的朋友。我还没能让它工作起来。希望驱动之神会眷顾你。 - Tyler
3个回答

我个人的猜测是右屏幕的位置导致了这些问题。你可以尝试像这样修改ServerLayout部分:

Section "ServerLayout"
        Identifier     "Layout0"
        Screen         0 "Screen0" 0 0
        Screen         1 "DisplayLinkScreen" RightOf "Screen0"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "0"
EndSection

或者,如果你真的希望DisplayLinkScreen成为主屏幕,那么修改它的坐标,使其与Screen0的分辨率匹配。例如,Screen0的分辨率是1900x1200。
Section "ServerLayout"
        Identifier     "Layout0"
        Screen         0  "DisplayLinkScreen" 1900 0
        Screen         1  "Screen0" LeftOf "DisplayLinkScreen"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "0"
EndSection

问题的另一个可能位置可能在 Gnome 启动时加载的 RandR 配置中。您可以通过删除 ~/.config/monitors.xml 来完全重置 RandR 配置。


我找到了一个工具这里,可以自动将鼠标在分开的屏幕之间切换。
当我在屏幕之间移动鼠标时遇到困难时,它对我很有帮助。

你有两个不同的图形设备,一个带有-intel,一个带有-displayport,并且想要将它们拼接在一起,以便鼠标可以在它们之间无缝移动。Xinerama是用于拼接多个屏幕的工具,所以你需要启用它。
然而,-intel的Xinerama模式并不是很好支持(尽管应该会越来越好)。也许你运气好的话,它能够正常工作,但据我所知,这并不被期望能够实现。
如果你使用-nvidia专有二进制驱动程序,可能可以使其正常工作。