Last active
November 14, 2021 14:45
-
-
Save ozzbetto/e0322d472e8d49fa704cb9ebfae54669 to your computer and use it in GitHub Desktop.
Mouse scroll does no work in linux after suspend
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
#This command will refresh the scroll in Linux after suspend | |
#!/bin/bash | |
modprobe -r psmouse && modprobe psmouse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a file in your home folder
touch your_script_name.sh
Edit the file
vi your_script_name.sh
Move to your "system" folder
cd /etc/systemd/system
4) Create service:
sudo touch your_service_name.service
5) Edit service:
nano your_service_name.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/your_username/your_script_name.sh
[Install]
WantedBy=basic.target suspend.target hibernate.target
6) Run chmod
sudo chmod +x /home/your_username/your_script_name.sh
7) Then run the following commands
systemctl daemon-reload
And:
sudo systemctl enable your_service_name.service
That should fix it!