Ubuntu 18.04 touchpad not fully working after wake from suspend

9,752

Solution 1

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.

Solution 2

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

Share:
9,752

Related videos on Youtube

Andrew Ray
Author by

Andrew Ray

Updated on September 18, 2022

Comments

  • Andrew Ray
    Andrew Ray over 1 year

    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.

  • Andrew Ray
    Andrew Ray over 5 years
    This didn't help (I'd actually tried before manually rmmod and modprobing psmouse). But now, after another restart, it is working again. I believe some update was installed as well, so perhaps some transient kernel issue that was fixed?
  • Admin
    Admin over 5 years
    This issue went away after an update. Not sure of its actual cause.
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 5 years
    I should have put into the answer a reboot may be necessary for changes to take effect but I didn't fully research that part of the answer. Let me know if it is still broken after next suspend. Thanks.
  • SaTa
    SaTa over 4 years
    This solution did not work for me. Ubuntu 18.04 with "SYNA8004:00 06CB:CD8B Touchpad", Lenovo X1 Carbon Gen 7. I get snappy touchpad behavior after resuming from hibernation.
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 4 years
    @SaTa You need to reboot for changes to take effect. Also hibernation often brings a host of new problems not found with suspend/resume.
  • SaTa
    SaTa over 4 years
    Thanks. The issue goes away if I do a reboot. Running modprobe -r psmouse and then modprobe psmouse from the terminal should resolve the problem, right? It doesn't though. If it was solving the issue, then I could have within the script you are recommending.
  • Antony
    Antony almost 4 years
    instead of psmouse, I actually had to target i2c_i801 to get the two finger scrolling to work again.
  • mirec
    mirec almost 4 years
    still there in ubuntu 20.04(focal)
  • Admin
    Admin almost 4 years
    still there in ubuntu 20.04(focal)
  • Adones Pitogo
    Adones Pitogo over 3 years
    On my lenovo x1 carbon, I had to replace pmouse with i2c_i801 to get the 2 finger scrolling working after suspend.