Date: Wed, 20 Sep 2023 21:27:10 +0000 From: bugzilla-noreply@freebsd.org To: acpi@FreeBSD.org Subject: [Bug 252030] No battery reading after upgrade to 12.2-RELEASE Fujitsu lifebook s936 Message-ID: <bug-252030-16045-9TKAFTIsFw@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-252030-16045@https.bugs.freebsd.org/bugzilla/> References: <bug-252030-16045@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252030 --- Comment #3 from freebsd@chillt.de --- The problem is that some Fujitsu Lifebooks return an invalid _BIX object. T= he first element of _BIX is a revision number, which indicates what elements w= ill follow: * ACPI 4.0 defined _BIX revision 0 with 20 elements. * ACPI 6.0 introduced _BIX revision 1 with 21 elements. The problem is that the offending Lifebooks have the a non-zero _BIX revisi= on, but provide 20 fields only. The ACPICA parser chokes on this [1], but that seems to be inconsequential. More importantly, our own battery info handling code also verifies that for revision > 0, there are at least 21 fields - and refuses to process the inv= alid _BIX. One workaround would be to introduce special case / quirk handling for Fujitsu Lifebooks. Another is to relax the requirements check: If there are only 20 elements, treat the _BIX as revision 0, no matter what revision num= ber was provided by the device. I hacked my kernel to always treat _BIX as revi= sion 0 and the battery status is working perfectly now on my Fujitsu Lifebook E5= 511 (see attached hack). Linux doesn't run into this problem by the way because it only supports the= 20 fields defined in the ACPI 4.0 spec [3]. It never looks at the revision num= ber or the 21st field added in ACPI 6.0. [1] https://cgit.freebsd.org/src/tree/sys/contrib/dev/acpica/components/namespa= ce/nsprepkg.c#n815 [2] https://cgit.freebsd.org/src/tree/sys/dev/acpica/acpi_cmbat.c#n371 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/acpi/battery.c#n418 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252030-16045-9TKAFTIsFw>