From nobody Wed Sep 20 21:27:10 2023 X-Original-To: acpi@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RrWnp44vbz4vCF8 for ; Wed, 20 Sep 2023 21:27:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RrWnp32h9z4RrW for ; Wed, 20 Sep 2023 21:27:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695245230; a=rsa-sha256; cv=none; b=EbfHiCTWhyp02HNeMkRb0BmTTo4XWn0Qvh2DLgazhQx6R0oUxunTDbtG2w0+YRtrH/K4vM 8haoBajJ4H/Lg6xn6peudU3ZAz0Y9ZPw7FS+YSrxs+MaQd1VMdQUe0fXehmWmzo14ioRct q5osnFmiqb/JxDLg2ocN//w7Tgtvaf3jkyQO8ljIOSy/FalqqPd7sqfv+0IvUPthalE272 dMUC7NFZ4W6ppRh9Jw37d9s0LWx73+QdLFIViXFQIb30cJ+IEZf/6+t3dDbhXZM0TK+IHN esq5qp/M74KNSotVe4sFNZPOBh5LxL+u+qUaFeYGHb/b83e0+XHMBFAHL1PirQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695245230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SWdo3lGyy9o28etbq8Bop6apTxEuIu975N7QRPGtc0A=; b=p60XFs5X1Bauc7Z8TPoKKskA05//fENYF8/EZiFF4U73rrVbZRyKiM0X75dmr9AE56MVrN r1pA3itLXvXEzB0TPJSECGyKNyPjvYqVSwrA55cjp6BxAt0th+QJCF3rSBGWHTA6CGmn5i xPrAepxA7aUm8YzMfCL49p64teEeereDzoxZAvUd6on/PL8bZHZ5syx1hoWolGO8LW5pkp /N4WgZWlP8IKuqmKNef7evf22b2PNQTW0sfTH+pEIe7fkGiT+sUO8YfgEgkyX7ZWQlVFzc 0iEI4EU6GUvSzzysR396aCanvQlRQbks6+IZu3Eoq2skTXkV7xJHpWG9eyITKA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RrWnp1r7Sz1B5R for ; Wed, 20 Sep 2023 21:27:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 38KLRA89031757 for ; Wed, 20 Sep 2023 21:27:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38KLRAWN031756 for acpi@FreeBSD.org; Wed, 20 Sep 2023 21:27:10 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: acpi@FreeBSD.org Subject: [Bug 252030] No battery reading after upgrade to 12.2-RELEASE Fujitsu lifebook s936 Date: Wed, 20 Sep 2023 21:27:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@chillt.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: acpi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: ACPI and power management development List-Archive: https://lists.freebsd.org/archives/freebsd-acpi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-acpi@freebsd.org MIME-Version: 1.0 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.=