Created
December 10, 2020 12:39
-
-
Save joshp23/5be872e63454008a46b237b0e9844b98 to your computer and use it in GitHub Desktop.
Ubuntu systerm service file to reload wife 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
#/etc/systemd/system/wifi-resume.service | |
#sudo systemctl enable wifi-resume.service | |
[Unit] | |
Description=Restart Network Manager at resume (after suspend) | |
After=suspend.target | |
After=hibernate.target | |
After=hybrid-sleep.target | |
[Service] | |
Type=oneshot | |
# alternative command to call | |
#ExecStart=/usr/bin/systemctl restart NetworkManager.service | |
# note: also unloads iwlwifi | |
ExecStart=/usr/sbin/modprobe -r iwldvm | |
# note: also loads iwldvm | |
ExecStart=/usr/sbin/modprobe iwlwifi | |
[Install] | |
WantedBy=suspend.target | |
WantedBy=hibernate.target | |
WantedBy=hybrid-sleep.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixes the "Wifi not working after suspend" problem.
/etc/systemd/system/wifi-resume.service
sudo systemctl enable wifi-resume.service