Fix: Ubuntu touchpad stops working on wakeup

Create a file in /lib/systemd/system-sleep

sudo vim /lib/systemd/system-sleep/fixmouse.sh

Create a script which will reinstall the psmouse kernel module on wake

#!/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
    exit 0
    ;;
  post/*)
    echo "Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    modprobe -r psmouse
    modprobe psmouse
    ;;
esac

Ensure the script is executable

chmod 755 /lib/systemd/system-sleep/fixmouse.sh

Done. Try it out.

Leave a Reply

Close Menu
%d bloggers like this: