Wifi random disconnects after update

After not doing updates for a while (being too busy to risk any update issues) I did a huge system update a few days ago. That included jumping from kernel 5.15 to 6.3.5-2 and down to 6.2.16-2. (Turned out ZFS was not yet supported in 6.3.)
After sorting out quite a few issues, I’m left with one issue I can’t figure out: After using the pc for a couple of hours, the WiFi connection starts dropping for a couple of seconds every few minutes.
If I reboot, the wifi works perfectly for an hour or two, then the issue comes back. Same if I put the system in sleep.

journalctl -f --unit NetworkManager --no-pager --no-hostname

I find the following entry when wifi disconnects:

june 22 21:28:13 NetworkManager[1407]: <info>  [1687462093.7704] manager: rfkill: Wi-Fi now disabled by radio killswitch

and a few seconds later:

june 22 21:28:18 NetworkManager[1407]: <info>  [1687462098.6716] manager: rfkill: Wi-Fi now enabled by radio killswitch

So it looks like the system thinks someone pressed the radio off button. But that was not the case. How can I debug this? I’m sure this is not a mechanical button issue because this problem started a couple of hours after the system update, and the problem is gone for an hour or two after every reboot or wake up from sleep.

Another observation is that this issue seems to appear only while the keyboard is left untouched - i.e. while I’m reading something. So far it has never happened while I’ve been writing on the keyboard.

6.2 is EOL so you might want to at least make sure to have another like 5.15 or 6.1 installed.

Manjaro never forces you to upgrade major kernel versions so I’m not sure why you included it here - 5.15 is LTS and support continues (until ~Oct 2026).

Speaking of … how does the wireless fare on 5.15 ?

This could be power saving issue which is one of the usual causes (though rfkill is not typical for that), try this (this worked for me in number of cases, or helped)…

To turn off powersave for network/wifi:

sudo vim /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
wifi.powersave = 2

…‘2’ means ‘disable’ powersave

Also check here for an alternative Network is unavailable after sleep - #18 by brahma

But also very good catch by cscs, try that first.

Thanks. I’ll try to disable powersave and see how it turns out.
If it works out, I see this as a temparary workaround to narrow down the problem. I love long battery time.

(This is probably off topic, but I’ll leave it as a comment)
In the Manjaro Settings Manager gui → Kernels, the 6.2.16-2 is the second newest if we exclude RT-kernels. As the newest kernel (6.3) doesn’t work with zfs (I noticed something about a fix being published the day after I updated) I went with the second newest.

The reason I left 5.15 is that I got conflicting dependencies when updating some of the ZFS packages. There would probably be lots of ways to work around that, the issue could maybe even qualify for a bug report, but as I had not done updates for quite a long time I though the dependency issues most likely would come down to the fact that the installed version was too old. The path I choose to go in order to work around the dependency issues was to jump to 6.2 kernel and remove 5.15 from the system before the update.
5.15 worked perfectly. Everything with the system worked perfectly before the update, except for the hibernate randomly fails issue, which has the workaround when fail: open any application (like mousepad) and close it again. Then hibernate. This issue I’ve had since I started using manjaro, 3 years ago. I think it’s related to virtualbox being installed, as hibernate mostly fail when shutting down a vm was one of the last things I did before hibernating.

My /etc/NetworkManager/conf.d folder is empty. Is it ok to just create the file, or should I put the setting somewhere else? Is there any way to test if the setting has been read by the system?

The only place I can find [connection] among the existing files is in the files

Should I put the setting in the {current-SSID}.nmconnection file as well?
I currently did both (added to {current-SSID}.nmconnection and created /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf )

I’ll reboot and see how it goes.

That command will create a new file for you when there isn’t one - just put those 2 lines inside, save it (:wq - or use your own editor, you’ll just need to run with sudo).
And then you’ll probably need to restart, always good.
So, short answer, just create the file within the /etc/NetworkManager/conf.d/ dir and you’ll be fine.

The disconnect issue seems to be solved by disabling wifi power save.

That leads to the next question: Why does power save want to trigger rfkill? Is there a timeout for inactivity that triggers it? If so, is there a place this timeout could be adjusted?

I notice that the laptop fan now is constantly running and the battery consumption reported by tlp-stat is about 15-20% higher than I usually see. This is can be caused by lots of things, i.e an ad at any of my many open browser tabs. Lots of that power increase is caused by the fan it self. Put there is no processes repported by htop (run as root) that uses more than 0.6% cpu. So I think the extra battery usage is caused by hardware.
I’d like to turn the powersave back on, but need to figure out why it triggers rfkill so frequently.

Oh. Just now as I were about to send this post, the fan stopped for a short while. I got the opportunity to compare battery consumption before it stopped, while it was stopped, and after it had started again. A running fan increases battery consumption by 8-10%.
So it looks like about half of the increased battery consumption is used to cool down the extra heat generated by the other half of the increased battery consumption.
(This system typically uses about 3w at my normal usage. That’s why the fan (that usually doesn’t run unless I have a vm running) can make such a difference.)