Turn WiFi off before suspend
This might help avoiding stability issues with WiFi.
This commit is contained in:
parent
8556aecc46
commit
f85518f034
|
@ -42,6 +42,8 @@ start_deep_sleep() {
|
||||||
sleep 5 # Give some extra time for pending output data
|
sleep 5 # Give some extra time for pending output data
|
||||||
|
|
||||||
if [ can_suspend ]; then
|
if [ can_suspend ]; then
|
||||||
|
WIFI_WAS_ON=$(nmcli r wifi)
|
||||||
|
nmcli r wifi off
|
||||||
echo mem > /sys/power/state 2>/dev/null
|
echo mem > /sys/power/state 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -210,6 +212,11 @@ if [ "$1" == "start" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$WIFI_WAS_ON" = "enabled" ]; then
|
||||||
|
nmcli r wifi on
|
||||||
|
fi
|
||||||
|
|
||||||
wait_for_notifications
|
wait_for_notifications
|
||||||
done
|
done
|
||||||
elif [ "$1" == "stop" ]; then
|
elif [ "$1" == "stop" ]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user