Created
March 6, 2023 00:02
-
-
Save rafacouto/618cc913193bc961345a6f84b7cdbf07 to your computer and use it in GitHub Desktop.
Script to reload the psmouse driver on x240 laptop
This file contains hidden or 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
#!/bin/sh | |
# put this file on /lib/systemd/system-sleep/x240-mouse-driver | |
# to reload the psmouse driver on sleep events | |
# further info: `man systemd-sleep` | |
#PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
case "$1" in | |
pre) | |
#code execution BEFORE sleeping/hibernating/suspending | |
/usr/sbin/modprobe -r psmouse | |
;; | |
post) | |
#code execution AFTER resuming | |
/usr/sbin/modprobe psmouse | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment