Bug 12904

Summary: Port panel from apm/acpi to sysfs
Product: [Yocto Project Subprojects] Sato Reporter: Ross Burton <ross.burton>
Component: satoAssignee: Ross Burton <ross.burton>
Status: IN PROGRESS REVIEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: alex.kanavin, dixitparmar19, mshah, nayakksanjay, randy.macleod, ross.burton
Version: svn   
Target Milestone: 6.2   
Hardware: x86   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2018-08-28 12:42:07 UTC
libacpi is dead, APM is dead: we should just use sysfs to monitor the battery level as an example.

eg https://blog.sleeplessbeastie.eu/2013/01/02/debian-how-to-monitor-battery-capacity/

A upower backend would be good, but sysfs will work.
Comment 2 Ross Burton 2018-08-28 12:45:30 UTC
Also prior art in upower's up-device-supply.c in https://cgit.freedesktop.org/upower/tree/src/linux
Comment 3 mshah 2021-04-08 05:02:55 UTC
Hi @ross@burtonini.com

I'm interested and want to work on this bug. But I need little guidance.

Are we planning to remove libacpi from meta/recipes-bsp/ and add upower package in oe-core?

If my understanding is incorrect then please provide some information so I could start.

Thanks,
Milan Shah
Comment 4 Ross Burton 2021-04-14 10:13:59 UTC
As the battery applet is already modular, I'd suggest we should start with a new sysfs backend and potentially also add an upower backend too.

But starting with sysfs.
Comment 5 Randy MacLeod 2021-04-26 18:45:50 UTC
Assigning to Milan and moving into 3.4. If you need more help getting started just ask! Thanks Milan. ../Randy
Comment 6 mshah 2021-04-27 04:50:55 UTC
Thanks, @Randy MacLeod for assigning it to me and Yes I need some help here.

I understood that we need sysfs support to monitor the battery levels. As I see in kernel-doc (mentioned in the comment) that we have support in the kernel,

* Do I need to add kernel config for core-image-sato which enables them?
or
* Do I need to backport any patch from the newer kernel version to the existing one?
or
* Is that something else that I still don't know?


Thanks,
Milan Shah
Comment 7 Ross Burton 2021-04-27 15:38:36 UTC
Assume that sysfs is supported, as it will be in most builds.
Comment 8 mshah 2021-04-29 05:26:22 UTC
Another good document to understand power_supply in kernel.

https://www.kernel.org/doc/Documentation/power/power_supply_class.txt
Comment 9 Randy MacLeod 2023-10-30 15:37:28 UTC
Build move to 5.0 -- ../Randy
Comment 10 K Sanjay Nayak 2024-03-17 15:47:59 UTC
Hi Randy 

Can you please confirm if anything need to be done ?

Thanks
Sanjay :)
Comment 11 Ross Burton 2024-03-18 10:30:19 UTC
This still needs to be done.
Comment 12 K Sanjay Nayak 2024-03-21 12:24:18 UTC
Thanks Ross for confirmation i would like to work on this.
Comment 13 Ross Burton 2024-03-21 12:42:59 UTC
Thanks!
Comment 14 Randy MacLeod 2024-04-25 01:13:56 UTC
Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.
Comment 15 Randy MacLeod 2024-04-25 01:23:13 UTC
Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.
Comment 16 Dixit Parmar 2024-09-27 08:36:31 UTC
Hi Ross, Randy,

I have understood the ask thoroughly and would like to work on this. Can this be assigned to me if nobody is working on this actively?

Regards,
Dixit
Comment 17 Ross Burton 2024-09-27 10:32:33 UTC
With pleasure!
Comment 18 Dixit Parmar 2024-10-21 05:55:33 UTC
Hi Ross,

I have submitted the patches.
Comment 19 Dixit Parmar 2024-11-04 09:44:03 UTC
Hi Ross,
I have submitted the patches for the matchbox-panel-2 changes for the subject. Kindly have a look.

Also, The sysfs mechanism is controlled by the existing compilation option --with-battery="sysfs" (same as existing acpi option). That change will fall in the recipe file https://layers.openembedded.org/layerindex/recipe/655/
How should we take that change?

Thanks,
Dixit
Comment 20 Dixit Parmar 2025-01-03 05:13:34 UTC
Submitted final patch for review https://lists.yoctoproject.org/g/yocto-patches/topic/109447061#msg859
Comment 21 Dixit Parmar 2025-02-20 09:24:38 UTC
Hi randy.macleod@windriver.com, ross.burton@arm.com,

Kindly review the final patch submitted to the mailing list.
Comment 22 Dixit Parmar 2025-06-06 07:48:34 UTC
Hello Randy, Ross,
I would really appreciate reviews on last submitted patch. https://lists.yoctoproject.org/g/yocto-patches/topic/109447061

I am more than excited to get this going as this is my first contribution at YP.
Comment 23 Randy MacLeod 2026-05-04 16:27:47 UTC
Dixit, 

Ross provided some comments.
You can either fix the issues that he identified and submit a v2 or
reply to that thread and discuss his suggestions.

Ross is on holiday today, fyi.

Let me know if this gets stuck again.
Comment 24 Randy MacLeod 2026-05-04 16:59:57 UTC
Add Ross since I don't see Dixit's commit in:

https://git.yoctoproject.org/matchbox-panel-2/log/
Comment 25 Dixit Parmar 2026-05-07 06:09:32 UTC
(In reply to Randy MacLeod from comment #24)
> Add Ross since I don't see Dixit's commit in:
> 
> https://git.yoctoproject.org/matchbox-panel-2/log/

Hi Randy,

The changes are still in review, the latest patches are of v7 :) - https://lists.yoctoproject.org/g/yocto-patches/message/2178

Will the changes show up in the matchbox-panel-2/log untill it gets reviewed & accepted by Ross?

Thanks,
Dixit
Comment 26 Randy MacLeod 2026-08-20 15:21:29 UTC
Ross please review the patches early in 6.2.
Comment 27 Randy MacLeod 2026-09-17 15:04:00 UTC
Dixit, sorry for the delay, this time Ross promises to follow-up!