touchpad acts funny after sleep
Sometimes, when I wake my laptop from sleep, the touchpad acts funny. The mouse pointer jump on the screen and it is really hard to control the mouse. I tried to turn of and on the touchpad in ubuntu control center, hoping this will unload and load the module and it didn't help. Restarting the machine solve this.
Restarting the driver helps:
Just Ctrl+alt+T, and run:
sudo rmmod psmouse
sudo modprobe psmouse
On a Macbook I think you may need to use "appletouch" instead of psmouse.
It is an old topic, but I want to answer my solution, because it seems that pointer devices does not really like other power states.
BTW this is a good way for module "reset" if you have problems with a device after suspend/hibernate etc, not just for touchpad.
My problem was exactly the same:
- After hibernate, my touch pad was hard to use,
- but my connected USB mouse was OK.
Following the answer from NoBugs I realized with
lsmod | grep touch
that my device name is "hid_multitouch"
sudo rmmod hid_multitouch
sudo modprobe hid_multitouch
... and my touch pad worked well again.
I wrote a script to a file in /etc/pm/sleep.d
sudo pico /etc/pm/sleep.d/20_touchpad_reset
with the following content:
case "${1}" in
thaw)
rmmod hid_multitouch
modprobe hid_multitouch
;;
esac
... and made it executable with
sudo chmod +x /etc/pm/sleep.d/20_touchpad_reset
This snippet makes exactly the same as the above mentioned commands, but
- automatically
- run only after hibernation
from now on
sudo pm-hibernate
working nicely.
BUT pm-tools are not used by decent Ubuntu (Debian), so we need to install a service for systemd.
For this I created I created a service file:
sudo pico /lib/systemd/system/touchpad-reset.service
with the following text:[Unit]
Description=Reset multitouch device after hibernate
After=hibernate.target
After=hybrid-sleep.target
[Service]
ExecStart=/bin/bash /etc/pm/sleep.d/20_touchpad_reset thaw
[Install]
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
... then I acivated my new service:
sudo systemctl enable touchpad-reset.service
You can check if everything worked well with:
sudo systemctl status touchpad-reset.service
I have the same problem with synaptics touchpad on my HP Probook G6 after sleep on ubuntu 18.04. The solution is the same as V-Mark suggested, but reloading i2c_hid module instead of hid_multitouch.
sudo rmmod i2c_hid
sudo modprobe i2c-hid
And it starts to work smooth.