Bug 214929

Summary: [ACPI/battery]: Battery unavailable - ACPI Error: Divide by zero (20210604/utmath-478)
Product: ACPI Reporter: Arthur Borsboom (arthurborsboom)
Component: Power-BatteryAssignee: Zhang Rui (rui.zhang)
Status: CLOSED UNREPRODUCIBLE    
Severity: normal CC: rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.14.15 Subsystem:
Regression: No Bisected commit-id:
Attachments: Dmesg-5.14.15-with-ACPI-Divide-Error
Dmesg-5.14.16-with-ACPI-Divide-Error
MSI Bravo 17 ACPI dump

Description Arthur Borsboom 2021-11-03 09:51:45 UTC
Created attachment 299431 [details]
Dmesg-5.14.15-with-ACPI-Divide-Error

LXQt Desktop reports recently that the laptop battery is unavailable.

OS: Arch Linux
Kernel: 5.14.15
Laptop: MSI Bravo 17
Steps to reproduce: start laptop and login to desktop.

Looking at the dmesg the following errors are found.

[    0.375136] ACPI Error: Divide by zero (20210604/utmath-478)
[    0.375145] ACPI Error: Aborting method \_SB.PCI0.SBRG.EC.BAT1.UPBS due to previous error (AE_AML_DIVIDE_BY_ZERO) (20210604/psparse-529)
[    0.375151] ACPI Error: Aborting method \_SB.PCI0.SBRG.EC.BAT1._BST due to previous error (AE_AML_DIVIDE_BY_ZERO) (20210604/psparse-529)
[    0.375157] ACPI: \_SB_.PCI0.SBRG.EC__.BAT1: _BST evaluation failed: AE_AML_DIVIDE_BY_ZERO
[    0.404716] ACPI Error: Divide by zero (20210604/utmath-478)
[    0.404725] ACPI Error: Aborting method \_SB.PCI0.SBRG.EC.BAT1.UPBS due to previous error (AE_AML_DIVIDE_BY_ZERO) (20210604/psparse-529)
[    0.404732] ACPI Error: Aborting method \_SB.PCI0.SBRG.EC.BAT1._BST due to previous error (AE_AML_DIVIDE_BY_ZERO) (20210604/psparse-529)
[    0.404737] ACPI: \_SB_.PCI0.SBRG.EC__.BAT1: _BST evaluation failed: AE_AML_DIVIDE_BY_ZERO
[    0.434701] ACPI Error: Divide by zero (20210604/utmath-478)
[    0.434710] ACPI Error: Aborting method \_SB.PCI0.SBRG.EC.BAT1.UPBS due to previous error (AE_AML_DIVIDE_BY_ZERO) (20210604/psparse-529)
[    0.434716] ACPI Error: Aborting method \_SB.PCI0.SBRG.EC.BAT1._BST due to previous error (AE_AML_DIVIDE_BY_ZERO) (20210604/psparse-529)
[    0.434721] ACPI: \_SB_.PCI0.SBRG.EC__.BAT1: _BST evaluation failed: AE_AML_DIVIDE_BY_ZERO

I believe the recent upgraade from kernel 5.14.15 > 5.14.15 caused this error.
I will downgrade to test and will confirm later.

Dmesg is attached.
Comment 1 Arthur Borsboom 2021-11-03 10:04:10 UTC
It turns out that a reboot magically made the error disappear.
Closing the bug report.
Comment 2 Arthur Borsboom 2021-11-08 11:56:53 UTC
It happened again today.
New dmesg will be attached.
Comment 3 Arthur Borsboom 2021-11-08 11:57:21 UTC
Created attachment 299489 [details]
Dmesg-5.14.16-with-ACPI-Divide-Error
Comment 4 Zhang Rui 2022-06-21 09:40:19 UTC
please attach the acpidump output of this machine.
Comment 5 Arthur Borsboom 2022-06-21 13:28:44 UTC
Created attachment 301240 [details]
MSI Bravo 17 ACPI dump
Comment 6 Zhang Rui 2022-06-22 05:38:58 UTC
I have no idea why this is an regression because firmware uses a value from EC address space as the divisor, and this value is Zero.

Can you double check if the problem can be reproduced in an earlier kernel release?
If yes, can you please run git bisect to find out which commit introduces the problem? That would be really helpful for us to root cause the issue.
Comment 7 Arthur Borsboom 2022-06-22 06:32:37 UTC
It happened a long time ago and only happened twice.
I cannot reproduce it.

Shall I close the bug report?
Comment 8 Zhang Rui 2022-06-22 08:14:31 UTC
Thanks for the update.
Bug closed.