(02-24-2024, 12:57 PM)FortunateFowl Wrote: I had success in being able to suspend without any hangs and the wifi on using the following.Finally got it to work; needed to add some delay after wifi off.
Using your favorite text editor add the following text to the following two files
File at
Code:/usr/lib/systemd/system-sleep/wlan_stop.sh
Code:#!/bin/bash if [ "$1" = "post" ]; then echo "Post: $(date +%T)" >> /tmp/suspend /usr/bin/nmcli radio wifi on # /usr/sbin/modprobe bes2600 elif [ "$1" = "pre" ]; then echo "Pre: $(date +%T)" >> /tmp/suspend /usr/bin/nmcli radio wifi off # /usr/sbin/modprobe -r bes2600 fi exit 0
and again for shutdowns
add a file at
Code:/usr/lib/systemd/system-shutdown/wlan_stop.sh
Code:#!/bin/bash # stops the wifi before shutting down, otherwise the current driver implementation hangs /usr/bin/nmcli radio wifi off exit 0
Code:
$ cd /usr/lib/systemd/system-sleep/
$ cat wifi.shutdown
#!/bin/bash
if [ "$1" == "pre" ]; then
echo "Pre $(date +%T)" >> /tmp/suspend
echo turning wifi off
/usr/bin/nmcli radio wifi off
/usr/bin/sleep 7
echo "Pre $(date +%T) done" >> /tmp/suspend
elif [ "$1" == "post" ]; then
echo "Post $(date +%T)" >> /tmp/suspend
/usr/bin/nmcli radio wifi on
fi
exit 0Edit: sorry.. no. it does not always work

