Touchpad – Fix Touchpad Not Working After Suspending Laptop

asussuspendsynapticstouchpad

This seems like a common problem, but after trying all of the fixes I've found on forums, I'm still at a loss.

Specs:

  • computer: Asus k501LX-EB71
  • OS: Ubuntu 14.04.3
  • kernel: 3.19.0-26-generic
  • touchpad: Elantech touchpad
  • driver: xserver-xorg-input-synaptics-lts-trusty (OR)
    xserver-xorg-input-synaptics-lts-vivid (not sure which one is in use)

What I've tried:
I can run sudo modprobe -r psmouse to "turn off" the touchpad, and then sudo modprobe psmouse to turn it back on. This works fine. However when I suspend, I can't "revive" the touch pad, even if I enter these commands.

Any thoughts?

UPDATE:

I don't observe this problem if I hibernate instead of suspend. I'm not sure what to make of that clue…

CURRENT WORKAROUND:

Since hibernate seems to not cause a problem and I have an appropriate amount of swap memory, I just hibernate as the default action for things like closing the lid. Here are the steps I followed to enable hibernate. I also modified other default power settings to go to hibernate using the dconf Editor under org>gnome>settings-daemon>plugins>power

Best Answer

This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries # modprobe -r psmouse and # modprobe psmouse and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?

If this works manually then you can automate by creating a new file in the /lib/systemd/system-sleep/ directory containing:

#!/bin/sh

case $1/$2 in
  pre/*)
    echo "Going to $2..."
    # Place your pre suspend commands here, or `exit 0` if no pre suspend action required
    modprobe -r psmouse
    ;;
  post/*)
    echo "Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    sleep 2
    modprobe psmouse
    ;;
esac

It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.

The sleep 2 command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....