linux-surface / iptsd

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

iptsd-find-hidraw does not work if dmesg is clear #96

Closed NP-chaonay closed 1 year ago

NP-chaonay commented 1 year ago

is there any alternative solution

dmesg -c can possible by many power user especially when that user have to debug seomthing about driver/kernel.

I am volunteer of iptsd/ithc/linux-surface, so I cannot avoid dmesg -C

NP-chaonay commented 1 year ago

maybe we want to take a look at this

cat /sys/class/hidraw/hidraw*/device/uevent

this is proper way and more stable way (idk if hidraw stuff changing dmesg output or not)

PS: I think it is easy to making script (something sed-alike to get specific key-value pair and detect, in for/while-loop), but I have less freetime to do that so I decided to open issue instead

StollD commented 1 year ago

That seems like a good idea. I also dont think the sysfs files are locked down on debian / arch, so you wouldnt need root to run the script.

Could you check if this command returns the correct hidraw device for you?

grep -E "IPTS|Intel Touch Host Controller" /sys/class/hidraw/*/device/uevent | tail -n1 | grep -Eo 'hidraw[0-9]+'
NP-chaonay commented 1 year ago
grep -E "IPTS|Intel Touch Host Controller" /sys/class/hidraw/*/device/uevent | tail -n1 | grep -Eo 'hidraw[0-9]+'

yeah correctly , without using of root permission

it output hidraw0 (iptsd-find-hidraw output /dev/hidraw0)