Battery indicator in KDE shows faulty values

My battery indicator shows faulty values.

image

Acpi knows the right values.

image

Something seems to be stuck, because the value changes every time I reboot, but not when the computer is running.

System:    Host: ThinkPadX380 Kernel: 5.3.5-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           Desktop: KDE Plasma 5.16.5 Distro: Manjaro Linux 
Machine:   Type: Convertible System: LENOVO product: 20LJS02W00 v: ThinkPad X380 Yoga serial: <filter> 
           Mobo: LENOVO model: 20LJS02W00 serial: <filter> UEFI: LENOVO v: R0SET46W (1.30 ) date: 08/21/2019 
Battery:   ID-1: BAT0 charge: 22.8 Wh condition: 35.5/51.0 Wh (70%) model: LGC 01AV432 status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake rev: A 
           L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 32012 
           Speed: 800 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 
           8: 800 
Graphics:  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.5 driver: intel unloaded: modesetting resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.5 Mesa 19.2.1 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           Sound Server: ALSA v: k5.3.5-1-MANJARO 
Network:   Device-1: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: 3.2.6-k port: efa0 bus ID: 00:1f.6 
           IF: enp0s31f6 state: down mac: <filter> 
           Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: efa0 bus ID: 04:00.0 
           IF: wlp4s0 state: up mac: <filter> 
           IF-ID-1: vboxnet0 state: down mac: <filter> 
           IF-ID-2: vboxnet1 state: down mac: <filter> 
Drives:    Local Storage: total: 476.94 GiB used: 170.80 GiB (35.8%) 
           ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKKF512G8L size: 476.94 GiB 
Partition: ID-1: / size: 58.12 GiB used: 36.57 GiB (62.9%) fs: ext4 dev: /dev/nvme0n1p6 
           ID-2: /home size: 256.02 GiB used: 134.20 GiB (52.4%) fs: ext4 dev: /dev/nvme0n1p7 
           ID-3: swap-1 size: 10.04 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/nvme0n1p8 
Sensors:   System Temperatures: cpu: 38.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 251 Uptime: 11h 42m Memory: 15.53 GiB used: 3.22 GiB (20.7%) Init: systemd Compilers: 
           gcc: 9.2.0 clang: 9.0.0 Shell: bash v: 5.0.11 inxi: 3.0.36 

If you want help figuring this out, you really need to post some hardware information with it. I've noticed a slight delay when plugging in the charger and it being shown by the battery and brightness plasmoid but not to the point of a 2% difference in charge or a complete freeze, we're talking around 30 seconds here.

You may be missing an acpi monitoring package specific to your machine though which is why I said about adding more hardware information.

The problem is not the 2% difference. I don't care about that, at all. The problem is only the faulty remaining time on KDE. Acpi shows the right values. I have upower installed and monitoring works. Just the KDE applet doesn't show the right values. Something must be wrong with transferring the valuse. I also have problems with the applet not showing the CPU temperature at boot. I have to "reload temperature sources" and then it works.

Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[20:21:49.917]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                01AV432
  serial:               213
  power supply:         yes
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              21,99 Wh
    energy-empty:        0 Wh
    energy-full:         35,5 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,314 W
    voltage:             15,121 V
    time to empty:       2,4 hours
    percentage:          61%
    capacity:            69,6078%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1570990909  61,000  discharging
  History (rate):
    1570990909  9,314   discharging

[20:21:49.922]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                01AV432
  serial:               213
  power supply:         yes
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              21,99 Wh
    energy-empty:        0 Wh
    energy-full:         35,5 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,314 W
    voltage:             15,121 V
    time to empty:       2,4 hours
    percentage:          61%
    capacity:            69,6078%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1570990909  61,000  discharging
  History (rate):
    1570990909  9,314   discharging

[20:21:49.928]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                01AV432
  serial:               213
  power supply:         yes
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              21,99 Wh
    energy-empty:        0 Wh
    energy-full:         35,5 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,314 W
    voltage:             15,121 V
    time to empty:       2,4 hours
    percentage:          61%
    capacity:            69,6078%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1570990909  61,000  discharging
  History (rate):
    1570990909  9,314   discharging

[20:21:49.932]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                01AV432
  serial:               213
  power supply:         yes
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              21,99 Wh
    energy-empty:        0 Wh
    energy-full:         35,5 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,314 W
    voltage:             15,121 V
    time to empty:       2,4 hours
    percentage:          61%
    capacity:            69,6078%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1570990909  61,000  discharging
  History (rate):
    1570990909  9,314   discharging

[20:21:49.936]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                01AV432
  serial:               213
  power supply:         yes
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              21,99 Wh
    energy-empty:        0 Wh
    energy-full:         35,5 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,314 W
    voltage:             15,121 V
    time to empty:       2,4 hours
    percentage:          61%
    capacity:            69,6078%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1570990909  61,000  discharging
  History (rate):
    1570990909  9,314   discharging

[20:21:49.941]  device changed:     /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          BAT0
  vendor:               LGC
  model:                01AV432
  serial:               213
  power supply:         yes
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              21,99 Wh
    energy-empty:        0 Wh
    energy-full:         35,5 Wh
    energy-full-design:  51 Wh
    energy-rate:         9,314 W
    voltage:             15,121 V
    time to empty:       2,4 hours
    percentage:          61%
    capacity:            69,6078%
    technology:          lithium-polymer
    icon-name:          'battery-full-symbolic'
  History (charge):
    1570990909  61,000  discharging
  History (rate):
    1570990909  9,314   discharging

[20:21:49.945]  device changed:     /org/freedesktop/UPower/devices/tablet_wacom_battery_0
  native-path:          wacom_battery_0
  model:                Wacom Pen and multitouch sensor
  power supply:         no
  updated:              So 13 Okt 2019 20:21:49 CEST (0 seconds ago)
  has history:          yes
  has statistics:       yes
  tablet
    warning-level:       none
    percentage:          0%
    icon-name:          'battery-missing-symbolic'

Please post what I actually asked you to and then someone may be able to help you configure the messed up sensors properly.

I already posted my hardware information in the initial post after you asked. What else do you need?

apologies, I didn't see the edit. when I clicked to read your reply I got taken to the post with the battery information dumps and not the top of the thread.

EDIT - have you tried tpacpi-bat?

tpacpi-bat

A Perl script with ACPI calls for recent ThinkPads (such as T420 and W520) whose battery thresholds are not supported by tp_smapi

No worries, I could have notified you about posting it. Communication is always key! I actually did not have that package installed. I now did do so and will report if it worked.

Well, unfortunately it does not make a difference. The remaining time is still stuck. Thank you for making me aware of Thinkpads having their own acpi modules. I guess my model ist just not supported yet. It is not that new, but it is not even in the list https://www.thinkwiki.org/wiki/Thinkpad-acpi. I think that after the installation it was working. Maybe something broke somewhere. I am still hesitating to reinstall Manjaro completely.

Okay well worth a shot anyway. I'm no expert with Lenovo hardware configuration for Linux, I just observed what other users have posted on here about acpi calls etc.

I do service ThinkPads from time to time in a professional capacity but they are of course still running Windows.

In Linux terms, you have to add 6-12 months onto what you consider new because most stuff like this is developed by fellow Linux users rather than some of the manufacturers who could care less about Linux.

A reasonable approach is to buy a generation behind what manufacturers are offering currently, plus you can usually pick up a bargain that way too.

That means owners of hardware primarily but you may want to try reaching out to the developers of the acpi modules with your specific model's information. They could make it work if the generation before X280 did and you are able to provide them with some output they ask for. Lenovo ThinkPads are usually evolutionary rather than revolutionary in hardware upgrades so it's not beyond reason :man_shrugging:

I think you'll struggle to get any Linux distribution offering KDE recognising the battery levels properly if Manjaro can't because it's one of the most bleeding edge available.

What you could do is try an alternative desktop environments like Cinnamon, GNOME, XFCE from Live ISO and see if the same happens, if it does it rules out the desktop environment being the cause. If it doesn't it confirms and issue. You shouldn't need to install to observe the behaviour.

This of course all rather depends on how much time and patience you have for chasing this issue down. Whatever you decide, good luck with it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by