Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface Book 3 touch screen doesn't work in iptsd 1.2.0 and 1.2.1 #129

Open
a1exwang opened this issue May 14, 2023 · 8 comments
Open

Surface Book 3 touch screen doesn't work in iptsd 1.2.0 and 1.2.1 #129

a1exwang opened this issue May 14, 2023 · 8 comments

Comments

@a1exwang
Copy link

a1exwang commented May 14, 2023

On 1.2.1

the systemd service starts fine but the touch screen doesn't work.

iptsd output

May 14 10:18:49 alexwang-sb3 iptsd[806]: [10:18:49.879] [info] Metadata:
May 14 10:18:49 alexwang-sb3 iptsd[806]: [10:18:49.879] [info] rows=48, columns=72
May 14 10:18:49 alexwang-sb3 iptsd[806]: [10:18:49.879] [info] width=28530, height=19020
May 14 10:18:49 alexwang-sb3 iptsd[806]: [10:18:49.879] [info] transform=[401.831,0,0,0,-404.68085,19020]
May 14 10:18:49 alexwang-sb3 iptsd[806]: [10:18:49.879] [info] unknown=1, [178,182,180,1,178,182,180,1,90,171,100,20,172,177,175,2]
May 14 10:18:49 alexwang-sb3 iptsd[806]: [10:18:49.882] [info] Connected to device 045E:09B2

no error in dmesg

Running iptsd-show seems to work (But there is a weird bar on the left)
image

On 1.2.0

it will crash on start.

On 1.1.1

the touch screen mostly works. (Only the left corner doesn't work)

On Windows

Touchscreen works perfectly so it shouldn't be hardware issue.

System info

  • Ubuntu 22.04
  • iptsd is installed by following the (Installation and Setup docjument)[https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup]
  • kernel 6.2.14-surface
@StollD
Copy link
Member

StollD commented May 14, 2023

Wow, that looks weird. And you say it works fine on windows? Even the left side?

iptsd-show shows that iptsd recognizes your finger as a palm, which means it bigger than the default settings. iptsd includes an app that can measure the size of your fingers, but with that issue on the left side of your display, this won't work sadly.

The algorithms for touch detection have changed in 1.2.0, so this would explain why it worked before.

What you can try is manually adjusting the maximum size of a contact. The value for this is SizeMax in /etc/iptsd.conf: https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf#L90. The contact should be colored green in iptsd-show.

Also, could you get be a binary log of your touchscreen?

$ sudo systemctl stop $(iptsd-find-service)
$ sudo iptsd-dump $(iptsd-find-hidraw) ipts.bin

Run these two commands and then touch the screen a few times. I would be especially interested in touches on that white stripe or near of it. Once you did that, stop the program with Ctrl-C and upload the ipts.bin file it created here.

@a1exwang
Copy link
Author

Thanks for the quick reply!

Wow, that looks weird. And you say it works fine on windows? Even the left side?

I didn't notice anything unsual when I was om Windows. Let me try again especially for the left side next time.

What you can try is manually adjusting the maximum size of a contact

It seems the default of MaxSize is 2.0. I tried 1.0, 0.5, 0.1, 0.01, 0 and none of them makes the touch screen work. And I didn't see any visual different from iptsd-show. I'm curious how do you know from iptsd-show screenshot that it recogized my finger as palm?

Also, could you get be a binary log of your touchscreen?

I touched the screen multiple times including area around the left strip.
ipts.bin.gz

@a1exwang
Copy link
Author

I tested on Windows. The whole area on the left of the bar doesn't work on Windows either.... Seems like hardware issue...

Sorry for bother you...

@StollD
Copy link
Member

StollD commented May 14, 2023

I'm curious how do you know from iptsd-show screenshot that it recogized my finger as palm?

Because I know that palms (or rather, "invalid" contacts, so too small, too large, too distorted) are colored red, and valid contacts are colored green.

It seems the default of MaxSize is 2.0. I tried 1.0, 0.5, 0.1, 0.01, 0 and none of them makes the touch screen work. And I didn't see any visual different from iptsd-show.

Your fingers are bigger than the default value, so you need to increase it.

I tested on Windows. The whole area on the left of the bar doesn't work on Windows either.... Seems like hardware issue...

I didnt want to discard your issue. The defaults could need some improvements, and with some tweaks to the settings the rest of your screen could still work fine.

I was just interested in whether Windows can somehow fix this issue with the Digitizer, either by uploading calibration data, or by some intensive post processing.

@a1exwang
Copy link
Author

Because I know that palms (or rather, "invalid" contacts, so too small, too large, too distorted) are colored red, and valid contacts are colored green.

Understood. It would be good if I can use the rest of the screen with iptsd. After setting MaxSize = 100, the contact appearred as yellow. I can't get a green contact even with my little finger and with the slightest touch.

Do you think the issue (yellow contacts and touch still doesn't work) has anything to do with the bad part of screen? If so, can I "ban" the bad part of the touch screen in iptsd?

image

And I forgot to mention that iptsd flickers with these red horizontal lines.

image

I attached the dump in a previous reply, does that help diagnose the issue?

@a1exwang a1exwang reopened this May 15, 2023
@qzed
Copy link
Member

qzed commented May 15, 2023

And I forgot to mention that iptsd flickers with these red horizontal lines.

Those are just one really big ellipses because processing gets confused.

can I "ban" the bad part of the touch screen in iptsd?

I guess if you want to try and hack around, you could set the offending values/values in some area to the average value right after this.

@StollD
Copy link
Member

StollD commented May 15, 2023

Do you think the issue (yellow contacts and touch still doesn't work) has anything to do with the bad part of screen? If so, can I "ban" the bad part of the touch screen in iptsd?

Yellow contacts mean that the movement of the contact in the current frame is regarded as unstable. That means that iptsd will keep using the previous values for it. If it was never stable, then it will be ignored.

The issue is that iptsd marks contacts that are near a palm as unstable. To make things easier, iptsd assumes all contacts are circles, with the same radius as the major axis of the ellipse.

In your case this means that the giant palm ellipse is assumed to be a circle spanning the entire display.

To fix this, try setting DistanceThreshold in iptsd.conf to something ridiculous, like 1 million: https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf#L122

@a1exwang
Copy link
Author

The comment says DistanceThreshold is a max value. So it seems a minus value can solve the problem.

 How many centimeters a contact has to be away from a palm to not get marked as a palm too.

After settings to -1000000, the touch works again.

Though problems still exist, like phantom touch (maybe related to the flickering red lines showed in iptsd-show) and touch sometimes doesn't work for a few seconds. Windows doesn't have these issues. Let me try different settings in iptsd to see if I can fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants