Feature Request: ACPI `_BIX` to report battery cycle count

As of today (BIOS 3.08), the package returned from ACPI method _BIX (\_SB.PC00.LPCB.BAT1._BIX) contains a Zero in field 0xB (Cycle Count)¹. This results in Windows being unable to report the cycle count via powercfg.

Read EC_MEMMAP_BAT_CCNT (0x015C) into STAX[0x0B]:

diff --git a/dsdt.dsl b/dsdt.dsl
index c48acc4..edd6055 100644
--- a/dsdt.dsl
+++ b/dsdt.dsl
@@ -75206,6 +75206,7 @@ DefinitionBlock ("", "DSDT", 2, "INSYDE", "TGL-ULT", 0x00000002)
                 Local3 |= (Local4 << 0x20)
                 STAX [0x11] = ToString (Concatenate (Local3, Zero), Ones)
                 STAX [0x08] = ^^EC0.M001 (0x014D)
+                STAX [0x0B] = ^^EC0.M005 (0x015C)
                 Local3 = ^^EC0.M005 (0x0160)
                 Local4 = ^^EC0.M005 (0x0164)
                 Local3 |= (Local4 << 0x20)

(This is from an ASL disassembly, and I do not expect that the source names match the dumped ones.)

¹ Apparently it moved in _BIX revision 1, but according to the FreeBSD project, “hardware vendors still stick to … _BIX rev.0”


Yay! I think this shipped in 3.09.