Skip to content

[FIX/Workaround] Touchscreen dead after wake on devices using sec_tsp driver #225

@Ahad00010

Description

@Ahad00010

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions