If you run Linux on a Samsung Galaxy Book4 (Pro / Ultra / etc.), you've probably hit the annoying bug where booting unplugged hides your battery completely (no battery icon, no percentage, no 'BAT1' in '/sys/class/power_supply/') unless you plug the charger in before pressing power.
Until now, the only fix was loading a dummy ACPI table via 'acpi_configfs' from userspace (which requires turning off Secure Boot / kernel lockdown).
After digging into the 'P11ALX' DSDT on my Galaxy Book4 Ultra ('960XGL' / 'NP960XGL-XG1BR'), I put together a lightweight kernel-space DKMS module (plus a draft upstream patch for the mainline Linux 'samsung-galaxybook' driver):
https://github.com/dgiraltt/samsung-galaxybook-battery-fix
What it does:
- Detects if Linux skipped 'ADP1' (charger) or 'BAT1' (battery) during early boot and triggers a native kernel 'acpi_bus_scan()' once the firmware unhides them (~3 seconds into boot, before your desktop even loads)
- Works across all Samsung Galaxy Book models (safe no-op if your battery was already detected)
- Works on Arch/CachyOS, Fedora, Ubuntu/Debian, openSUSE, and supports both Clang and GCC kernels
- Compatible with Secure Boot / kernel lockdown once MOK-signed
Tested on Galaxy Book4 Ultra ('960XGL', BIOS 'P11ALX', CachyOS kernel '7.3.6-3-cachyos', build-verified on '6.18.65-1-cachyos-lts').
If anyone tries it on other Galaxy Book models (Book3 / Book4 / Book5) or other distros, please drop a quick report in the GitHub Issues — it'll really help with submitting the fix upstream to the Linux kernel!