Touchscreen issue

Hi -
for clarity i am a Linux new user
Today I installed Garuda Dragon onto an older Lenova Yoga with touchscreen. All works well as far as i can tell when i am in laptop mode however when i connect with HDMI to my Samsung UHD monitor and then try to use touchscreen on the Lenovo, the focus goes directly to the monitor screen - and moving my finger on the screen of the lenovo moves and controls the cursor on the monitor although its a bit erratic- no way to get focus back to the Lenovo without using the Enovo trackpad or external mouse. its as though the lenovo screen was acting like a large touchpad/mouse. I looked in the settings but there doesn't appear to be anything specific to prevent this from occurring on dual screen.

i realise i am completely new to the Linux environments so perhaps i missed something obvious.

Thanks
Mark

Try this article.
I also have a touchscreen laptop, but I was too lazy (and a little busy) to properly configure my multihead setup.
I may give a try though...


It worked for me:

  • Get monitor Xorg names (eDP is my touch monitor)
xrandr | grep -w connected
eDP connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
HDMI-A-0 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 160mm x 90mm

  • Get xinput touch input actions/events names (with Wacom in name)
xinput --list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB Laser Mouse                  id=9    [slave  pointer  (2)]
⎜   ↳ SYN3000:00 06CB:7F28 Mouse                id=14   [slave  pointer  (2)]
⎜   ↳ SYN3000:00 06CB:7F28 Touchpad             id=15   [slave  pointer  (2)]
⎜   ↳ Wacom HID 51C7 Pen stylus                 id=12   [slave  pointer  (2)]
⎜   ↳ Wacom HID 51C7 Pen eraser                 id=17   [slave  pointer  (2)]
⎜   ↳ Wacom HID 51C7 Finger touch               id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=16   [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=10   [slave  keyboard (3)]
  • Assign touch functions to touchscreen monitor
xinput --map-to-output  'Wacom HID 51C7 Finger touch' eDP
xinput --map-to-output  'Wacom HID 51C7 Pen eraser' eDP
xinput --map-to-output  'Wacom HID 51C7 Pen stylus' eDP

Fixed!
Before this, my touchscreen was sending actions to both laptop and external monitor (left half to laptop, right half to external).
Now it works only on laptop, like normal.


You may use a script with the last set of commands (xinput --map-to-output) and run manually when adding external monitor, or use a udev rule, as explained in Archwiki.

3 Likes