5

Below is our xorg.conf file for dualhead monitor configuration. We need to map keyboard and mouse to specific screen only as another screen is for video playback. With provided configuration mouse is mapped correctly despite of explicit indication. Keyboard also is mapped correctly. However after some time it switches to another screen. Is there a way to explicitly map keyboard and mouse input to a specific screen only?

Section "ServerLayout"
    Identifier     "Layout1"
    Screen         0 "Screen0" 0 0
    Screen         1 "Screen1" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime"     "0"
    Option "BlankTime"   "0"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc/"
    FontPath     "/usr/share/fonts/TTF/"
    FontPath     "/usr/share/fonts/OTF/"
EndSection

Section "Module"
    Load  "glx"
EndSection

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

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

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Touchscreen"
    Option       "DPMS"  "false"
EndSection

Section "Monitor"
    Identifier   "Monitor1"
    VendorName   "Monitor Vendor"
    ModelName    "No touchscreen"
    Option       "DPMS"  "false"
EndSection

Section "Device"
    Identifier  "Card1"
    Driver      "modesetting"
    Option      "ZaphodHeads" "VGA-1"
    BusID       "PCI:0:2:0"
    Screen      1
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "modesetting"
    Option      "ZaphodHeads" "HDMI-2"
    BusID       "PCI:0:2:0"
    Screen      0
EndSection

Section "Screen"
    Identifier "Screen1"
    Device     "Card1"
    Monitor    "Monitor1"
    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 "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
5
  • Any idea how to attach different inputs for different monitors? I am having similar issue myself Commented Nov 1, 2017 at 12:26
  • Take look here superuser.com/questions/485510/…. To attach different input for different monitors look for Xorg multiseat.
    – nobody
    Commented Jun 6, 2022 at 10:28
  • Wouldn't it be the straight forward solution to start separate X sessions for both monitors/input devices? Just like in the old days<TM>?
    – Philippos
    Commented Jun 9, 2022 at 9:22
  • @Philippos Is it possible to run two Xorg sessions on a single device?
    – Omid N
    Commented Jun 11, 2022 at 8:06
  • Of course. When I was younger, it was common to have a couple of »terminals« connected to the same UNIX machine, each one running a separate X session for their own screen and keyboard.
    – Philippos
    Commented Jun 20, 2022 at 4:30

0

You must log in to answer this question.

Browse other questions tagged .