Browse Source

Improve wifi reliability after resuming from suspend

Using the old script I regulary	had the	problem, that after resuming
from suspend (or hibernate) the wifi would just break. The only way
to fix it was to restart network manager, or disable it in the GNOME
network settings.

I am not a 100% sure *why*, but this change greatly improved the wifi
stability after resume. I am running this for like 5 days now and
didn't see the wifi breaking once. I suppose, that `modprobe` vs
`modprobe -i` is what makes the difference.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
Dorian Stoll 6 năm trước cách đây
mục cha
commit
83e67e4a27
1 tập tin đã thay đổi với 3 bổ sung8 xóa
  1. 3 8
      root/lib/systemd/system-sleep/sleep

+ 3 - 8
root/lib/systemd/system-sleep/sleep

@@ -2,7 +2,6 @@
 case $1 in
   pre)    # unload the modules before going to sleep
     # handle wifi issues
-    systemctl stop NetworkManager.service
     modprobe -r mwifiex_pcie;
     modprobe -r mwifiex;
     modprobe -r cfg80211;
@@ -27,13 +26,9 @@ case $1 in
     #modprobe intel_ipts
 
     # handle wifi issues: complete cycle
-    modprobe -r mwifiex_pcie;
-    modprobe -r mwifiex;
-    modprobe -r cfg80211;
-    # and reload
-    modprobe -i cfg80211;
-    modprobe -i mwifiex;
-    modprobe -i mwifiex_pcie;
+    modprobe cfg80211;
+    modprobe mwifiex;
+    modprobe mwifiex_pcie;
     echo 1 > /sys/bus/pci/rescan
     systemctl restart NetworkManager.service
     ;;