Helloooo, my big long annoying saga dealing with the wireless on my old asus laptop seems to have finally come to an end. Here it is all layed out...


Computer: Asus Vivobook Max X541UJ

Wireless Card: Realtek RTL8723be

System: Debian 13 + KDE


Antennae Problem + Solution: I found this article suggesting the system may be preferring/defaulting to an unconnected antenna port on the wireless card. The solution listed was creating a config file ('rtl8723be.conf') in '/etc/modprobe.d' and adding the line 'options rtl8723be ant_sel=1' OR 'options rtl8723be ant_sel=2'. Using the echo command in the article didn't work for me, but navigating to and opening a terminal in that folder then creating/editing the file with 'sudo nano rtl8723be.conf' did. I tried both variants (ant_sel=1 & ant_sel=2), rebooted after each, and ant_sel=2 worked for me. You can be more precise by testing the connection strength each time, but the difference between antennas for me was no wireless connection vs. a steady wireless connection, so I moved on. The article also suggests opening the laptop and reconnecting the Wifi antenna to the other port, but when I opened this laptop there was only one populated connector on the board, labelled '1', the '2' slot was on the PCB but without a port (there is also only one antenna in this laptop). So I have no idea why ant_sel=2 worked, maybe the physical labelling is different from the circuitry/firmware labelling? And also as my experience demonstrates, this card may be modified differently depending on the PC 'manufacturer' and model/region it is sold in. Anyway, this solution stopped it cutting out when connected, but it was still fully disconnecting for no reason at random times.


Power Save Problem + Solutions: This part is what took the longest to work out. Multiple posts I found online pointed to some powersave option powering down the wireless card (when it wasn't being directly used or with reboots and sleep/suspend) without powering it back up afterwards. The solution (gathered from multiple posts linked at the end) was to disable any firmware's ability to control the power state of the card.

Some posts pointed to adding 'fwlps=0' (FirmWare Link Power Save = off) to the '/etc/modprobe.d/rtl8723be.conf' file I already made for the antenna select issue, so that it now reads; 'options rtl8723be ant_sel=2 fwlps=0'.

Another post also suggested turning off wifi powersave in whatever network manager you use. For me on Debian KDE this was NetworkManager, so I had to create a config file at '/etc/NetworkManager/conf.d/wifi-powersave-off.conf' with the following lines (the 'wifi.powersave = 2' is the off setting btw):


[connection]
wifi.powersave = 2

These two in tandem helped A LOT with the connection cut outs, but they would still happen from time to time on resume from sleep/suspend. I vaguely researched just replacing the wifi card after I had done so rather painlessly and affordably on my other HP laptop. But this Asus laptop only has one antenna as mentioned before, and almost no mini PCI wireless card available only has one connection port (I think this was something done by Asus with the cards they bought en masse, one less port = a fraction of a cent saved). This means I would likely have to install a second antenna through the base of the laptop and up around/inside the screen bezel (as is their traditional placement on laptops) in order to not have new problems with an unpopulated antenna port (some cards put bluetooth on only one port, and most separate 5G and 2.4G across different ports). Seemed like a lot of work that wasn't even guaranteed to pay off, so I kept looking for other solutions.

I remembered seeing two more potential fixes across a few posts that seemed like they would target the powersave upon resume from sleep at the most basic level of the system I have. One was to create a systemd service (obviously only applies to systemd users), and the other was adding a kernel parameter to the grub boot command.

The systemd service solution was gathered from this post, which I should have followed from the start as it also includes the modprobe and NetworkManager fixes lol. Anyway, it said to create a file at '/etc/systemd/system/rtl8723be-fix.service' and add the following lines (to direct systemd to apply the modprobe fix on startup):


[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


The grub boot parameter I got from this post, which also linked to the arch wiki wireless page section about this card. This explained that the card's driver is apart of the mainline kernel, and the 'fwlps=0' paramenter could be applied directly on boot with the phrase 'rtl8723be.fwlps=0' (syntax being [module].[parameter]=[option]). Adding this to the "" quotations after 'GRUB_CMDLINE_LINUX_DEFAULT=' in the file '/etc/default/grub', with a space between any other parameters, that line should now read something like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rtl8723be.fwlps=0"

follow that up with a 'sudo update-grub'. Mine actually has another parameter (pcie_aspm=off) which apparently does nothing with the newer kernel included in Debian 13, and might explain why I never had this problem on Debian 12. That parameter (PCIExpress slot devices _ Active State Power Management = off) possibly handled the issue of the wireless card being powered down by firmware randomly. I ideally should remove it, and replace it with 'pci=noaer' (PCI = No Advanced Error Reporting ?) to solve this laptop's other issue with security error reports filling up the limited inbuilt NVRAM, but I only just fixed the wireless the other day and was hesitant to change anything else.


Conclusion: Since applying the last fixes (systemd service and grub boot command) the wireless has been working without issue for about a week, even on resume from sleep. I can't be certain if all of those solutions are necessary, but the ones that target the same thing (fwlps=0) shouldn't negatively effect each other anyway. Maybe just the grub boot command would be sufficient, especially on a non systemd distro. Hopefully this can help someone with the same or similar card/issue, or point in the direction of a solution for other wireless cards.

Thanks for reading!

EDIT: literally the day of writing this new problems came up. The garudalinux forum post linked below has a comment with several other fixes, one of which helped me. Specifically the one about stopping MAC randomization, this isn't necessary on home networks as you don't really need to obfuscate your connection, and it can cause connection problems. I also did a bit more searching and found the rtl8723be module has it's own aspm control parameter (available parameters are listed in /sys/module/rtl8723be/parameters, so I added 'aspm=0' to the rtl8723be.conf file mentioned throughout, and 'rtl8723be.aspm=0' to the grub boot command, to disable aspm just for it. Maybe overkill because the new problem seemed to be MAC address related, according to dmesg (sudo dmesg -w), but I am sick of this thing cutting out lol.


rest of these I had saved, but they more pointed me to the better posts above