Linux – Touchpad doesn’t wake up from suspend

arch linuxsuspendtouchpad

I've been trying to figure out how I can make my touchpad work after waking up from suspend.

Until recently I could at least reactivate it by typing:

ls /lib/modules/`uname -r`/kernel/drivers/input/mouse
sudo modprobe -v synaptics_i2c

(btw how can I actually determine which driver is handling my touchpad? lspci -k isn't helping me and I'm fairly new to linux?)

A recent kernel update caused this method to not work anymore. I've found this solution, but it doesn't work

sudo touch /etc/pm/sleep.d/0000trackpad
sudo gedit /etc/pm/sleep.d/0000trackpad

and paste in the following:

#!/bin/sh
case "$1" in
    suspend|hibernate)
         modprobe -r psmouse ;;
    resume|thaw)
        modprobe psmouse ;;
esac

Finally, making it executable:

sudo chmod +x /etc/pm/sleep.d/0000trackpad

How can I get my touchpad to work after waking from suspend?

Best Answer

I would simply try disabling/enabling it via xinput instead. You can do this by acquiring the devices id=# from the xinput command.

$ xinput --list | grep TouchPad
⎜   ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]

You can parse the id= using this command:

$ TID=$(xinput list | grep -iPo 'touchpad.*id=\K\d+')

And then disable/enable it:

$ xinput disable "$TID"
$ xinput enable "$TID"
Related Question