Ubuntu 18.04 touchpad not fully working after wake from suspend [closed]

When the laptop (Dell Vostro 15) wakes from suspend the mouse cursor can be moved with the touchpad at the login/lock screen, but once back in to the session does not move it. At this point plugging in an external USB mouse works fine. The touchpad works after a reboot, until suspending.


Reloading the touchpad / mouse driver after resuming from suspend works in most cases.

Run sudo -H gedit /lib/systemd/system-sleep/touchpad

Copy and paste in these lines:

#!/bin/bash

if [[ $1 == post ]]; then
    modprobe -r psmouse
    modprobe psmouse
fi

Save the file and exit.

Now make it a program by setting the execution bit:

chmod a+x /lib/systemd/system-sleep/touchpad

You will need to reboot for changes to take effect.


This issue went away after an update. Not sure of its actual cause.