The solution: Reload the touchpad module after each suspend. Well, that is a lot of work, so let's automate it. (Keep in mind that you can use the script for just about any task you want to automate after suspend. Just change the script.)
Make a systemd service (as root):
Code: Select all
# nano /etc/systemd/system/wakeup.service
Code: Select all
[Unit]
Description=Run my_user_script
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
[Service]
ExecStart=/etc/touchpadfiks.sh
#User=my_user_name
#Environment=DISPLAY=:0
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
And now let's make the script.
Code: Select all
# nano /etc/touchpadfiks.sh
Code: Select all
#!/bin/sh
case $1 in
post)
/usr/sbin/rmmod/ psmouse && /sbin/modprobe psmouse
;;
esac
Make the script executable:
Code: Select all
# chmod +x /etc/touchpadfiks.sh
Code: Select all
# systemctl enable wakeup.service && systemctl start wakeup.service
Undo the changes:
Code: Select all
# systemctl stop wakeup.service
# systemctl disable wakeup.service
# rm /etc/systemd/system/wakeup.service
# rm /usr/lib/systemd/system/wakeup.service
# systemctl daemon-reload
# systemctl reset-failed
# rm /etc/touchpadfiks.sh