Lost wifi and wifi settings after last update

I more or less have the same issue then here : thelinuxkid/first-project
But somehow different and I’m afraid if I join the discussion it could be confusing.

I’m on a fresh install (24h) of Fedora 36, and when updating an hour ago, on reboot the wifi settings didn’t show up again, and wifi was not working.

But rfkill list all returns this:

0: ideapad_wlan: Wireless LAN
 	Soft blocked: no
	Hard blocked: no

and nmcli con show shows all wifi networks.

Before the update

On the install 24h ago I had already issues with the wifi not working really well.
What I did is as follow:

lspci returned

02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter

and the driver seemed to be rtw_8822ce

lsmod | grep rtw was returning rtw_8822c but not rtw_8822ce

I followed this guideline: GitHub - lwfinger/rtw88


 git clone `https://github.com/lwfinger/rtw88.git`
 cd rtw88
 sudo make install

And in order to avoid conflicts, I blacklisted rtw_8822c (I created a file in /etc/modprobe.d containing blacklist rtw_8822c)

And well, it was working.

After the last update

lsmod | grep rtw doesn’t return anything
The drivers seems to be missing in the new kernel?

So, I followed again the guidelines in GitHub - lwfinger/rtw88
that says that after a kernel update I should do the following:

cd ~/rtw88
git pull
sudo make install

and it returned Install rtw88 SUCCESS

But now modprobe rtw_8822ce gives me

modprobe: ERROR: could not insert 'rtw_8822ce': Exec format error

And wifi is still not working (But bluteooth, and bluetooth tethering is)

What is really bizarre in all of this, is that wifi is not even shown in the Settings…

I tried booting on the previous kernels

Wifi settings are present, and wifi works.

lsmod | grep rtw returns

rtw_8822ce             16384  0
rtw_8822c             491520  1 rtw_8822ce
rtw_pci                28672  1 rtw_8822ce
rtw_core              249856  2 rtw_8822c,rtw_pci
mac80211             1196032  2 rtw_core,rtw_pci
cfg80211             1052672  2 rtw_core,mac80211

Wifi settings are there, but doesn’t work. It shows as connected, but all programs are signaling issues with the network and I can’t load anything.

lsmod | grep rtw returns

rtw88_8822ce           16384  0
rtw88_8822c           479232  1 rtw88_8822ce
rtw88_pci              28672  1 rtw88_8822ce
rtw88_core            184320  2 rtw88_pci,rtw88_8822c
mac80211             1187840  2 rtw88_pci,rtw88_core
cfg80211             1048576  2 rtw88_core,mac80211

And finally in 5.18.7-200.fc36.x86_64 (last kernel)
Although nmcli con show is able to identify all networks, wifi doesn’t work and wifi settings are not present.

lsmod | grep rtw returns nothing

Since you had to install them manually then it may be necessary to do a reinstall so they are compiled for the newer kernel. It may be that the ‘git pull’ made some changes that broke the driver for you, although I would not expect that.

If a reinstall does not fix it then this may need to be reported as a bug on the 5.18.7 kernel. It seems a possible regression if the kernel affected it.

Please make sure you are booted to the 5.18.7 kernel when you do the rebuild steps for that module so the module applies to the running kernel.

Thank you for your reply.
So that is what I did previsouly, and I tried it again ( I am on 5.18.7):

cd ~/rtw88
git pull
sudo make install

and it returned Install rtw88 SUCCESS

But now modprobe rtw_8822ce or modprobe rtw_8822c gives me

modprobe: ERROR: could not insert 'rtw_8822ce': Exec format error

In any case

rtw_8822c was present in older kernels. I only installed rtw_8822ce. In older kernels, and before me adding those drivers, wifi was working (although with some bugs), and wifi settings were still present.

It seems like the new kernel discarded rtw_* altogether.

(I should add, although I previously mentionned it, I’m able to connect via bluetooth tethering with my phone, so bluetooth works and I can update or pull)

I created an post in the Github for the Realtek rtlwifi drivers : Fails on kernel 5.18.7 for fedora36 · Issue #91 · lwfinger/rtw88 · GitHub

maybe that is the right place for pointing out the issue.

Also, the return of dmesg is :

rtw_core: version magic '5.18.6-200.fc36.x86_64 SMP preempt mod_unload ' 
should be '5.18.7-200.fc36.x86_64 SMP preempt mod_unload '

If I understand well, it seems to be the reason for the modprobe: ERROR

Problem solved.
Here a the responses by the maintainer of the drivers on Github:

Your problem is that you built the driver with 5.18.6 headers, but are running a 5.18.7 kernel. THEY MUST MATCH. No exceptions.


When you changed to kernel, redoing a ‘make’ and ‘sudo make install’ should have fixed it. BTW, those steps are needed every time the kernel changes. Those are kernel rules, not mine. A long time ago (version 0.x), that rule was not in place, and the kernel devs wasted a lot of time chasing “bugs” that turned out to happen because the driver was built with the wrong headers. Thus the inflexible rule was born!

Doing ‘make clean’, ‘make’, and ‘sudo make install’ should get you back on the air.

And so I did, I rebuilt the driver and wifi works again.

The make clean part was not noted before, and make usually does not rebuild the parts that are already there.
This is a part missing in the steps you posted earlier, and possibly missing from the instructions you followed.

One needs to remember that any time a module (or any other software) is being rebuilt that ‘make clean’ should be run before running ‘make’ so all parts of the new package are actually rebuilt and problems of this sort are avoided. During my days in college I was bitten by that omission more than once.

Glad it was figured out and that you are back to functioning now. :+1: