protonscr

[General] - Steam relies on broken behavior for battery estimation in the ACPI kernel driver

steamclosed
ValveSoftware/steam-for-linux#12166 · opened 2025-07-04 by matte-schwartz · updated 2025-11-18 · 1 comments · github
Mmatte-schwartz 2025-07-04 github

Your system information

  • Steam client version (build number or date): 1751405894
  • Distribution (e.g. Ubuntu): SteamOS Main + 6.15.4 kernel
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes
  • Steam Logs: steam-logs.tar.gz
  • GPU: AMD Custom GPU 0932 (RADV VANGOGH)

Please describe your issue in as much detail as possible:

Recently, in Linux kernel 6.15.4, a patch was introduced to align the current_now sysfs property with its ABI definition in Documentation/ABI/testing/sysfs-class-power, where current_now is expected to pass a negative value rather than a positive value: https://github.com/torvalds/linux/commit/234f71555019d308c6bc6f98c78c5551cb8cd56a.

However, this created a problem for two userspace implementations of battery estimation on SteamOS: MangoHud and Steam's GamepadUI. In the case of MangoHud, the battery numbers now had some negative values and a nonsensical time remaining. In the case of Steam, the right QAM showed projected battery life as ?h ?m.

MSI Claw:

Image

Steam Deck OLED:

Image

This change is on its way to being reverted for now after I pointed these regressions out (see https://lore.kernel.org/all/CAJZ5v0hvPs2hSP+68+dAgtG-iJR8TBptt4ObTbB5iCf2=EXe=A@mail.gmail.com/), but I was requested to file bug reports against any implementations I came across that relied on the current_now property returning a positive value in case they want to try to fix this mismatch in the future.

Steps for reproducing this issue:

  1. Install kernel 6.15.4 on top of SteamOS Main
  2. Boot into the kernel
  3. Check battery statistics in MangoHud's full preset and in the right QAM
Mmatte-schwartz 2025-11-18 github

I re-applied the previously reverted upstream kernel commit and the estimate looks fine now on 1763422420

Nothing extracted yet.