linux-surface / iptsd

Userspace daemon for Intel Precise Touch & Stylus
GNU General Public License v2.0
86 stars 39 forks source link

Multi Monitor Setup #155

Closed Tom-Finke closed 4 months ago

Tom-Finke commented 4 months ago

When connecting an external monitor, the stylus behaves as though both screens were one. Meaning when putting the stylus on the top right corner of the surface built in monitor the mouse moves to the top right of my external monitor. When moving the stylus to the bottom left of the built in monitor the mouse also moves to the bottom left of the built in monitor. Touch behaves the same way. When stopping IPTSD, touch behaves corretly, meaning touch top right moves mouse to top right of built in monitor instead of external monitor

How can I configure IPTSD to only use the built in monitor for poisitioning the mouse?

Environment

StollD commented 4 months ago

I can't reproduce this on KDE Plasma Wayland.

Are you using Wayland or Xorg? Mapping inputs to the correct screen isn't the responsibility of the driver (iptsd in this case), but the desktop environment. I know that Xorg internally represents multiple monitors as one big one, so it would line up with what you are describing.

Have you checked if there is an option in the settings menu that allows you to map the touchscreen to a specific display? Do you have libwacom-surface installed, so the desktop can detect your touchscreen? (I didn't need libwacom-surface for KDE to recognize it, but idk about GNOME)

Tom-Finke commented 4 months ago

I'm on Xorg with Plasma DE. I have libwacom installed, libwacom-list-local-devices gives me

/dev/input/event7 is a tablet but not supported by libwacom
devices:
- name: 'Microsoft Surface Pro 8'
  bus: 'unknown'
  vid: '0x045e'
  pid: '0x0c37'
  nodes:
  - /dev/input/event12: 'IPTS Stylus'

By the settings menu, do you mean plasmas systemsettings > Hardware > Input Devices > Graphic Tablet? If so, no, the touchscreen is not listed there.

StollD commented 4 months ago

I have a dedicated touchscreen entry under input devices, where I can select the screen it is mapped to.

Tom-Finke commented 4 months ago

I don't have that entry. Do you know how it might have been enabled? I cant find a corresponding entry in the KDE Docs https://docs.kde.org/stable5/en/systemsettings/systemsettings/general.html#Hardware, they only list

which are exactly the same entries I have.

KDE / Plasma Version:

Plasma 5.27.10 KDE Framework 5.104.0 QT 5.15.3

StollD commented 4 months ago

https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1227

It's only available on Wayland. Probably due to what I mentioned before (Xorg has no concept for multiple monitors, it treats them as a single big one).

Tom-Finke commented 4 months ago

Ah alright. So no (easy) way to do this on X11 and yet another reason to switch to Wayland?

Tom-Finke commented 4 months ago

I just figured it out.

  1. get "IPTS Touch" and "IPTS Stylus Pen" Xinput device ID by running xinput
  2. get built in Monitor name by running xrandr (in my case "eDP-1")
  3. Run xinput map-to-output <device-id> <monitor-name> for each device id

Thank you for your time @StollD