linux-surface / iptsd

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

[Surface 3] Any IPTSD utilites fait ro start with "Illigal Instructruction" due to lack of AVX in S3 CPU #147

Closed TheHolm closed 8 months ago

TheHolm commented 8 months ago

Environment:
Surface 3 ( not Pro) on Debian 12.2 Bookworm, kernel 6.1.55. iptsd v 1.4.0-1 from IPTSD repo.

Problem: Attempt of starting of any IPTSD binary (iptsd, iptsd-check-device) ends with process get instantly killed with Illegal instruction. Binary complied from source( version from 3/10/2023) behave in exactly same manner. Short check in trusty ddd reveals that binaries contains a AVX CPU instructions which old poor Atom x7-Z8700 in S3 does not support.

It should be possible to compile iptsd without AVX instruction set, but I'm unfamiliar with meson , so do not even know where to start. If you point me to right direction it would be appreciated. Happy to create pull request if i get working version.

StollD commented 8 months ago

Surface 3 doesn't need iptsd, you can just uninstall it.

To compile iptsd without AVX remove this line or edit it to the x86 feature level that your CPU supports: https://github.com/linux-surface/iptsd/blob/master/src/meson.build#L22

The daemon itself shouldn't get launched on a device without a compatible kernel driver, so it doesn't need to be changed. However, that check is done by iptsd-check-device so that binary should absolutely be compiled without any special instructions enabled. I will look into that, thank you.