Created
May 30, 2018 00:39
-
-
Save czekaj/55fc53aeabdb5c7fcd63c23834db69a7 to your computer and use it in GitHub Desktop.
Fixes touchpad scrolling after resume from sleep on Lenovo Thinkpad X1 Carbon 3rd Gen running Ubuntu 18.04. Remember to sudo when creating this file and chmod +x it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $ pwd | |
# /lib/systemd/system-sleep | |
# $ cat sleep-fixes | |
#!/bin/sh | |
case $1/$2 in | |
pre/*) | |
echo "Going to $2..." | |
# Place your pre suspend commands here, or `exit 0` if no pre suspend action required | |
modprobe -r psmouse | |
;; | |
post/*) | |
echo "Waking up from $2..." | |
# Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required | |
sleep 2 | |
modprobe psmouse | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! Does this work, do you know, on the 6th generation X1, with its 'Linux' mode enabled in the (version 1.30) BIOS? I suspected not, but admittedly I have not tried - though goodness knows I have tried many things - a two second sleep.