[Bug 1216806] New: [aarch64][LenovoX13s] [power supply] Battery precentage is alawys 0%
https://bugzilla.suse.com/show_bug.cgi?id=1216806 Bug ID: 1216806 Summary: [aarch64][LenovoX13s] [power supply] Battery precentage is alawys 0% Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: aarch64 OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: chester.lin@suse.com QA Contact: qa-bugs@suse.de CC: afaerber@suse.com, guillaume.gardet@arm.com, ivan.ivanov@suse.com, jlee@suse.com, mbenes@suse.com, mbrugger@suse.com, stanimir.varbanov@suse.com, tiwai@suse.com Target Milestone: --- Found By: --- Blocker: --- Created attachment 870581 --> https://bugzilla.suse.com/attachment.cgi?id=870581&action=edit battery_fail.png Tested ISO: openSUSE-Tumbleweed-DVD-aarch64-Snapshot20231029-Media.iso Link: https://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-Tumblewe... Install steps: https://en.opensuse.org/HCL:ThinkpadX13s#ISO_Installation Symptom: When booting to the installed tumbleweed, the battery percentage is not able to be measured so it always shows 0% (See attached screenshot). In the meanwhile, the readings dumped by the 'upower' command are all zero. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 https://bugzilla.suse.com/show_bug.cgi?id=1216806#c1 --- Comment #1 from Chester Lin <chester.lin@suse.com> --- Created attachment 870584 --> https://bugzilla.suse.com/attachment.cgi?id=870584&action=edit batt_ok.png By tracing the QCOM battery driver [qcom_battmgr.c], I realized that the qcom_battmgr driver needs a notification from the pdr_interface in order to activate the battery measurement, which should be the way originated from the Android systems running on Qualcomm's mobile application processors. To solve this issue, we will need a net/qrtr[1] lib and a pd-mapper[2][3] program running in userspace in order to trigger the event required by the battery sensor (via QRTR/remoteproc) and its associated battery driver. I have temporarily packaged these two in my OBS home subject[4], and the result shows that the battery percentage can be fixed after running the pd-mapper. I will submit these two packages to the openSUSE network project. [1] https://github.com/andersson/qrtr [2] https://github.com/andersson/pd-mapper [3] https://groups.google.com/g/linux.debian.devel/c/gZWi4_ca9yw [4] https://build.opensuse.org/project/show/home:clin:branches:devel:ARM:qcom-qr... -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 https://bugzilla.suse.com/show_bug.cgi?id=1216806#c2 --- Comment #2 from Chester Lin <chester.lin@suse.com> --- (In reply to Chester Lin from comment #1)
Created attachment 870584 [details] batt_ok.png
By tracing the QCOM battery driver [qcom_battmgr.c], I realized that the qcom_battmgr driver needs a notification from the pdr_interface in order to activate the battery measurement, which should be the way originated from the Android systems running on Qualcomm's mobile application processors.
To solve this issue, we will need a net/qrtr[1] lib and a pd-mapper[2][3] program running in userspace in order to trigger the event required by the battery sensor (via QRTR/remoteproc) and its associated battery driver.
I have temporarily packaged these two in my OBS home subject[4], and the result shows that the battery percentage can be fixed after running the pd-mapper. I will submit these two packages to the openSUSE network project.
[1] https://github.com/andersson/qrtr [2] https://github.com/andersson/pd-mapper [3] https://groups.google.com/g/linux.debian.devel/c/gZWi4_ca9yw [4] https://build.opensuse.org/project/show/home:clin:branches:devel:ARM:qcom- qrtr
The same approach can also be seen in other distros, such as Debian and Fedora. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 https://bugzilla.suse.com/show_bug.cgi?id=1216806#c3 --- Comment #3 from Takashi Iwai <tiwai@suse.com> --- Thanks, it looks reasonable to me. You can add a proper "Supplements" tag to the package, so that it can be automatically installed for the target hardware. -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 https://bugzilla.suse.com/show_bug.cgi?id=1216806#c4 --- Comment #4 from Chester Lin <chester.lin@suse.com> --- (In reply to Takashi Iwai from comment #3)
Thanks, it looks reasonable to me.
You can add a proper "Supplements" tag to the package, so that it can be automatically installed for the target hardware.
Thanks for the suggestion. I have submitted packages with a "Supplements" tag in the "pd-mapper.spec". Here are PRs: libqrtr1: https://build.opensuse.org/request/show/1123703 pd-mapper: https://build.opensuse.org/request/show/1123705 -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 https://bugzilla.suse.com/show_bug.cgi?id=1216806#c5 Chester Lin <chester.lin@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kernel-bugs@opensuse.org |chester.lin@suse.com Status|NEW |IN_PROGRESS --- Comment #5 from Chester Lin <chester.lin@suse.com> --- (In reply to Chester Lin from comment #4)
(In reply to Takashi Iwai from comment #3)
Thanks, it looks reasonable to me.
You can add a proper "Supplements" tag to the package, so that it can be automatically installed for the target hardware.
Thanks for the suggestion. I have submitted packages with a "Supplements" tag in the "pd-mapper.spec". Here are PRs:
libqrtr1: https://build.opensuse.org/request/show/1123703 pd-mapper: https://build.opensuse.org/request/show/1123705
Accepted by network and now I have submitted to openSUSE:Factory: libqrtr1: https://build.opensuse.org/request/show/1124452 pd-mapper: https://build.opensuse.org/request/show/1124453 -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 Ivan Ivanov <ivan.ivanov@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chester.lin@suse.com |kernel-bugs@opensuse.org -- You are receiving this mail because: You are the assignee for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1216806 Guillaume GARDET <guillaume.gardet@arm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kernel-bugs@opensuse.org |guillaume.gardet@arm.com Summary|[aarch64][LenovoX13s] |[aarch64][LenovoX13s] |[power supply] Battery |[power supply] Battery |precentage is alawys 0% |percentage is always 0% -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla_noreply@suse.com