From 83e67e4a27398416f46461d6f324634915f7e1c3 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Mon, 12 Aug 2019 21:16:13 +0200 Subject: [PATCH] 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 --- root/lib/systemd/system-sleep/sleep | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/root/lib/systemd/system-sleep/sleep b/root/lib/systemd/system-sleep/sleep index b8ec47c07..7c76e6cdf 100644 --- a/root/lib/systemd/system-sleep/sleep +++ b/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 ;;