Ubuntu – Ubuntu 18.04 mouse issues after suspend

18.04lenovomousepower-managementsuspend

I am using Ubuntu 18.04 running on lenovo carbon yoga x1 (1st Gen).
Everything work fine most of the time, but after I put the computer to suspend and then wake it up in the am, the mouse goes a little whack:
– the left click of the mouse doesn't work.
– the sliding lock screen for example looks like it's stuck in drag mode, I can slide up and down but not all the way, and I have to power cycle the machine to get to the login box.

Best Answer

Faced this problem today and this is what worked for me.

Make sure your device module is psmouse by running,

lsmod | grep psmouse

if its not, find the relavant module name.

$ cd /lib/systemd/system-sleep/
$ sudo vi fixtouchpad

then paste and save the following

#!/bin/bash
[ "$1" = "post" ] && exec modprobe psmouse
[ "$1" = "pre" ] && exec rmmod psmouse
exit 0

This will reload your psmouse module after resuming. Replace 'psmouse' with your module name.

Be sure to make the script executable

sudo chmod +x fixtouchpad
Related Question