Skip to contentSkip to conversation

New: Non existent battery reporting for a laptop with touchscreen MSI

Bug 220722 [email protected] 1 participant 18 messages Oct 29, 2025 – Feb 23 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=220722

            Bug ID: 220722
           Summary: Non existent battery reporting for a laptop with
                    touchscreen MSI
           Product: Drivers
           Version: 2.5
          Hardware: Intel
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Platform_x86
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 308869
--> https://bugzilla.kernel.org/attachment.cgi?id=308869&action=edit
Battery charge information

This issue is similar to this bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=216747

The same issue was filed in the upower gitlab page by another user:
https://gitlab.freedesktop.org/upower/upower/-/issues/197

SUMMARY
The laptop touch screen always reports a non existent battery with a charge level of 0% (see attachment). I had this issue for a long time and it is always present regardless of kernel versions, older and newer, and on different distributions.
The device in question is called: ELAN Touchscreen Stylus.

I first issued this bug on the upower gitlab page:
https://gitlab.freedesktop.org/upower/upower/-/issues/329

From what I've been told this might be an issue with some driver in the kernel. Here's some information that might be useful:

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 (1761601761 seconds ago)
  has history:          yes
  has statistics:       yes

tablet
warning-level: none
percentage: 0%
icon-name: 'battery-missing-symbolic'

-------------------------------------------------------------------------------

andre@fedora:~$ upower -e
/org/freedesktop/UPower/devices/battery_BAT
/org/freedesktop/UPower/devices/battery_hid_0003o04F3o2FFAx0002_battery
/org/freedesktop/UPower/devices/line_power_ADP1
/org/freedesktop/UPower/devices/DisplayDevice

-------------------------------------------------------------------------------

andre@fedora:~$ ls
/sys/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:04F3:2FFA.0002/power_supply/hid-0003:04F3:2FFA.0002-battery 
capacity  extensions  model_name  power   present  status     type    wakeup48 
device    hwmon4      online      powers  scope    subsystem  uevent\

-------------------------------------------------------------------------------

andre@fedora:~$ udevadm info
/sys/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:04F3:2FFA.0002/power_s
upply/hid-0003:04F3:2FFA.0002-battery 
P:
/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:04F3:2FFA.0002/power_supply/hid-0003:04F3:2FFA.0002> 
M: hid-0003:04F3:2FFA.0002-battery 
J: +power_supply:hid-0003:04F3:2FFA.0002-battery 
U: power_supply 
T: power_supply 
E:
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/0003:04F3:2FFA.0002/power_supply/hid-0003:04F3:2> 
E: SUBSYSTEM=power_supply 
E: DEVTYPE=power_supply 
E: POWER_SUPPLY_NAME=hid-0003:04F3:2FFA.0002-battery 
E: POWER_SUPPLY_TYPE=Battery 
E: POWER_SUPPLY_STATUS=Unknown 
E: POWER_SUPPLY_PRESENT=1 
E: POWER_SUPPLY_ONLINE=1 
E: POWER_SUPPLY_CAPACITY=0 
E: POWER_SUPPLY_SCOPE=Device 
E: POWER_SUPPLY_MODEL_NAME=ELAN Touchscreen

Currently I'm using KDE Linux with kernel version 6.17.5.
This is an MSI Summit E16 laptop with a convertible touch screen (A12UCT mode). I don't have any stylus pen that could be sending the wrong battery information.

Any help is appreciated,

Thank you!

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

https://bugzilla.kernel.org/show_bug.cgi?id=220722

Hans de Goede ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Hans de Goede ([email protected]) ---
This is weird, the hid-battery code is supposed to ignore ELAN touchscreens exactly because of this problem, see:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-input.c#n401

What kernel version are you using? What is the output of "uname -a" ?

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #2 from André Barata ([email protected]) --- I'm using 6.17.5:

Linux Andre-PC 6.17.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 23 Oct 2025 18:49:03 +0000 x86_64 GNU/Linux

In Fedora 42 and 43 the same bug appears.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

Mario Limonciello (AMD) ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from Mario Limonciello (AMD) ([email protected]) --- AFAICT his touchscreen is USB, that quirk is for I2C. We probably need another one for USB interface.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #4 from Mario Limonciello (AMD) ([email protected]) --- Created attachment 308872
--> https://bugzilla.kernel.org/attachment.cgi?id=308872&action=edit
potential patch

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #6 from André Barata ([email protected]) --- (In reply to Mario Limonciello (AMD) from comment #5)

Quoted 3 lines

@André:

Can you test this patch and see if it helps?

Can you tell me how to use this patch?

Thank you

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#7 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #7 from Mario Limonciello (AMD) ([email protected]) --- This should help you get started:

https://wiki.archlinux.org/title/Patching_packages

If in doubt; use an LLM like ChatGPT or Gemini to help you.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
author Reviewed-by Hans de Goede
#8 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #8 from Hans de Goede ([email protected]) --- Mario, good catch on the existing quirk only being for I2C devices, the proposed patch looks good to me:

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#9 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #9 from André Barata ([email protected]) --- (In reply to Mario Limonciello (AMD) from comment #7)

Quoted 5 lines

This should help you get started:

https://wiki.archlinux.org/title/Patching_packages

If in doubt; use an LLM like ChatGPT or Gemini to help you.

(In reply to Hans de Goede from comment #8)

Quoted 4 lines

Mario, good catch on the existing quirk only being for I2C devices, the proposed patch looks good to me:

I can report that the patch fixed the issue!

Thank you for your support!!

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#10 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

André Barata ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#11 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #10 from [email protected] ---
As I stated in https://bugzilla.kernel.org/show_bug.cgi?id=221118, its not the fake battery, its the pen battery. All you need is just use the pen, touch the screen by it, and this battery level will update according to the pen battery.

So now you removed that feature, and pen battery is no longer showing.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#12 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #11 from Hans de Goede ([email protected]) --- (In reply to ggrundik from comment #10)

Quoted 6 lines

As I stated in https://bugzilla.kernel.org/show_bug.cgi?id=221118, its not the fake battery, its the pen battery. All you need is just use the pen, touch the screen by it, and this battery level will update according to the pen battery.

So now you removed that feature, and pen battery is no longer showing.

The problem is that without pen nearby the HID battery reports 0 charge instead of not-present. This results in GNOME showing an low battery warning every time the user logs into a session which is very annoying.

So until we've some better fix we need to choose between many users getting the annoying low battery warning all the time; or the few users who actually use a pen with these touchscreens (which is quite rare) not having battery info.

Having the chose at all between this is not ideal, but until we've a better fix just hiding the broken battery reporting is the best we can do.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#13 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #12 from [email protected] ---
Isn't this a GNOME problem, not a kernel one?

Current PCs can have quite a lot of battery-powered devices, apart of PC
itself: wireless controllers, mices, keyboards, pens, VR headsets, headphones, etc. Most of them can report their battery status. If a desktop environment cant separate them apart, and dont understand which is PC itself and which is not... Its clearly fault of desktop environment, since its quite a common case. KDE, for example, has no problems with that. This bug should be reported in GNOME, not in kernel.

Blocking some device metrics in a kernel, just because some specific userspace program incorrectly handles that in a weird way does not seems like a wise solution. It is a perfectly functional, correct and useful metric.

This touchscreen is has two sensor layers: one for fingers plus one for stylus, and it does report battery status of stylus. Communications between stylus and the drawing surface can happen only when stylus is in range of touchscreen, its a hardware limitation. So touchscreen does not have any information about stylus until this communication happens at least once, but this does not means that there are no stylus at all, or it is never in use. But after this communication happens, touchscreen remembers last known status, and its correctly shown as a battery level.

Before this change was made, this touchscreen was working as good as hardware could. Now there are no pen battery status not only in GNOME, but nowhere.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#14 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #13 from [email protected] ---
Best solution could have been to hotplug the stylus battery device when stylus comes in range first time, but that would be quite a trick for the driver.

Less convenient solution could be to hide this battery readings, if stylus is not in use. This is a userspace solution.

But current solution, to hide this battery always and from everyone, seems like a worst one. At least there should be some override of this behavior apart of recompiling the module.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#15 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #14 from Hans de Goede ([email protected]) --- (In reply to ggrundik from comment #12)

Quoted 9 lines

Isn't this a GNOME problem, not a kernel one?

Current PCs can have quite a lot of battery-powered devices, apart of PC
itself: wireless controllers, mices, keyboards, pens, VR headsets, headphones, etc. Most of them can report their battery status. If a desktop environment cant separate them apart, and dont understand which is PC itself and which is not... Its clearly fault of desktop environment, since its quite a common case. KDE, for example, has no problems with that. This bug should be reported in GNOME, not in kernel.

GNOME already tells all these different batteries apart. e.g. if my wireless Logitech mouse battery is getting empty it will throw a "Logitech mouse battery is getting low warning", not a laptop-empty battery warning which you seem to think.

And in case of these ELAN touchscreens it throws a "ELAN Touchscreen Stylus battery low" warning and it does so *all* the time, because upower is telling it that there is a "ELAN Touchscreen Stylus" battery at 0%.

This is really not a GNOME problem, this needs to be fixed either in upower or in the kernel. GNOME is just forwarding the info it is receiving from upower and this works for all those other wireless kbds, mice, game controllers and headphones you mention.

(In reply to ggrundik from comment #13)

Quoted 3 lines

Best solution could have been to hotplug the stylus battery device when stylus comes in range first time, but that would be quite a trick for the driver.

And probably also hot unplug it when the stylus goes out of range. I would say patches welcome.

Quoted 2 lines

Less convenient solution could be to hide this battery readings, if stylus is not in use. This is a userspace solution.

Yes, fixing this in upower might also be a solution, see:

https://gitlab.freedesktop.org/upower/upower/-/issues/197

for an existing upower issue.

Quoted 2 lines

But current solution, to hide this battery always and from everyone, seems like a worst one.

Patches to properly solve this are welcome. But until there are fixes to upower telling GNOME that their is a "ELAN Touchscreen Stylus" battery at 0%, the filtering out of the HID battery reporting on these touchscreens is staying in place, since it is the least bad option of the bad choices we have atm.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#16 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #15 from [email protected] ---

Quoted 2 lines

And probably also hot unplug it when the stylus goes out of range. I would say patches welcome.

That would not be possible: as I said, touchscreen just remembers last know status, so if stylus goes out of range, panel continues to report that last value. There are no event of "stylus is out of range", since "the range" is about half an inch or less, and getting in and out of it is a regular thing. As I can see in HID sniffing, the only event is "stylus current status is", with position, orientation, buttons and battery status, all in the same message.

Quoted 3 lines

Yes, fixing this in upower might also be a solution, see:
https://gitlab.freedesktop.org/upower/upower/-/issues/197 for an existing upower issue.

I see. And that issue is closed wont move, since kernel "fixed" the problem. Thank you for this wisest nuclear solution, oh dear.

Quoted 1 line

Patches to properly solve this are welcome

I can only repeat: this was a correctly working situation: kernel was doing perfectly fine, forwarding device status reported by the device. Device is working fine, reporting everything it has as best as it could. Handling all this data with its quirks is not the kernel's business, but userspace.

So removing this metric is a regression, please revert it.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#17 lore raw

[Bug 220722] Non existent battery reporting for a laptop with touchscreen MSI

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=220722

--- Comment #16 from [email protected] ---

Quoted 3 lines

And in case of these ELAN touchscreens it throws a "ELAN Touchscreen Stylus battery low" warning and it does so *all* the time, because upower is telling it that there is a "ELAN Touchscreen Stylus" battery at 0%.

KDE uses the same upower, but does not freaks out. So its a GNOME problem.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.