Help needed: How can I disable the touch screen via ssh?

Hi there.

The display of my XA2 has cracks for 1½ years now but it was only two days ago that it decided to also show a nice white vertical line and the touch screen misbehaves. I can’t operate the phone via mouse and keyboard because the touch screen thinks that someone touches it permanently. I can ssh into my device, though, and need to deactivate the touch screen - ideally until next reboot.

Does anyone know how to achieve that? Or any other ideas? Can I disconnect the touch screen on the hardware side without losing the display?

Thanks!

1 Like

Just watched a teardown video. The screen has only one connector so no (easy) possibility to disable touch on the hardware side. :thinking:

Not too sure, but the compositor input is configured in systemd env files, e.g. /var/lib/environment/compositor/droid-hal-device.conf, which has e.g.:

LIPSTICK_OPTIONS="-plugin evdevtouch -plugin evdevmouse [...]"

Perhaps removing -plugin evdevtouch here could do the trick.

CAREFUL though, messing this up may cause lipstick not starting, or no input being possible at all. Have recovery methods handy when experimenting.

2 Likes

You could also try to use udev rules to disable the screen input sensors/devices.

@nephros ssh should still work even if lipstick does not start, but yeah, OP should make sure it doesn’t require screen input first.

I think what nephros suggested sounds pretty good.

Other avenues could be

  • some hack involving mcetool (questionable but simpler if possible)
  • blacklisting the kernel module: lsmod returns nothing, but I found this file:
    grep touch /lib/modules/$(uname -r)/modules.builtin
    I presume the blacklisting process is identical to vanilla Linux.
1 Like

Off topic, but whatever.
This is why I am on Sailfish OS. There are so many things users might want to do that nobody could possibly predict, disabling the touchscreen via ssh is one of them. It is not clear how to do it if you are not experienced with troubleshooting hardware on linux, but you can do it. Good luck trying that on Android, and don’t even dream of doing that on ios. SFOS really is a beautiful OS :smile:

9 Likes

@nephros Thank you very (!) much for your idea. I removed -plugin evdevtouch from that line and it works as expected: USB keyboard and mouse are working nicely while the touch screen is disabled.

You saved my day(s) until my 10 V will get Sailfish OS.

Before disabling I checked whether I can SSH into my device after a fresh reboot without having to unlock the phone first or whatever, which was a success.

Also @ohnonot thank you very much. As I followed the quite simple approach from nephros and it worked there was no necessity to follow your ideas.

@nephros , you probably should alter your post to not only remove evdevtouch but also the -plugin . If someone else finds this thread and is in autopilot mode he or she could miss that.

3 Likes