linux-surface / iptsd

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

Touch screen creates eratic input when using pen while laying the hand on the screen #121

Open lululock71 opened 1 year ago

lululock71 commented 1 year ago

Hi,

I've installed Arch with all the required packages to make my Surface Pro 4 work. It is running KDE Wayland.

I am currently having an issue with the touchscreen. Whenever I try to draw with an active stylus (Wacom Bamboo Ink 2nd gen, I have no Microsoft Stylus to try), there are erratic inputs as soon as I lay my right hand on the screen. That makes the Surface unusable for such tasks. I tried with both Xournal++ and Krita with similar results.

I followed the instructions here and restarted the Surface, but that did not solve the issue.

In the Feature Matrix, the Pen is listed as working on the SP4 if the surface-linux kernel is installed and in use (which is the case for mine).

Any help on how to fix this ? I'd like to avoid a "dirty hack" involving scripts.

That same Wacom stylus works flawlessly on my ThinkPad Yoga 370 (Arch + KDE Wayland as well) but I am aware it can't be compared with the SP4 because the touchscreen hardware is completely different (Wacom based =/= Intel based).

StollD commented 1 year ago

Have you tried calibrating iptsd? https://github.com/linux-surface/iptsd/wiki/Calibrating-iptsd

The SP4 is notorious for returning very noisy data. The default algorithm is not able to deal with noisy data very well. There is a lot more information here if you are interested: https://github.com/linux-surface/linux-surface/issues/1046

If your problem is caused by noise, there are two possible solutions.

iptsd includes an advanced algorithm for contact detection, however, it is vastly more complex and uses vastly more resources that the default basic one. But it deals with noise much better, so it can improve the behavour on SP4. Toe enable it ,create a file in /etc/iptsd.d (e.g. /etc/iptsd.d/80-algorithm.conf) and add the following content:

[Contacts]
Detection = advanced

Alternatively, you could try the current development version of iptsd, which uses a combination of both algorithms. This can also deal with the noise on SP4 way better, while also using a way more reasonable amount of resources than the advanced algorithm. To install the development version, download the artifact called arch-latest from here: https://github.com/linux-surface/iptsd/actions/runs/4600585828. You will get a zip file, with a package inside that you can install with pacman. After a reboot, it should work better.

Shatur commented 1 year ago

@StollD I have the same "issue" with the Surface Pen and Surface Pro 4. When I draw something and move the pen away from the screen - it detects my hand as a touch. But it works okay with the mentioned version from artifacts. Sometimes accidental press registers due to my knuckles, but I think that's normal.