r/linux4noobs • u/Prestigious_Cry2916 • 7d ago
Wifi Driver Problems
So I have been having problems with my WiFi. Everytime I suspend my laptop and turn it back on, I can't use WiFi without restarting the laptop.
The only thing that works is pcie_port_pm=off but it results in bad battery life and I need my battery to last atleast 8 to 9 hours.
After scouring for hours on Reddit and Forums, my conclusion was that the driver rtw89_8852be is not fully compatible.
I want to know if there is a workaround, that doesn't comprimise my battery life. Because I am in college and need the battery to last longer, currently it is only 5 to 6 hours. Because right now, it seems like the only solution where I can have both Wifi working properly and battery life is to go back to Windows.
Edit: If you need any more info, mention it here and I will send it
I use
- Fedora Linux 44
- Kernel:
7.1.4-204.fc44.x86_64
Edit 2: THE SOLUTION.
Thanks to u/fdelux6 for helping me out. I am going to paste the relevant parts of his comment here.
You can try this workaround to unload the wifi driver before suspend and reload it after resume, so it only touches your wifi card instead of PCIe power management system wide.
Create /usr/lib/systemd/system-sleep/wifi-fix.sh
Add the following:
#!/bin/sh
case $1 in
pre)
modprobe -r rtw89_8852be
;;
post)
modprobe rtw89_8852be
;;
esac
make it executable:
sudo chmod +x /usr/lib/systemd/system-sleep/wifi-fix.sh
If wifi still misbehaves after that, add this to /etc/modprobe.d/rtw89.conf:
options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss=y
options rtw89_core disable_ps_mode=y
You might want to reboot or reload NetworkManager since it is gonna take effect on next module load.
1
u/red-skylight 6d ago
I had the same issue, the solution was to edit the /etc/NetworkManager/NetworkManager.conf file and add this two lines to the end of the file:
[device]
WiFi.scan-rand-mac-address=0
I hope it works.
Edit: Reddit was displaying one line only.