You are not logged in.

#1 2014-10-12 19:41:45

lah
Member
Registered: 2014-08-26
Posts: 28

ACPI battery level stops updating

Hello,

I have a strange problem with battery level (displayed using xfce4-power-manager). At startup it updates but not very precisely (not percent by percent), after some minutes  it stops updating.
I thought it was an xfce problem, so I installed xfce4-power-manager-git. But reading acpi status and getting /sys/class/power_supply/BAT0/ info reports same results as xfce. ACPI does not update battery level!

Why acpi stops updating my battery level?

I'm using kernel 3.15.10-1
xfce4-power-manager-git
xfce4-power-manager 1.4.1-1
upower 0.99

lah

Offline

#2 2014-12-24 09:04:40

lah
Member
Registered: 2014-08-26
Posts: 28

Re: ACPI battery level stops updating

Hello,

I have some updates about my issue.
As I said previously, battery status, AC status does not update even in :

cat /sys/class/power_supply/AC/online  

I can get battery status using some acpi commands :

acpi -i 

But battery status returned is not updated.

More interesting :

acpi -V 

Does not return updated status

But after this call :

cat /sys/class/power_supply/AC/online  

contains correct value, and If I enter once again

acpi -V 

Battery level updates in XFCE

-V option seems not only to show acpi status but also polling battery information.

Why do i need to poll manually acpi using -V options to get acpi updated data? What are other alternatives to have a functional acpi update mechanism?

lah

Offline

#3 2015-01-22 12:15:55

lah
Member
Registered: 2014-08-26
Posts: 28

Re: ACPI battery level stops updating

No one interested about this problem?

Now, to get battery level I'm manually polling using a cron job executing acpi -V command...
I've not yet found another solution to get battery level update working.

I found another interesting point. When I resume from suspend battery level updates... Here are my logs when suspending / resuming

dmesg

[ 1137.086386] wlo1: deauthenticating from 00:1f:9f:e7:22:53 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1137.092006] cfg80211: Calling CRDA to update world regulatory domain
[ 1137.168083] IPv6: ADDRCONF(NETDEV_UP): wlo1: link is not ready
[ 1137.307402] PM: Syncing filesystems ... done.
[ 1137.390588] PM: Preparing system for mem sleep
[ 1137.390812] Freezing user space processes ... (elapsed 0.001 seconds) done.
[ 1137.392234] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 1137.393433] PM: Entering mem sleep
[ 1137.393499] Suspending console(s) (use no_console_suspend to debug)
[ 1137.394631] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1137.394711] sd 0:0:0:0: [sda] Stopping disk
[ 1137.557027] e1000e: EEE TX LPI TIMER: 00000011
[ 1137.809968] PM: suspend of devices complete after 416.371 msecs
[ 1137.823466] PM: late suspend of devices complete after 13.483 msecs
[ 1137.824416] ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI
[ 1137.824592] ehci-pci 0000:00:1a.0: System wakeup enabled by ACPI
[ 1137.824603] e1000e 0000:00:19.0: System wakeup enabled by ACPI
[ 1137.824680] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
[ 1137.836734] PM: noirq suspend of devices complete after 13.269 msecs
[ 1137.837000] ACPI: Preparing to enter system sleep state S3
[ 1137.853504] PM: Saving platform NVS memory
[ 1137.853505] Disabling non-boot CPUs ...
[ 1137.853535] intel_pstate CPU 1 exiting
[ 1137.854780] kvm: disabling virtualization on CPU1
[ 1137.854790] smpboot: CPU 1 is now offline
[ 1137.855147] intel_pstate CPU 2 exiting
[ 1137.856377] kvm: disabling virtualization on CPU2
[ 1137.856383] smpboot: CPU 2 is now offline
[ 1137.856949] intel_pstate CPU 3 exiting
[ 1137.858168] kvm: disabling virtualization on CPU3
[ 1137.858180] smpboot: CPU 3 is now offline
[ 1137.859931] ACPI: Low-level resume complete
[ 1137.859980] PM: Restoring platform NVS memory
[ 1137.861096] CPU0 microcode updated early to revision 0x1b, date = 2014-05-29
[ 1137.861225] Enabling non-boot CPUs ...
[ 1137.861272] x86: Booting SMP configuration:
[ 1137.861273] smpboot: Booting Node 0 Processor 1 APIC 0x1
[ 1137.873339] kvm: enabling virtualization on CPU1
[ 1137.875919] CPU1 is up
[ 1137.875970] smpboot: Booting Node 0 Processor 2 APIC 0x2
[ 1137.887493] CPU2 microcode updated early to revision 0x1b, date = 2014-05-29
[ 1137.888105] kvm: enabling virtualization on CPU2
[ 1137.890491] CPU2 is up
[ 1137.890527] smpboot: Booting Node 0 Processor 3 APIC 0x3
[ 1137.902171] kvm: enabling virtualization on CPU3
[ 1137.904609] CPU3 is up
[ 1137.908608] ACPI: Waking up from system sleep state S3
[ 1138.663122] acpi LNXPOWER:02: Turning OFF
[ 1138.663203] acpi LNXPOWER:01: Turning OFF
[ 1138.675606] ehci-pci 0000:00:1a.0: System wakeup disabled by ACPI
[ 1138.675825] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
[ 1138.675838] ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
[ 1138.722182] PM: noirq resume of devices complete after 58.952 msecs
[ 1138.722883] PM: early resume of devices complete after 0.648 msecs
[ 1138.723159] mei_me 0000:00:16.0: irq 32 for MSI/MSI-X
[ 1138.723478] e1000e 0000:00:19.0: System wakeup disabled by ACPI
[ 1138.726178] snd_hda_intel 0000:00:1b.0: irq 33 for MSI/MSI-X
[ 1138.731841] sd 0:0:0:0: [sda] Starting disk
[ 1138.841851] e1000e 0000:00:19.0: irq 34 for MSI/MSI-X
[ 1138.928730] usb 1-1.3: reset high-speed USB device number 4 using ehci-pci
[ 1139.045227] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1139.045398] usb 3-2: reset high-speed USB device number 2 using xhci_hcd
[ 1139.045414] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 1.
[ 1139.045416] usb 3-2: hub failed to enable device, error -22
[ 1139.047871] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 1139.057847] ata1.00: ACPI cmd 00/00:00:00:00:00:a0 (NOP) rejected by device (Stat=0x51 Err=0x04)
[ 1139.058273] ata1.00: configured for UDMA/133
[ 1139.205382] usb 3-2: reset high-speed USB device number 2 using xhci_hcd
[ 1139.205409] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 1.
[ 1139.205412] usb 3-2: hub failed to enable device, error -22
[ 1139.365138] usb 3-2: reset high-speed USB device number 2 using xhci_hcd
[ 1139.378870] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8800b3b73120
[ 1139.841774] usb 3-2.6: reset low-speed USB device number 3 using xhci_hcd
[ 1139.841797] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
[ 1139.841800] usb 3-2.6: hub failed to enable device, error -22
[ 1140.098137] usb 3-2.6: reset low-speed USB device number 3 using xhci_hcd
[ 1140.098161] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
[ 1140.098165] usb 3-2.6: hub failed to enable device, error -22
[ 1140.101400] tpm_tis 00:01: TPM is disabled/deactivated (0x7)
[ 1140.101410] rtc_cmos 00:03: System wakeup disabled by ACPI
[ 1140.354747] usb 3-2.6: reset low-speed USB device number 3 using xhci_hcd
[ 1140.370114] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8800b3b73180
[ 1140.370126] usb 3-2.6: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 1140.380774] PM: resume of devices complete after 1658.753 msecs
[ 1140.381265] PM: Finishing wakeup.
[ 1140.381268] Restarting tasks ... 
[ 1140.381412] acpi PNP0501:00: Still not present
[ 1140.382480] usb 2-1.6: USB disconnect, device number 3
[ 1140.389100] done.
[ 1140.421569] pci_bus 0000:01: Allocating resources
[ 1140.421585] pcieport 0000:00:1c.0: bridge window [io  0x1000-0x0fff] to [bus 01] add_size 1000
[ 1140.421589] pcieport 0000:00:1c.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 01] add_size 200000
[ 1140.421599] pci_bus 0000:02: Allocating resources
[ 1140.421622] pcieport 0000:00:1c.2: bridge window [io  0x1000-0x0fff] to [bus 02] add_size 1000
[ 1140.421624] pcieport 0000:00:1c.2: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 02] add_size 200000
[ 1140.421632] pci_bus 0000:03: Allocating resources
[ 1140.421658] pcieport 0000:00:1c.3: bridge window [io  0x1000-0x0fff] to [bus 03] add_size 1000
[ 1140.421660] pcieport 0000:00:1c.3: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 03] add_size 200000
[ 1140.421663] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[ 1140.421668] pcieport 0000:00:1c.0: res[15]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
[ 1140.421670] pcieport 0000:00:1c.2: res[15]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
[ 1140.421672] pcieport 0000:00:1c.3: res[15]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
[ 1140.421674] pcieport 0000:00:1c.0: res[13]=[io  0x1000-0x0fff] get_res_add_size add_size 1000
[ 1140.421676] pcieport 0000:00:1c.2: res[13]=[io  0x1000-0x0fff] get_res_add_size add_size 1000
[ 1140.421677] pcieport 0000:00:1c.3: res[13]=[io  0x1000-0x0fff] get_res_add_size add_size 1000
[ 1140.421687] pcieport 0000:00:1c.0: BAR 15: assigned [mem 0xbf200000-0xbf3fffff 64bit pref]
[ 1140.421697] pcieport 0000:00:1c.2: BAR 15: assigned [mem 0xbf400000-0xbf5fffff 64bit pref]
[ 1140.421702] pcieport 0000:00:1c.3: BAR 15: assigned [mem 0xbf600000-0xbf7fffff 64bit pref]
[ 1140.421707] pcieport 0000:00:1c.0: BAR 13: assigned [io  0x3000-0x3fff]
[ 1140.421710] pcieport 0000:00:1c.2: BAR 13: assigned [io  0x4000-0x4fff]
[ 1140.421713] pcieport 0000:00:1c.3: BAR 13: assigned [io  0x5000-0x5fff]
[ 1140.421980] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[ 1140.422076] i915 0000:00:02.0: BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
[ 1140.549726] e1000e: enp0s25 NIC Link is Down
[ 1140.550076] IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
[ 1140.577868] usb 2-1.6: new full-speed USB device number 4 using ehci-pci
[ 1140.662671] usb 2-1.6: string descriptor 0 read error: -22
[ 1140.684516] e1000e 0000:00:19.0: irq 34 for MSI/MSI-X
[ 1140.771126] usb 2-1.8: new full-speed USB device number 5 using ehci-pci
[ 1140.784983] usb 2-1.6: USB disconnect, device number 4
[ 1140.787680] e1000e 0000:00:19.0: irq 34 for MSI/MSI-X
[ 1140.971041] usb 2-1.6: new full-speed USB device number 6 using ehci-pci
[ 1141.055968] usb 2-1.6: string descriptor 0 read error: -22
[ 1144.446140] wlo1: authenticate with 00:1f:9f:e7:22:53
[ 1144.455094] wlo1: send auth to 00:1f:9f:e7:22:53 (try 1/3)
[ 1144.457056] wlo1: authenticated
[ 1144.459038] wlo1: associate with 00:1f:9f:e7:22:53 (try 1/3)
[ 1144.463874] wlo1: RX AssocResp from 00:1f:9f:e7:22:53 (capab=0x411 status=0 aid=1)
[ 1144.463995] wlo1: associated

lah

Offline

#4 2015-08-23 22:55:59

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: ACPI battery level stops updating

Did you manage to find a solution to this? As I am experiencing the same problem.
Apparently the kernel won't update the battery percentages.

Offline

#5 2015-08-31 07:48:43

lah
Member
Registered: 2014-08-26
Posts: 28

Re: ACPI battery level stops updating

Unfortunately not. I still poll acpi with

acpi -V

I've tried different kernels, I updated my bios but it didn't solve it.

Offline

#6 2015-08-31 08:32:21

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,420
Website

Re: ACPI battery level stops updating

I'd try my luck on the kernel mailing list.

http://www.tux.org/lkml/


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#7 2015-08-31 15:14:44

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: ACPI battery level stops updating

There was a similar issue reported a number of years ago. The issue herein lies in one of the modules of the Linux kernel. Either in one of the ACPI or PM modules or both.

Here is some background:

https://groups.google.com/forum/#!topic … YcPZxu2hpc

At this stage, we could look at the Linux ACPI battery module which resides in drivers/acpi/battery.c. I've tried playing around with a number of the notification settings, in particular the function acpi_battery_notify (Line 1067) But it didn't yield any desired results.

The source is here for your reference:

https://github.com/torvalds/linux/blob/ … /battery.c

Offline

#8 2015-08-31 15:19:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,654

Re: ACPI battery level stops updating

Can I suggest you try the lts kernel, or if you really know what you are doing, give 4.2 rc6  a try?  I had problems with acpi sysfs calls blocking when my HP Envy got busy on 4.1.anything.  The lts kernel does not exhibit the problem, and 4.2-rc4 was much better.  I have not gotten around to building rc6 yet.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#9 2015-08-31 15:24:41

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: ACPI battery level stops updating

Interesting @ewaller this's the second time you've mentioned this to me to try a LTS kernel on a similar issue to this. I've been building all recent 4.2-rc kernels and have also looked at 3.16 again but the issue was still present.

I will look at this again.

Offline

#10 2015-09-01 23:33:13

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: ACPI battery level stops updating

I gave both 4.2-rc4 and 4.2-rc6 another try but unfortunately the issue didn't resolve itself. I wasn't expecting much seeing that there weren't any significant changes to the battery module.

Offline

#11 2015-09-02 19:46:33

RockTeam
Member
Registered: 2015-09-02
Posts: 1

Re: ACPI battery level stops updating

Hello All,

Could someone please check if the issue of this topic is related to this one somehow? I'm chasing the truth since March already. Thanks in advance.

Offline

#12 2015-09-02 19:59:00

wildfowl
Banned
Registered: 2014-10-16
Posts: 82

Re: ACPI battery level stops updating

Yes but not quite. Firstly you have PM utilities running in userspace which may be muddying the situation.

You need to look at what the battery indicator is saying through the kernel (namely sending uevents) which is what this topic is about.

Also bear in mind in your situation it might take a short while before the battery charges itself past the 0% mark. Until that happens all/most userspace utilities will think of Hibernating/Suspending.

It's OT. Please don't post here. I will reply to your thread to carry out some further diagnostics.

Offline

Board footer

Powered by FluxBB