Skip to content

Instantly share code, notes, and snippets.

@czekaj
Created May 30, 2018 00:39
Show Gist options
  • Save czekaj/55fc53aeabdb5c7fcd63c23834db69a7 to your computer and use it in GitHub Desktop.
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
# $ 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
Copy link

ghost commented Sep 27, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment