I installed Ubuntu on a HP Pavilion laptop with an RealTek RTL8723BE network card. The wireless network is available when the system boots, but after waking it up from suspend, the wireless lan is disabled and can’t be turned back on.
Pastebin info from the wireless-info script:
https://dpaste.com/CYRNW7Y26
Ubuntu Version:
Ubuntu 24.04.2 LTS, fully updated.
Desktop Environment (if applicable):
KDE Plasma
Problem Description:
RFKILL says the interface is hard-blocked when it comes out of suspend, but there’s no physical switch on the laptop. DMESG has an entry that says “rtlwifi: wireless switch is on”. There is no keyboard switch nor one on either side of the laptop.
Relevant System Information:
HP Pavilion laptop, serial 5CD52408B0. Realtek RTL8723BE network card.
Screenshots or Error Messages:
After coming out of suspend, clicking on the wifi icon in the lower right corner of the screen displays a message that wireless has been disabled. RFKILL says the wireless lan is hard blocked. There is no wifi disable keystroke or switch. Airplane mode is off.
What I’ve Tried:
- Set wifi.powersave=2 in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
- Added “pcie=nomsi” to grub commandline
- Added “apparmor=0” to grub commandline
- In the Power Management section of the system settings, I set Wireless to be turned on. When that didn’t work, I set it to “leave unchanged”.
Try these
1. Create systemd service to reload driver after suspend
File: /etc/systemd/system/rtl8723be-fix.service
[Unit]
Description=Fix RTL8723BE WiFi after suspend
After=suspend.target
[Service]
Type=oneshot
ExecStart=/sbin/modprobe -r rtl8723be
ExecStartPost=/sbin/modprobe rtl8723be
[Install]
WantedBy=suspend.target
2. Disable WiFi power save
File: /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
wifi.powersave = 2
3. Add kernel module options
File: /etc/modprobe.d/rtl8723be.conf
options rtl8723be fwlps=0 ips=0 ant_sel=2
Shadirvan,
I put the 1st and 3rd files in those places as you said. I’d already made the second change. After rebooting, I closed the laptop lid, which suspended it. After a few minutes I reopened it and the wifi was disabled as before.
I tried manually entering the modprobe steps, but that didn’t make any difference. Still disabled.
I tried “ip link set wlo1 up”, but that returns “Operation not possible due to RF-kill”.
Thanks,
Bob
It has always been my understanding that when laptops go into Suspend mode, to conserve the battery, it begins to power shed unnecessary items. One would think that a wireless chip/card is unnecessary while in suspension.
Have you considered just powering off rather than suspending if for more than 5 minutes?
Very true. However, this laptop dual boots Windows 11 and I don’t have problems with the wireless adapter there. Comes right back after suspend.
Your point, however, is well taken. The only way to get Ubuntu to restore the wifi connection is to reboot it. As best I can tell from the diagnostics I’ve run is that the card is getting powered off and the only thing that turns the power back on is to reboot the laptop.
Thanks,
Bob
this laptop dual boots Windows 11 and I don’t have problems with the wireless adapter there
There you have it: either HP or MS pays for OEM RTL8723BE drivers. Have you ever considered single booting Ubuntu; however, if you only have one computer that is probably not possible.
I would try sudo modprobe -r rtl8723be
sudo rfkill unblock all
sudo modprobe rtl8723be
See if that fixes it after suspending
Unfortunately, it does not. I tried removing removing rtlwifi as well and adding it back with no success.
I tried:
modprobe -r rtl8723be
rfkill unblock all
rfkill list all
(and got no output)
modprobe rtl8723be
rfkill list all
(showed the rtl8723be still hard blocked)
Thanks!
Bob
what results for lsmod | grep wmi
Here are the wmi modules:
snd_rawmidi 57344 1 snd_seq_midi
wmi_bmof 12288 0
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd 143360 18 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
wmi 28672 2 video,wmi_bmof
And here are the Realtek modules:
rtl8723be 176128 0
btcoexist 294912 1 rtl8723be
rtl8723_common 24576 1 rtl8723be
rtl_pci 40960 1 rtl8723be
rtlwifi 143360 4 rtl_pci,rtl8723be,btcoexist,rtl8723_common
mac80211 1777664 3 rtl_pci,rtl8723be,rtlwifi
Thanks,
Bob