Wifi keeps getting disconneted for Realtek RTL8852AE chip

These are the relevant system and network specification

~ $ inxi -Sx
System:
Host: victus-eos Kernel: 6.6.30-2-lts arch: x86_64 bits: 64 compiler: gcc
v: 14.1.1
Desktop: KDE Plasma v: 6.0.4 Distro: EndeavourOS base: Arch Linux

~ $ inxi -Nna --filter
Network:
Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: eno1 state: down mac: <filter>
Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
vendor: Hewlett-Packard driver: rtw89_8852ae v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0 chip-ID: 10ec:8852
class-ID: 0280
IF: wlan0 state: up mac: <filter>
Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant

The Wifi connection of the laptop keeps getting disconnected with my router. This doesn’t happen with any of my other devices at the home. This laptop is dual booted with Windows 11 and the Windows session doesn’t face network interruptions ever. I am sitting couple feet away from my router in clear sight.

The only way to solve is to turn off Wifi in my KDE’s system tray, and turn back on and connect. But this connection doesn’t last more than few minutes and I again get disconnected.

I have tried switching between LTS kernel and the mainline kernel and the problem persists in both of the scenarios

1 Like

on hp site also get this sort of windows issue probably fixed by now. tried disabling fastboot (from bios)
or try to change network frequentie ?

if all that not works , you can try https://aur.archlinux.org/packages/rtw89-dkms-git ?

i

1 Like

Another idea is to blacklist the r8169 driver and reboot.
No need to blacklist an Ethernet driver, sorry about that.

Which driver are you using? Are you using:

1 aur/rtw89-dkms-git 1:r327.e834edf-2 (+12 0.00) 
    Driver for Realtek 8852AE, an 802.11ax device

If not give it a go.

2 Likes

I also agree with @ringo & @xircon to try the package here:
https://aur.archlinux.org/packages/rtw89-dkms-git

since 5.7 is probably in the kernel… its also in linux-firmware @manuel 's idea is possible also

i would check atleast the freq’s of the networkmanager mayby it want to take higher freq , but doesnt work properly idk :slight_smile:

I’m also having an issue with that Wi-Fi chip, and I would like to follow this driver maintainer’s guide here: https://github.com/lwfinger/rtw89
But I’m not advanced enough to figure out how am I supposed to “BLACKLIST THE KERNEL VERSIONS” properly. :frowning:
@manuel any advice on this? And why exactly r8169 driver?
Also, from that same driver’s README for Arch - any advice on how to install “the necessary kernel headers and base-devel”?

The aur package is rtw89:

https://aur.archlinux.org/packages/rtw89-dkms-git

I just installed it, it has no effect unless I blacklist the default drivers shipping with kernel I assume. Any advice on how would I do that?

https://wiki.archlinux.org/title/Kernel_module#Blacklisting

Command lsmod can show currently used kernel modules.
Be sure to blacklist only the “conflicting” modules when installing another for the same purpose.

About r8169, sorry about that, it is an Ethernet driver so no need to blacklist that.

1 Like

Thank you! That was a very helpful piece of info!
In the end, however, properly installing that AUR (which uses the latest driver version from git) and blacklisting existing modules ends up with failing to load that driver with some error. :frowning:
What an unlucky Wi-Fi module I got in that HP laptop.
I wonder what kind of magic Ubuntu does, because that Wi-Fi works perfectly fine on it.
I’m trying to switch from Ubuntu, but oh well, maybe I should just stick with it after all.

1 Like

So I just need to have a file /etc/modprobe.d/nowifi.conf with this content -

blacklist rtw89_8852ae

That is it ?

I believe that you need to blacklist all the rtw-related modules, therefore the content should be

blacklist rtw_8852ae
blacklist rtw_8852a
blacklist rtw89pci
blacklist rtw89core

Then you install that AUR like this:

git clone https://aur.archlinux.org/rtw89-dkms-git.git
cd rtw89-dkms-git
makepkg -sri

Then you reboot, and the Wi-Fi does not work, and if you check sudo dmesg you are probably going to see the errors caused by that new driver.
If it causes the problems I mentioned - then you uninstall that AUR like this:

sudo pacman -Rs rtw89-dkms-git 

Undo that blacklisting (you can just remove that /etc/modprobe.d/nowifi.conf file), and then reboot.
And in my case - the reboot couldn’t even shut down the system, it was getting stuck, so I had to force-shutdown by holding the power button.

Let me know if you’re having better luck, though. :slight_smile:

They probably aren’t doing anything except shipping a different kernel.

Try the LTS kernel and see if you have better luck.

sudo pacman -S linux-lts linux-lts-headers

Boot with the LTS kernel by selecting it in the menu of whatever boot manager you are using.

Nope, I was actually on the LTS kernel already. Both LTS and the mainline kernels ship the same driver on EndeavourOS. openSUSE Tumbleweed ships that same driver.
By taking a closer look at the recent changes to the README.md here:

It seems like this new driver should be built against new 6.10 kernel once that will be released?
So, by checking out to some older commit it could be still possible to build a properly working driver now I guess…

What other kernels have you tried?

What kernel version is your Ubuntu install where it works using?

Ubuntu works well on literally any kernel that is 5.16+. And non-Ubuntu-based Linux distros work worse. I tried Fedora (with multiple kernels), openSUSE, Arch. Pop!_OS works as well as Ubuntu. I did not try Debian.

And I think that is because they ship modified kernels with the good drivers already included.

I have been trying different stuff since the last spring, so for a year already. I did settle with Ubuntu for some time, but they keep breaking with the new releases (and I don’t modify pretty much anything) and that’s just not what I expect from the non-rolling release distro, where it seems like the only real option for stability is to stick with the 2 years old release. I might as well just use Debian at this point, I guess.

So this is how it went.

I installed the drivers using yay and blacklisted the wifi related modules. Since you mentioned that your wifi wasn’t working, I thought I’d just blacklist the bare minimum of drivers related to my driver name. But that didn’t help and I still don’t have working WiFi. Currently connected using Ethernet Cable.

This is the current state of my system:

$ cat /etc/modprobe.d/blacklistWifiModule.conf
blacklist rtw_8852ae
blacklist rtw_8852a

$ lsmod | grep "rtw"
rtw89_8852ae           12288  1
rtw_8852a             708608  1 rtw89_8852ae
rtw89pci              110592  1 rtw89_8852ae
rtw89core             974848  2 rtw89pci,rtw_8852a
mac80211             1576960  2 rtw89pci,rtw89core
cfg80211             1339392  3 rtw_8852a,rtw89core,mac80211

$ inxi -Nna --filter
Network:
Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter>
Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
vendor: Hewlett-Packard driver: rtw89_8852ae v: kernel modules: rtw_8852ae
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0
chip-ID: 10ec:8852 class-ID: 0280
Info: services: NetworkManager,systemd-timesyncd

$ sudo dmesg
.
.
.
.
[    6.915645] rtw89_8852ae 0000:05:00.0: loaded firmware rtw89/rtw8852a_fw.bin
[    6.915674] BUG: kernel NULL pointer dereference, address: 000000000000008c
[    6.916202] #PF: supervisor read access in kernel mode
[    6.916537] #PF: error_code(0x0000) - not-present page
[    6.916850] PGD 0 P4D 0
[    6.917157] Oops: 0000 [#1] PREEMPT SMP NOPTI
.
.
.
.

Can someone please expedite in solving this issue for both me and @funky. So much time sunk for stupid WiFi problems.

You can find out what they do. That might help here too, although Ubuntu is using different kernel versions.

Use e.g. commands

  • lsmod | grep rtw
  • inxi -Nza
  • cat /proc/cmdline

to look for clues. You can show the output here too.

Also see which packages for wireless networking you have currently installed on your Ubuntu system.

i am to lazy read it back :slight_smile:

already tried https://wiki.archlinux.org/title/Network_configuration/Wireless#RTW89 ?

1 Like