DisableOnStylus does not disable all touch inputs
Hey all! Just got a SP7, installed Arch (EndeavourOS) with the linux-surface kernel, as well as iptsd for note taking. It seems that I'm having trouble with palm rejection. I checked both here and the linux-surface issues, and read there was two things I could fix this:
- Calibrate iptsd. I have done this twice and while it made a difference, it was really perfect, and
- Set
DisableOnStylusto true.
I've set option 2 to true, however it still seems like it's picking up on occasional touch input. Originally I thought it was just my palm, but I've also tested this with the setup described below:
I used my left hand (I'm left handed) to draw on the screen without that hand touching. With my right hand, I tapped the screen repeatedly. Below is the results of my tests. This was one constant line of drawing.
I've checked other issues and it doesn't seem like anyone else has this exact same issues, so I'm wondering if anyone knows how to fix this.
For refernce, the device is a Surface Pro 7 with an i3 and 4GB RAM. The pen I am using is a Wacom Bamboo Ink (although I'm getting a Surface Pen soon). I am using GNOME 46 and kernel 6.9.9 (arch surface kernel). Let me know what else you need!
After some further testing, it seems to mostly happen when lots of pressure is applied to the screen (hence why a palm would make it happen).
Did some more testing. Set the touch's disabled to true and ran the same test, which came out to the same result above. Is there any way I would be able to figure out what sort of input is happening at that time?
I'd similar experience on my Surface Pro 5 running Fedora Gnome
just received the official surface pen and can confirm that it happens with that as well. in the meantime im rocking a latitude 5290 which has its palm rejection working flawlessly out of the box. ill keep the surface around for support however
it seems for some reasons config file /etc/iptsd.conf is ignored by IPTSD.
in my case, tried :
disable touch=true
DisableOnStylus = true
DisableOnPalm = true
there is touch, and there is touch with stylus and palm
sudo journalctl -p 3 -xb looks good and so dmesg
the only issue that i see is:
ithc 0000:00:10.6: invalid dma rx data! channel 1, buffer 6, size 641: 03 00 00 00 d0 07 00 00 00 00 00 00 01 00 00 0>
ithc 0000:00:10.6: DMA RX timeout/error (try decreasing activeltr/idleltr if this happens frequently)
after running sudo journalctl -p 3 -x
this could be due to TLP
no indication of an error related to ignoring config file
Edit: This is caused by nixos/nixpkgs#344002
~~Not sure if this is the same issue or not, for me, DisableOnStylus does not work at all.~~
~~~~
~~Here, I first started drawing with the stylus, then using my right hand to pan the canvas via touch with one contact point.~~
~~I'm using a Surface Pro 9 with a Slim Pen 2. Application is RNote, although I had the same issue in the Excalidraw plugin for Obsidian.~~
~~I have confirmed that Touchscreen.Disable works as expected. I'm not sure if Touchscreen.DisableOnPalm works, since my palm rejection hasn't been good yet. I have calibrated my device.~~
@sound-friend I'm experiencing similar issue.
The SP7 I am working on has a glass screen cover which might be the reason for my issues.
When I have a hand on my screen, a straight line is drawn as a dashed or even dotted line despite never raising the tip of the stylus from the screen.
I've tested it with evdev and when I have my hand on the screen, the IPTSD virtual device is sending BTN_TOUCH with value of 0 followed by a value of 1 after a fraction of a second. The ABS_PRESSURE also follows that pattern. If there are ABS_X or ABS_Y events between the flips, the drawn line would be dashed, as the driver sends an information that I've moved the pen mid-air.
I've added debounce logic to the driver with a timeout of 0.07s. After those changes, everything seems to work fine. The 0.07s is a value that is good enough for me. It does not seem to affect my writing and my original issue almost does not happen.
I've published the changes in a fork that I am not planning to make a PR for. My workaround seems hacky, is specific to the issue I am having and is using values that work for me and the device I am working on. The real issue may be with the hardware or the wacom driver and if so, should be fixed there. If the maintainers decide to merge it or build on top of it, I won't object though.
Having that said, if you want to test the fork for yourself, here it is: https://github.com/wvffle/iptsd
I've published the changes in a fork that I am not planning to make a PR for. My workaround seems hacky, is specific to the issue I am having and is using values that work for me and the device I am working on.
if you are willing:
you could add ifdefined to that logic and add an option to the config file.
this way it becomes a feature with changeable parameters (might require some work, but should be doable)
in any case, i appreciate your work and i am going to try it
@sound-friend @Ramen-LadyHKG does disabling touch also disables stylus or limits its functionality?
The SP7 I am working on has a glass screen cover which might be the reason for my issues.
Have you tried lowering this value? https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf#L157 If the "signal strength" from the stylus is less than this, the signals are ignored and the virtual stylus will emit a lifted event.
it seems for some reasons config file
/etc/iptsd.confis ignored by IPTSD
Could you please post your iptsd.conf?
Have you tried lowering this value? https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf#L157 If the "signal strength" from the stylus is less than this, the signals are ignored and the virtual stylus will emit a lifted event.
It might be good to add descriptions to those options. Unfortunately, lowering the value does not resolve my problems. I've tested values 25, 15 and 1 and in every single case it behaved identically.
As @ECO1AI suggested, I've added a LiftTimeout config option under [Stylus] section to my fork, so others do not need to recompile it.
The SP7 I am working on has a glass screen cover which might be the reason for my issues.
thanks for reminding me i also have a protective class installed on my screen what i have understood is that i need to re-calibrate heat-map; since touch become unresponsive till i touch the metallic body of the surface where my thumb is detected but not consistent specially when i slide my thumb. smaller contact area's are barely recognized.
Could you please post your
iptsd.conf?
here you go:
this is the output of cat /etc/iptsd.conf > iptsd.txt
iptsd.txt
is there anyway of visualizing heat-map in real time? or even a way to debug raw input
@wvffle try this config file and tell me what changed in touch: iptsd.txt it should help alot
Has there been a fix for this issue?
Having the same issue over here.
It really sadly makes the stylus unusable for me...
Is there any hope of an official fix?
The issue tab seems very much unmaintained.
I've run into a similar issue, tried to set DisableOnPalm = true and DisableOnStylus = true in /etc/iptsd.conf, with no result, it seems the config file is being ignored by iptsd altogether...
My palm being on the screen did not stop touch inputs fully, and neither did using my stylus, except for the default blocking from palm detection after calibration.
The real problem is that palm detection currently just prevents the palm from being used as touch signals, but not anything it doesn't detect as a palm. This means if my palm creates one big area that is correctly detected as a palm, but is touching a smaller space next to it, that small touch area will be registered, despite it being next to the detected palm. I hope this makes sense. The easiest way would be to disable the touchscreen completely if any palm is detected, and especially if the stylus is detected.