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

Crashes after start Surface 7 #179

Open
Mathew-D opened this issue Nov 10, 2024 · 6 comments · May be fixed by #182
Open

Crashes after start Surface 7 #179

Mathew-D opened this issue Nov 10, 2024 · 6 comments · May be fixed by #182

Comments

@Mathew-D
Copy link

Mathew-D commented Nov 10, 2024

Every time I start the iptsd service it works fine for about 50 secs then stops.
I am running Arch linux with 6.11.4-arch-1-surface
iptsd version 3-1

When I tried the iptsd-dump command to see what was going on I got the following:

[22:05:51.174] [info] Capturing HID traffic to /tmp/iptsd_045E_099F_1731207951.bin
[22:05:51.193] [info] Loading config /etc/iptsd.conf.
[22:05:51.193] [info] Loading config /etc/iptsd.d/90-baddefaults.conf.
[22:05:51.193] [info] Connected to device 045E:099F
[22:05:51.193] [info] Running in Touchscreen mode
[22:05:51.366] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:52.378] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:53.376] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:54.374] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:55.370] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:56.366] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:57.367] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:58.368] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:05:59.363] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:00.361] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:01.356] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:02.357] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:03.354] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:04.353] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:05.354] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:06.346] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:07.344] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:08.343] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:09.344] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:10.343] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:11.340] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:12.338] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:13.337] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:14.330] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:15.332] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:16.326] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:17.327] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:18.323] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:19.323] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:20.318] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:21.323] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:22.323] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:23.323] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:24.320] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:25.317] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:26.313] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:27.313] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:28.310] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:29.310] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:30.309] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:31.303] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:32.305] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:33.302] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:34.300] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:35.297] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:36.293] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:37.294] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:38.290] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:39.291] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:40.285] [warning] common: Tried to read 7 bytes with only 4 bytes available!
[22:06:40.385] [error] Encountered 50 continuous errors, aborting...

Any help would be very appreciated

@devinhenkel
Copy link

I've been trying to track this down myself. I've removed all kernel patches, reinstalled iptsd, rebooted into windows and back into linux... I can't seem to get it to go away. The pen and multitouch work for a couple of minutes after boot, then stop. If I run sudo /usr/local/bin/iptsd /dev/hidrawN, I see the output you've posted and then it stops after 50 errors.

@Mathew-D
Copy link
Author

@devinhenkel just to let you know for now I have downgraded iptsd to version 2 on my system as that version works without any problems.

@devinhenkel
Copy link

You are a freaking lifesaver! Or, at least, a sanity saver! Thanks!

@bradomindroid
Copy link

Same issue on Surface Laptop 3
Debian 12
linux-image-6.10.10-surface-1
iptsd 3-1

$ sudo service iptsd@* status

× [email protected] - Intel Precise Touch & Stylus Daemon
Loaded: loaded (/lib/systemd/system/[email protected]; static)
Active: failed (Result: exit-code) since Sun 2024-12-08 21:07:22 CET; 13min ago
Duration: 50.052s
Process: 598 ExecStart=sudo /usr/bin/iptsd /dev/hidraw0 (code=exited, status=1/FAILURE)
Main PID: 598 (code=exited, status=1/FAILURE)
CPU: 17ms

dic 08 21:07:17 surfdebian sudo[609]: [21:07:17.138] [warning] common: Tried to read 7 bytes with only 4 bytes available!
dic 08 21:07:18 surfdebian sudo[609]: [21:07:18.133] [warning] common: Tried to read 7 bytes with only 4 bytes available!
dic 08 21:07:19 surfdebian sudo[609]: [21:07:19.130] [warning] common: Tried to read 7 bytes with only 4 bytes available!
dic 08 21:07:20 surfdebian sudo[609]: [21:07:20.132] [warning] common: Tried to read 7 bytes with only 4 bytes available!
dic 08 21:07:21 surfdebian sudo[609]: [21:07:21.130] [warning] common: Tried to read 7 bytes with only 4 bytes available!
dic 08 21:07:22 surfdebian sudo[609]: [21:07:22.126] [warning] common: Tried to read 7 bytes with only 4 bytes available!
dic 08 21:07:22 surfdebian sudo[609]: [21:07:22.226] [error] Encountered 50 continuous errors, aborting...
dic 08 21:07:22 surfdebian sudo[598]: pam_unix(sudo:session): session closed for user root
dic 08 21:07:22 surfdebian systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
dic 08 21:07:22 surfdebian systemd[1]: [email protected]: Failed with result 'exit-code'.

$ sudo dmesg | grep "ipts|IPTS"

[ 0.349657] pci 0000:00:16.4: DMAR: Disabling IOMMU for IPTS
[ 6.680615] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Starting IPTS
[ 6.681941] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS EDS Version: 2
[ 6.686191] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS running in poll mode
[ 7.013504] input: IPTS 045E:0983 Touchscreen as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input5
[ 7.013601] input: IPTS 045E:0983 as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input6
[ 7.013643] input: IPTS 045E:0983 as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input7
[ 7.013684] input: IPTS 045E:0983 as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input8
[ 7.013726] input: IPTS 045E:0983 as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input9
[ 7.013785] input: IPTS 045E:0983 as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input10
Process: 598 ExecStart=sudo /usr/bin/iptsd /dev/hidraw0 (cod
[ 7.013838] input: IPTS 045E:0983 Stylus as /devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/input/input11
[ 7.156523] hid-generic 0000:045E:0983.0001: input,hidraw0: HID v0.00 Device [IPTS 045E:0983] on
[ 9.363888] input: IPTSD Virtual Touchscreen 045E:0983 as /devices/virtual/input/input27
[ 9.366537] input: IPTSD Virtual Stylus 045E:0983 as /devices/virtual/input/input28

I will try this same fix as soon as possible...

@bradomindroid
Copy link

Solved compiling from source

Surface Laptop 3

Debian 12
linux-image-6.12.3-surface-2
iptsd 3-1

I have replaced all executable files from .deb package with new ones from compilation and it all is working now

/usr/bin/iptsd
/usr/bin/iptsd-calibrate
/usr/bin/iptsd-check-device
/usr/bin/iptsd-dump
/usr/bin/iptsd-find-hidraw
/usr/bin/iptsd-find-service
/usr/bin/iptsd-foreach
/usr/bin/iptsd-perf
/usr/bin/iptsd-plot
/usr/bin/iptsd-show
/usr/bin/iptsd-systemd

$ sudo systemctl status /dev/hidraw0
● dev-hidraw0.device - /dev/hidraw0
Follows: unit currently follows state of sys-devices-pci0000:00-0000:00:16.4-0000:00:16.4\x2d3e8d0870\x2d271a\x2d4208\x2d8eb5\x2d9acb9402ae04-0000:045E:0983.0001-hidraw-hidraw0.device
Loaded: loaded
Active: active (plugged) since Thu 2024-12-12 17:40:50 CET; 15min ago
Device: /sys/devices/pci0000:00/0000:00:16.4/0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04/0000:045E:0983.0001/hidraw/hidraw0

dic 12 17:40:50 surfdebian systemd[1]: Condition check resulted in dev-hidraw0.device - /dev/hidraw0 being skipped.

@bradomindroid
Copy link

Sorry, I forgot to say that Fix SP7 invalid data workaround #182 has been applied to source code.

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

Successfully merging a pull request may close this issue.

3 participants