RTL8822be - Issues with Realtek Wifi

So, I have a new Lenovo Ideapad L340 15IRH Gaming laptop, and I've been trying to use Linux on it. However, in every distro I've tried so far with this new laptop, my wifi and bluetooth just won't work. So, after about a month of distro hopping, I finally landed here (I'm currently running Garuda GNOME), and to my great surprise, the bluetooth works flawlessly here. So, I do wanna congratulate the team on this great job, because in my experience this is the best looking distro and the only distro which lets me use my bluetooth.

However, the wifi issues continue to persist. When I turn on my computer, it connects automatically, but in about a minute I get an error notification saying:

Activation of Network Connection failed

And I lose my connection.

I have a Realtek 8822be Wireless card as mentioned in the title, and this is the dmesg output:

[   51.978178] rtw_8822be 0000:07:00.0: failed to read ASPM, ret=-5
[   51.978276] rtw_8822be 0000:07:00.0: stop vif 8c:c8:4b:f2:6f:71 on port 0
[   53.978359] rtw_8822be 0000:07:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
[   55.978904] rtw_8822be 0000:07:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
[   55.978911] rtw_8822be 0000:07:00.0: mac power on failed
[   55.978913] rtw_8822be 0000:07:00.0: failed to power on mac

So I was hoping I could get some help fixing it.

Thank you!

PS: During updates I also get an error saying that /sys/module/pcie_aspm/parameters/policy can't be written to. Could that be the cause of the problem?

Try disabling Mac address randomization.

That’s nothing to worry about^^^

You can test this driver from the Chaotic-aur:

rtw88-dkms-git

You could also try adding this grub kernel boot parameter if nothing else helps:

pcie_aspm.policy=performance

Welcome to Garuda.

5 Likes

Do I just install with pacman, or do I have to build it?

Thanks for the quick reply, by the way.

1 Like

Pacman, prebuilt in the Chaotic aur.

Did you disable mac randomization?

4 Likes

This doesn’t seem to work. I don’t have to reboot for this to take effect, do I?

I’m trying it right now.

Yes, you do have to reboot, and it's best to reboot your router as well.

Reboot after installing a new driver as well.

4 Likes

I just installed the new drivers and rebooted, and now it doesn't even detect the wifi card. I'm guessing it's because I didn't disable the old drivers. So, how do I disable them?

Also, these new errors have popped up in dmesg:

[   11.964409] rtw_8822be 0000:07:00.0: failed to setup chip efuse info
[   11.964414] rtw_8822be 0000:07:00.0: failed to setup chip information

and,

[   11.996979] Error: Driver 'rtw_8822be' is already registered, aborting...

That requires blacklisting the kernel modules. However the driver installation should have done that.

You can uninstall the driver, reboot and try this:

Disable IPv6 and set your WiFi to performance via kernel boot parameters:

If you are unfamiliar with how to add a kernel boot parameter it can be done easily by using the following command:

sudo cp /etc/default/grub /etc/default/grub.bak && sudo sed '/^GRUB_CMDLINE_LINUX_DEFAULT=/s/"$/ pcie_aspm.policy=performance ipv6.disable=1"/g' -i /etc/default/grub && sudo update-grub 

Press ENTER again if the grub update process does not start scrolling onscreen.

The process wil take a little while to complete, and this is perfectly normal.

Once the grub update process is complete, reboot.

If the change does not improve your connectivity you can restore the file to its original state with:

sudo cp /etc/default/grub.bak /etc/default/grub

After restoring the file, again run:

sudo update-grub 

Then reboot again.

4 Likes

If the above suggestions brought no improvement that brings us back to the proprietary Realtek driver. Perhaps the rtw88-dkms-git driver installer did not create the required blacklist file. There are a few realtek installers that are missing this important step. If you wish to retest the proprietary driver follow these instructions:

Create a file /etc/modprobe.d/rtl8822be.conf

Add the following lines to the conf file (and save the changes):

blacklist rtw_pci
blacklist rtwpci

Then, again install rtw88-dkms-git and reboot.

Sorry but I'm done for now (commitments), good luck.

3 Likes

Could dual booting with windows be causing the problem?

For sure Windows can have side effects on wifi cards (and also bluetooth if I remeber correctly) in general, but I guess this depends also on the specific card model.
I think it would be anyway important at least to make sure that Fast Boot is disabled in Windows.

2 Likes

I would also try using the live usb and see if you encounter the same problem to rule out hardware

2 Likes

I don't think it's a hardware issue because it works perfectly well with windows. And it does work sometimes even in Garuda, but only if I boot into windows connect to the internet and then reboot into Garuda.

and check your bios to see if secure boot and fastboot is disabled

4 Likes

That’s the problem, Windows.
It always works when Win does not block the hardware.
I can’t explain it well, but that’s why Garuda doesn’t recommend this dual-boot.

4 Likes

Secure boot was already disabled. I've now disabled fast boot. The wifi seems to be working at the moment. But I guess only time will tell if this is a permanent fix or not.

I've had the wifi work for a few minutes and then die a lot of times before.

Fastboot breaks lots of thing as it does not release the hardware properly to other systems.
Its a windows thing to make it feel like its booting faster :rofl:

5 Likes

This ^^^ is a good possibility.

Try to turn off power saving in your WiFi adapter’s advanced properties in Windows device manager.

Be doubly sure MAC randomization is disabled.

6 Likes

And it’s happened again.

I’m trying this now.

I think it worked. I disabled some powersaving options in windows' device manager, disabled fast boot and mac randomization, and I'm now sitting here connected to the internet and to my bluetooth earphones, with no external adapters. All that's left to see is whether this fix can survive the night.

If it's all working when I boot into my computer tomorrow morning, I'll mark this question as solved.

3 Likes