HP laptop battery randomly reports 0% ("Battery empty, about to hibernate") even though it's charging and battery isn't empty

Hi everyone,

I’m running Fedora 44 with kernel 7.0.14-201.fc44.x86_64 on an HP laptop.

I’m facing a recurring battery issue that i’ve temporarily fixed before, but it keeps coming back after some time.

Symptoms

GNOME suddenly shows:

Battery empty. Device about to hibernate.

However, the battery is not actually empty.

upower reports:

state: charging
percentage: 0%
energy: 0 Wh
energy-full: 0 Wh
energy-full-design: 0 Wh
voltage: ~12.6 V
charge-cycles: 65

The battery is plugged in and charging, but every energy value becomes zero.

What I found

From /sys/class/power_supply/BAT0:

  • POWER_SUPPLY_ENERGY_NOW exists and contains a valid value.

  • POWER_SUPPLY_VOLTAGE_NOW is also present.

  • However, attributes like POWER_SUPPLY_ENERGY_FULL, POWER_SUPPLY_ENERGY_FULL_DESIGN, and POWER_SUPPLY_CAPACITY are missing.

Also, there is no capacity file under:

/sys/class/power_supply/BAT0/capacity

The kernel log contains:

ACPI Error: Divide by zero
ACPI Error: Aborting method \_SB.BAT0._BTP due to previous error (AE_AML_DIVIDE_BY_ZERO)
ACPI: battery: Slot [BAT0] (battery present)

Because of this, UPower reports the battery as 0%, causing GNOME to think the battery is empty and display hibernation warnings.

What I’ve already tried

  • Updated to the latest available BIOS from HP (F.38).

  • Running the latest Fedora updates.

  • Restarting UPower.

  • Rebooting (sometimes fixes it temporarily, but the issue eventually returns).

  • Verified that the battery itself is healthy (only ~65 charge cycles).

Other observations

This isn’t the only hardware-related issue I’ve experienced. Occasionally I’ve also seen:

  • audio devices disappearing,

  • other hardware state inconsistencies that sometimes disappear after reboot.

So I’m wondering if this is related to an ACPI/Embedded Controller issue rather than the battery itself.

Questions

  1. Has anyone seen this on HP laptops running recent Fedora kernels?

  2. Is this likely an ACPI firmware bug, an Embedded Controller issue, or a kernel regression?

  3. Is there any way to reload/reset the battery or ACPI driver without rebooting?

  4. Are there any kernel parameters or patches worth trying?

Any suggestions for additional debugging would also be appreciated.

Update:

I may have identified a possible trigger.

This morning the issue appeared after I resumed the laptop from sleep. The system had been suspended since around 7 PM the previous day. When I woke it up, GNOME showed “Battery empty, device about to hibernate”, even though the charger was connected and the battery was clearly not empty.

I then rebooted the system, and the problem disappeared completely.

After reboot:

  • Battery percentage returned to 86%

  • POWER_SUPPLY_ENERGY_FULL, POWER_SUPPLY_ENERGY_FULL_DESIGN, and POWER_SUPPLY_CAPACITY were all present again in /sys/class/power_supply/BAT0/uevent.

  • upower once again reported the correct battery statistics (energy, time to full, percentage, etc.).

This makes me suspect the issue may be related to suspend/resume (sleep) rather than the battery itself. It seems that after resuming, the kernel/ACPI layer occasionally fails to restore the battery information correctly until the next reboot.

So rebooting is a temporary solution until it comes back a few weeks later.