meta-smartwatch icon indicating copy to clipboard operation
meta-smartwatch copied to clipboard

Fix /dev/input/event0 getting closed in asteroid-launcher

Open atx opened this issue 8 years ago • 0 comments

/dev/input/event0 occasionally starts feeding asteroid-launcher with EOFs, requiring device restart.

After some debugging, it looks like close() is called on the /dev/input/event0 file descriptor from somewhere completely unrelated (qualcomm driver code most likely). This leads to the file descriptor in the QEvdevTouchScreenHandler class getting replaced with another one, ultimately resulting in getting a bunch of EOFs.

A (very hacky) fix was attempted by firewalling close() using LD_PRELOAD, but as the close()-calling code does not use libc, this does not work. ptrace based firewall would probably work.

Interestingly, restarting asteroid-launcher.service after bootup always results in correctly working touchscreen. Possibly running a dummy Qt application before lipstick could prevent this failure form occuring?

atx avatar Apr 22 '17 16:04 atx