Yea after firmware it still have the issue where wifi is unable to connect after sleep or suspend
Context for others. This seems to be a continuation of this (now locked) thread.
Thanks @bink for the link to the previous thread.
In that thread, @exp used rfkill block
before and rfkill unblock
after sleepmode to solve wifi issues. If this solution can work for you, maybe a systemd.service unit or a script can do this for you. The script may be easier to handle.
You can choose a name you want, in this example I name it sleep-wake-hook.sh
Put the script in
/lib/systemd/system-sleep/
and make it executable. The script can contain many commands, they will be executed line after line. For each command you have to use the full path to the command.
#!/bin/sh
case $1/$2 in
pre/*)
#standby / suspend / hibernate sleep
#important: full path, maybe you need " ' " to enclose the command and parameters
/usr/bin/rfkill block
# next command
# another command
;;
post/*)
#standby / suspend / hibernate awake
#important: full path, maybe you need " ' " to enclose the command and parameters
/usr/bin/rfkill unblock
# next command
# another command
;;
esac
Hope this can help.
Step-by-Step Guide:
Create the script:
Open a terminal and create the script in the /lib/systemd/system-sleep/ directory.
Run the following command to open the script for editing:
bash
sudo nano /lib/systemd/system-sleep/sleep-wake-hook.sh
Add the script content:
Copy the following content into the file:
sh
#!/bin/sh
case $1/$2 in
pre/*)
# Before going to sleep (standby/suspend/hibernate)
/usr/bin/rfkill block
;;
post/*)
# After waking up (standby/suspend/hibernate)
/usr/bin/rfkill unblock
;;
esac
Make the script executable:
After saving and closing the file (Ctrl+X, Y, Enter), make the script executable by running:
bash
sudo chmod +x /lib/systemd/system-sleep/sleep-wake-hook.sh
Verify the full paths:
The rfkill command is located at /usr/bin/rfkill on most Linux distributions, but you can verify this by running:
bash
which rfkill
If it's different, update the script with the correct path.
Test the script:
You can test the script by suspending and waking the system to see if the Wi-Fi behaves as expected.
I set this up but it doesnt seem to help after I test with sleep, it just stuck in configuration but never connect
Hey does anyone have this issues, I really dont want to just go back to lts firmware cause it feel like I am no longer using arch anymore so I just wait until arch update that would solve this issue or try to fixed it on my owned somehow
I decide to give up and just downgrade using
sudo pacman -S linux-lts
This would just install a different linux firmware and the wifi work again. Answer using chatgpt but I think it is kind of suck that it is the last result.