New laptop, wifi doesn't work on battery power but works fine on AC power + other power management issues

I recently got an HP Pavilion Aero 13 (not my first choice, I wanted something with better linux support), and it’s been giving me some trouble. It came with realtek b852 wifi, but I couldn’t get that one working at all so I replaced it with an intel AX200. Now it works, but only if I boot while plugged into AC power. If I unplug the power, the wifi will continue to work until I sleep or shut down. Once it stops, I have to reboot while plugged in to make it work again.

I’m guessing it has something to do with power saving, but I don’t really know where to look.

Using KDE Plasma
inxi -Fz
ac power journalctl -b
battery journalctl -b
Let me know what other info I should provide

Side note, I’ve also been having a lot of issues with the whole system freezing frequently when entering/exiting sleep, usually when closing and opening the lid. I’m not able to access a TTY with ctrl+alt+F2 when this happens, and I have to shut down by holding the power button for some time. I doubt it’s related to the wifi issue, but just in case

I’m dual booting Windows 11 with secure boot disabled. I doubt that’s relevant but I saw it brought up in a couple similar topics

Maybe one of these drivers would work with your realtek wifi:

$ yay -Ss realtek 852 | grep -ivP 'bt|blue'
aur/rtl8852be-dkms-git r28.28daf8c-1 (+1 0.03) 
    Realtek Linux WLAN Driver for RTL8852BE
aur/rtw89-dkms-git 1:r327.e834edf-2 (+11 0.66) 
    Driver for Realtek 8852AE, an 802.11ax device

:smiley: @cinderofsouls replaced the realtek.

1 Like

Yeah, just wondering if @cinderofsouls tried any of these before going to Intel…

I did try both of those but wasn’t able to get it working at all. It was a while ago now though so I couldn’t tell you what exactly my troubleshooting looked like unfortunately

1 Like

I’m back to troubleshooting now. It’s hard to be 100% sure, but it seems now like most of my reliability problems are gone while plugged in to power. While plugged in, I can boot, sleep, reboot, shutdown, and all that with no problems. Wifi works, of course.

As soon as I unplug, everything starts freaking out. All of the above, especially waking from sleep and shutting down, often hang at seemingly random points and I have to hard reset. Wifi does not work when waking/booting off battery power.

It definitely feels to me like a power management issue. This is the first time I’ve tried daily driving linux on a laptop, so I don’t really know what I should be looking for. Any suggestions?

Is there a way to disable the internal wifi chipset (realtek) in your bios?
Or, maybe I am misunderstanding your situation (if the ax200 is also internal) but I don’t think so?

Do you have tlp or some other power management package installed?
https://wiki.archlinux.org/title/Power_management

The ax200 is indeed internal. I opened it up and swapped out the card

tlp is not installed. I haven’t touched power management at all, so I just have whatever the default is as of a few days ago. KDE provided powerdevil, and I’m not seeing anything else.

Think EnOS uses power-profiles-daemon?

Confirmed, that’s also installed and running

Disable it, see if that makes a difference…

No difference unfortunately. Wifi is still gone after running disabling and entering/waking from sleep.

sudo systemctl disable power-profiles-daemon.service --now

Maybe reboot?

Something seems to be restarting it even while the service is disabled (probably my DE), so I uninstalled the package entirely and restarted. Still no wifi on battery power

journalctl -b-1 showing one of the shutdown hangs that happens only on battery power, still assuming that’s relevant
It doesn’t always hang at the same spot so it’s pretty hard to say where the error is.

successful shutdown on ac power for comparison

Hi,

Have you tried disabling power saving options for your wifi?
Anyway, your issue looks like this one: https://bbs.archlinux.org/viewtopic.php?pid=1940495#p1940495

The fix was to add options iwlmvm power_scheme=1 to /etc/modprobe.d/iwlmvm.conf.
as described here https://bbs.archlinux.org/viewtopic.php?pid=1940630#p1940630

Have you tried disabling power saving options for your wifi?

How exactly would I do that? Assuming that’s not the same thing as the page you linked.


I was hopeful, but that doesn’t seem to be the same issue I’m having unfortunately. I tried setting that option anyway, but it didn’t do anything. Quoting a few bits from that post:

Tl;dr:

  • Wi-Fi card disappears and fails to function after waking the device from suspend or booting the device when not plugged in (i.e., off battery power).
  • It’s a HP Laptop 14z-fq0000 with an Intel Wi-Fi 6 AX200 160MHz, REV=0x340.
  • I’m using GNOME for a DE;
  • Linux 5.9 for a kernel
  • Vanilla Arch 64 bit (of course)
  • NetworkManager for network management
  • TLP is NOT installed
  • The issue is temporarily resolved by plugging the device in, although breaks after the next suspend or reboot if the device isn’t plugged in.
  • The issue wasn’t present in Windows, although was present in Manjaro, even with kernel 5.4.

Most of this is the same as what I have. We have different laptops, but they’re both HP and both with an AX200. I’m using KDE rather than Gnome, have a newer kernel version (6.1.3), and am using EndeavourOS instead of arch (of course). Everything else is the same.

Running rfkill doesn’t appear to give much insight; everything is unblocked. (Sorry, I’m using my other machine to make this post and didn’t have this output handy so I had to retype it; the others are fine)

ID   TYPE       DEVICE SOFT        HARD
400 bluetooth  hci0        unblocked unblocked
721 wlan         phy718  unblocked unblocked

rfkill never shows the wifi device while it isn’t functioning for me. It’ll show on lspci, but nowhere else (ip link, iwconfig, etc) as far as I’ve seen. Once plugged into power, it shows up everywhere and works as expected.


A collection of other various issues that I’ve noted down only on battery that may or may not be relevant. None of these issues have happened on AC power.

Summary

Various shutdown hangs below. I’m not sure any of these are even relevant, as they seem to happen pretty randomly and the journalctl logs always look pretty much the same to me (same as the one’s I’ve posted previously)

  1. hangs while running various stop jobs that always seem to include “avahi mdns/dns-sd stack”, “session 2 of user”, power profiles daemon", and “disk manager”.
    Sometimes it’ll spin between them forever (i’ve waited up to 10 minutes), and sometimes it’ll freeze up completely.
    I have to hard reset by holding the power button to get out.
  2. hangs while shutting down kvm. I haven’t noted down the exact message as it hasn’t happened for a while now
  3. hangs at some other seemingly random point

Sometimes it’ll hang when I wake it from power saving mode after several minutes of inactivity. Sometimes it’s a black screen where I can move my cursor, and sometimes it’s frozen completely. When I can move my cursor, I can ctrl+alt+F2 (or any other F key) to get into a tty, but that’s frozen with just an underscore on the top left that I can’t interact with. In any case, I have to hard reset to get out.

My desktop environment will always take significantly longer to become responsive when booting off battery power. That might be normal behavior with the system drawing less power, but occasionally it’ll freeze completely and I have to hard reset.

This one gets to be out of the summary block because it’s the most strange. On some sessions, the sudo command won’t work at all. Running any command with sudo will hang without printing any output, and ctrl+C won’t kill it. I have to restart my terminal to get out. pgrep sudo lists one process for every time I ran sudo. kill -9 isn’t able to kill these, and htop lists them all with the D signal. Again, this somehow happens only on battery power


That’s all for now. Should I just reinstall at this point? I feel like that’d be a waste of time as I first noticed these problems barely an hour after this install finished, and I didn’t do really anything other than installing some basic software like kitty, vscode, and my fonts and themes. Whatever is going on now will probably still be there on a new install.

Hi,

While on AC execute the following to get the current power save status

iw dev wlan0 get power_save

To turn it off execute

sudo iw dev wlan0 set power_save off

Reinstalling should be the last option. I would first try to boot off the live installation media to see how the wifi behaves there when AC is unplugged.