-
-
Save jaredumbehr/2c5433deb86e42583ddd7955de756fe8 to your computer and use it in GitHub Desktop.
Mouse scroll does no work in linux after suspend
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
Run commands automatically after suspend: | |
1) Create script with commands (open Terminal and type) | |
sudo touch yourscriptname.sh | |
This will create the file in your home folder. | |
2) Edit script | |
sudo nano yourscriptname.sh | |
Paste this in and save the file: | |
#!/bin/bash | |
modprobe -r psmouse && modprobe psmouse | |
3) Move to your "system" folder | |
cd /etc/systemd/system | |
4) Create service: | |
sudo touch yourservicename.service | |
5) Edit service: | |
nano yourservicename.service | |
Paste this in and save it afterwards | |
[Unit] | |
Description=Run user script after suspend | |
After=basic.target suspend.target hibernate.target | |
[Service] | |
User=root | |
Environment=DISPLAY=:0 | |
ExecStart=/home/yourusername/yourscriptname.sh | |
[Install] | |
WantedBy=basic.target suspend.target hibernate.target | |
6) Run chmod | |
sudo chmod +x /home/yourusername/yourscriptname.sh | |
7) Then run the following commands | |
systemctl daemon-reload | |
And: | |
sudo systemctl enable yourservicename.service | |
That should fix it! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment