I encountered an issue on a Samsung device where the touchscreen becomes completely
unresponsive after waking the display when running a GSI.
Device:
Samsung Galaxy A13 (SM-A135F/DS)
ROM:
LineageOS GSI (a64)
Root:
Magisk
Symptom/How to reproduce:
After pressing the power button to wake the display, the touchscreen does not respond.
Manual workaround:
Running the following command restores the touchscreen:
echo check_connection > /sys/class/sec/tsp/cmd
cat /sys/class/sec/tsp/cmd_result
This appears to force the Samsung sec_tsp touchscreen driver to reinitialize.
Automatic workaround (Magisk service.d script):
Create:
/data/adb/service.d/touchfix.sh
Script:
#!/system/bin/sh
logcat -c
logcat -b system | grep -F 'Display device changed state: "Built-in Screen", ON' | while read line
do
echo check_connection > /sys/class/sec/tsp/cmd
cat /sys/class/sec/tsp/cmd_result
done
Then run:
chmod 755 /data/adb/service.d/touchfix.sh
After reboot, the touchscreen recovers automatically when the display wakes.
Any credits belongs to: ap4ss3rby because he was the one who actually found the fix and i decided to polish it.
I encountered an issue on a Samsung device where the touchscreen becomes completely
unresponsive after waking the display when running a GSI.
Device:
Samsung Galaxy A13 (SM-A135F/DS)
ROM:
LineageOS GSI (a64)
Root:
Magisk
Symptom/How to reproduce:
After pressing the power button to wake the display, the touchscreen does not respond.
Manual workaround:
Running the following command restores the touchscreen:
echo check_connection > /sys/class/sec/tsp/cmdcat /sys/class/sec/tsp/cmd_resultThis appears to force the Samsung sec_tsp touchscreen driver to reinitialize.
Automatic workaround (Magisk service.d script):
Create:
/data/adb/service.d/touchfix.sh
Script:
Then run:
chmod 755 /data/adb/service.d/touchfix.shAfter reboot, the touchscreen recovers automatically when the display wakes.
Any credits belongs to: ap4ss3rby because he was the one who actually found the fix and i decided to polish it.