Internal WiFi status?
#26
I had success in being able to suspend without any hangs and the wifi on using the following.

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


Also make sure that both files are executable

Code:
% sudo chmod +x /usr/lib/systemd/system-shutdown/wlan_stop.sh
% sudo chmod +x /usr/lib/systemd/system-sleep/wlan_stop.sh


I have tested it a couple of times and it seem to work so far. I can let the pinetab2 go to suspend and wake up again, and wifi pops back into working.

You know that the script is working for suspend when the file /tmp/suspend exists and has timestamps for when it suspended. If that file isn't created then the problem is that the file /usr/lib/systemd/system-sleep/wlan_stop.sh isn't running. 

Code:
% cat /tmp/suspend
Pre: 12:35:31
Post: 12:35:35
Pre: 12:36:41
Post: 12:36:45

(02-23-2024, 08:43 PM)frtodd Wrote: Wilmeri: that's a good find. Placing it in `/usr/lib/systemd/system-sleep/` isn't working for me. But a simple `nnmcli radio wifi off ; systemctl suspend` works nicely, followed by a corresponding "nmcli radio wifi on" when it wakes.

Which led me to check: simply disconnecting wifi by hitting the "Wi-Fi" button in the pull-down menu (the always-available one where you control screen brightness at the bottom) seems to be sufficient to let me suspend and restore gracefully. It's not perfect, but it's not difficult.

Thanks for pointing the way, Wilmeri!

Not sure why it did't work for you, as I see it is very similar to what works well for me.

Perhaps you need to have the full path to nmcli?
  Reply


Messages In This Thread
Internal WiFi status? - by acruhl - 08-04-2023, 09:26 PM
RE: Internal WiFi status? - by rqkeating - 08-05-2023, 07:32 AM
Internal WiFi status? - by moobythegoldensock - 08-05-2023, 11:40 AM
RE: Internal WiFi status? - by lockedpotato - 09-24-2023, 04:29 PM
RE: Internal WiFi status? - by explit - 11-30-2023, 04:41 AM
RE: Internal WiFi status? - by Corfromleuven - 12-07-2023, 04:42 AM
RE: Internal WiFi status? - by explit - 12-07-2023, 05:10 AM
RE: Internal WiFi status? - by diederik - 12-07-2023, 09:55 AM
RE: Internal WiFi status? - by fretinator - 12-15-2023, 06:18 PM
RE: Internal WiFi status? - by u974615 - 12-20-2023, 11:10 AM
RE: Internal WiFi status? - by diederik - 12-20-2023, 12:50 PM
RE: Internal WiFi status? - by polrus - 01-09-2024, 05:28 AM
RE: Internal WiFi status? - by explit - 01-09-2024, 06:44 AM
RE: Internal WiFi status? - by tophneal - 01-09-2024, 02:38 PM
RE: Internal WiFi status? - by explit - 01-09-2024, 08:57 PM
Internal WiFi status? - by moobythegoldensock - 01-10-2024, 02:07 PM
RE: Internal WiFi status? - by explit - 01-10-2024, 06:38 PM
RE: Internal WiFi status? - by Kevin Kofler - 01-10-2024, 07:56 PM
Internal WiFi status? - by moobythegoldensock - 02-06-2024, 05:14 PM
RE: Internal WiFi status? - by Surehand53 - 02-14-2024, 08:05 AM
RE: Internal WiFi status? - by Corkonian - 02-13-2024, 08:41 AM
RE: Internal WiFi status? - by Wilmeri - 02-16-2024, 05:08 AM
RE: Internal WiFi status? - by ninlith - 02-23-2024, 01:59 PM
RE: Internal WiFi status? - by ninlith - 02-23-2024, 04:48 PM
RE: Internal WiFi status? - by frtodd - 02-23-2024, 08:43 PM
RE: Internal WiFi status? - by FortunateFowl - 02-24-2024, 12:57 PM
RE: Internal WiFi status? - by Wilmeri - 03-01-2024, 01:42 PM
RE: Internal WiFi status? - by Username_012 - 02-24-2024, 10:08 PM
RE: Internal WiFi status? - by Kevin Kofler - 02-25-2024, 02:22 AM
RE: Internal WiFi status? - by Username_012 - 02-26-2024, 07:31 AM
RE: Internal WiFi status? - by Kevin Kofler - 02-26-2024, 07:51 AM
RE: Internal WiFi status? - by Username_012 - 02-26-2024, 08:53 PM
RE: Internal WiFi status? - by mtomaschett - 03-09-2024, 05:22 PM
RE: Internal WiFi status? - by pinewood - 04-30-2024, 12:07 PM
RE: Internal WiFi status? - by cringeops - 05-04-2024, 08:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Video Tutorial: SDR/GQRX- Listening In To Voice On Pinetab (Internal SDR) RTP 1 2,575 03-08-2021, 09:33 AM
Last Post: barray

Forum Jump:


Users browsing this thread: 1 Guest(s)