Bug 511182

Summary: Battery icon in the system tray shows a non existent battery for the screen.
Product: [Plasma] plasmashell Reporter: andretiagob
Component: Power and Battery widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, natalie_clarius, nicolas.fella
Priority: NOR    
Version First Reported In: 6.5.80   
Target Milestone: 1.0   
Platform: KDE Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of system tray battery pop up

Description andretiagob 2025-10-26 22:05:50 UTC
Created attachment 186209 [details]
Screenshot of system tray battery pop up

SUMMARY
When clicking on the battery icon in the system tray, it shows information about a ELAN Touchscreen Stylus. I don't know if this refers to a stylus pen or not, either way I don't have one.

STEPS TO REPRODUCE
1. Click on the battery icon in the system tray;
2. A ELAN Touchscreen Stylus battery entry is present there;
3. If I open information center and then click on Energy, the same ELAN Touchscreen Stylus entry is there along with the internal battery.

OBSERVED RESULT
A ELAN Touchscreen Stylus battery entry is present in the system tray and in the Information Center application.

EXPECTED RESULT
There should not be information about non existent battery for the screen, in the system tray (see attachment).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Linux 
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
I'm using an MSI laptop that has a convertible screen with touch.
Comment 1 andretiagob 2025-10-26 22:12:37 UTC
I forgot to mention that this bug happens on other distros as well like Fedora and on older plasma versions.
Comment 2 Nicolas Fella 2025-10-27 18:48:56 UTC
Please post the output of "upower -d"
Comment 3 andretiagob 2025-10-27 20:23:53 UTC
(In reply to Nicolas Fella from comment #2)
> Please post the output of "upower -d"

Here you go:

[andre@Andre-PC ~]$ upower -d
Device: /org/freedesktop/UPower/devices/battery_BAT1
  native-path:          BAT1
  vendor:               MSI
  model:                BIF0_9
  power supply:         yes
  updated:              seg 27 out 2025 20:22:37 (18 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              39,8392 Wh
    energy-empty:        0 Wh
    energy-full:         60,192 Wh
    energy-full-design:  80,256 Wh
    voltage-min-design:  15,2 V
    capacity-level:      Normal
    energy-rate:         11,476 W
    voltage:             15,061 V
    charge-cycles:       N/A
    time to empty:       3,5 hours
    percentage:          66%
    capacity:            75%
    technology:          lithium-ion
    charge-start-threshold:        75%
    charge-end-threshold:          80%
    charge-threshold-supported:    yes
    icon-name:          'battery-full-symbolic'
  History (charge):
    1761596542  66,000  discharging
  History (rate):
    1761596557  11,476  discharging

Device: /org/freedesktop/UPower/devices/battery_hid_0003o04F3o2FFAx0001_battery
  native-path:          hid-0003:04F3:2FFA.0001-battery
  model:                ELAN Touchscreen Stylus
  power supply:         no
  updated:              qui 01 jan 1970 01:00:00 (1761596575 seconds ago)
  has history:          yes
  has statistics:       yes
  tablet
    warning-level:       none
    percentage:          0%
    icon-name:          'battery-missing-symbolic'
  History (charge):
    1761596575  0,000   unknown
  History (rate):
    1761596575  0,000   unknown

Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path:          ADP1
  power supply:         yes
  updated:              seg 27 out 2025 20:22:22 (33 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              no
    icon-name:          'ac-adapter-symbolic'

Device: /org/freedesktop/UPower/devices/battery_hidpp_battery_1
  native-path:          hidpp_battery_1
  model:                MX Master 3
  serial:               de:c7:f1:25:b2:c1
  power supply:         no
  updated:              seg 27 out 2025 20:22:52 (3 seconds ago)
  has history:          yes
  has statistics:       yes
  mouse
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    warning-level:       none
    battery-level:       full
    percentage:          100% (should be ignored)
    icon-name:          'battery-full-charged-symbolic'
  History (charge):
    1761596546  100,000 fully-charged
    1761596546  0,000   unknown
  History (rate):
    1761596546  0,000   unknown

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         yes
  updated:              seg 27 out 2025 20:22:37 (18 seconds ago)
  has history:          no
  has statistics:       no
  battery
    present:             yes
    state:               discharging
    warning-level:       none
    energy:              39,8392 Wh
    energy-full:         60,192 Wh
    energy-rate:         11,476 W
    charge-cycles:       N/A
    time to empty:       3,5 hours
    percentage:          66%
    icon-name:          'battery-full-symbolic'

Daemon:
  daemon-version:  1.90.10
  on-battery:      yes
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: PowerOff
[andre@Andre-PC ~]$
Comment 4 Nicolas Fella 2025-10-27 20:56:52 UTC
Thanks!

As I expected upower reports a battery-powered tablet with the name "ELAN Touchscreen Stylus". This is most likely an implementation detail of your touchscreen hardware.

In that sense Plasma works as expected, it correctly shows the data exposed by upower.

That said, I understand that reporting this as a battery doesn't really make sense. You can report this to https://gitlab.freedesktop.org/upower/upower/-/issues, but I'm not sure if upower is necessarily the right place to fix this or this is a kernel/driver issue.

See https://gitlab.freedesktop.org/upower/upower/-/issues/197 for a similar issue
Comment 5 andretiagob 2025-10-27 21:35:44 UTC
(In reply to Nicolas Fella from comment #4)
> Thanks!
> 
> As I expected upower reports a battery-powered tablet with the name "ELAN
> Touchscreen Stylus". This is most likely an implementation detail of your
> touchscreen hardware.
> 
> In that sense Plasma works as expected, it correctly shows the data exposed
> by upower.
> 
> That said, I understand that reporting this as a battery doesn't really make
> sense. You can report this to
> https://gitlab.freedesktop.org/upower/upower/-/issues, but I'm not sure if
> upower is necessarily the right place to fix this or this is a kernel/driver
> issue.
> 
> See https://gitlab.freedesktop.org/upower/upower/-/issues/197 for a similar
> issue

Thank you for responding!

I will forward the issue there.

cheers