I have to restart my computer in order to get my WiFi back, turning WiFi on and off doesn’t work, disconnecting and then connecting doesn’t work, even logging out and logging in doesn’t work, it just says that it’s deactivated. Also it’s changed the name of my WiFi to “wlp7s0”, idk if that’s normal or not, it works perfectly fine after a reboot though.
Maybe there’s a command that could work in getting it going again (sudo systemctl restart NetworkManager did not work) but even if that’s the case it’s not ideal, I obviously want to be able to put my computer into sleep mode and wake it again without dealing with this.
Here’s some info: I9 13900k RTX 4090 OpenSUSE Tumbleweed
DeviceName: Intel WiFi 6E AX210
Subsystem: ASUSTeK Computer Inc. ProArt X570-CREATOR WIFI
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
Thanks for the warm welcome! How do I implement this script? I used sudo nano and then the path specified in the post and saved it as a .sh file, is this the wrong type of script? It did not work but I feel like I have done something wrong. Also, if I turn off the wifi and then put the computer to sleep and wake it again, it DOES work when I turn on wifi so we are on the right track, bluetooth works fine regardless as my mouse is bluetooth and works fine after waking up from sleep.
This is the output of “ls -l /usr/lib/systemd/system-sleep/”
total 16
-rwxr-xr-x 1 root root 8073 Nov 13 01:09 grub2.sleep
-rwxr-xr-x 1 root root 92 Oct 23 04:53 nvidia
-rw-r–r-- 1 root root 182 Nov 26 14:15 wifisleep.sh
wifisleep is the script I made, I copy and pasted the code from that post, and I did indeed reboot and try again. Either the code is wrong somehow, or the script is not activating? We basically need to toggle the wifi off before every sleep and on after every sleep, if we can do that, that would be the fix
Done it, also tested the script to see if it works with
“sudo /usr/lib/systemd/system-sleep/wifisleep.sh pre”
“sudo /usr/lib/systemd/system-sleep/wifisleep.sh post”
and the script DOES work, I just can’t get it to run when I suspend the computer.
Is it possible that they just don’t run IN TIME for it to work? When I suspend the computer, for a brief moment I notice the wifi symbol saying it is deactivated, right before the computer goes to sleep. Is it possible that whatever is borking the wifi is taking place before the script has a chance to run?
Works here… open a virtual terminal (e.g. Ctrl+Alt+F4) and issue:
su -
systemctl suspend
then resume and look at the end of the current journal:
journalctl -b
I see the like of:
Nov 26 16:53:26 LT-B NetworkManager[1717]: <info> [1732636406.7091] manager: rfkill: Wi-Fi now disabled by radio killswitch
Nov 26 16:53:26 LT-B rfkill[38837]: block set for all
Nov 26 16:53:26 LT-B systemd-sleep[38834]: Killed wifi/bluetooth
Nov 26 16:53:26 LT-B systemd-sleep[38821]: Performing sleep operation 'suspend'...
Nov 26 16:53:26 LT-B kernel: PM: suspend entry (deep)
Hey seems to be working now, thanks a ton! After running the systemctl suspend command from the terminal it just started working, don’t recall if it was due to a reboot, but anyone else who encounters this issue should be able to benefit from this thread, thank you!
#!/usr/bin/env bash
case ${1} in
pre)
rfkill block all
echo “Killed wifi/bluetooth”
;;
post)
rfkill unblock all
echo “Started wifi/bluetooth”
;;
esac
Press Ctrl + X, it will then prompt you to save, press the Y key, and then press the Enter key. Now that the terminal is back to normal, enter the following command:
sudo chmod +x wifisleep.sh
Reboot the computer and enter the following command, which will put the computer to sleep:
systemctl suspend
Now retry putting the computer to sleep the way you usually do (power button, CTRL + ALT + DELETE, or application menu). It should all work now. Thank you to @OrsoBruno for the help, and @jsmith64 for the script.
You’re very welcome. I don’t know if the machine I was working on lost Wi-Fi after resuming from suspend or not. It froze up after waking, no keyboard, nothing, then rebooted on it’s own after a few minutes.
I’m very glad it helped you. It appears there’s different symptoms from the same problem or maybe the same fix to a few problems.