Brussels / 3 & 4 February 2024

schedule

From Kernel API to Desktop Integration, how do we integrate battery charge limiting in the desktop


The kernel has long had support for battery charge limiting via sysfs, several advanced tools such as TLP allows an advanced user to configure these limits. But how do we make this functionality available in popular DE's such as GNOME, what kind of plumbing is required? Are all laptops created equal? How do we collaborate on the design? Is the existing kernel API good enough?

In this talk we will walk through the kernel sysfs API all the way to a simple toggle switch in gnome settings.

This talk explains how I've implemented battery charge limiting in GNOME settings and UPower. Documenting the whole process of discovery, design discussions, implementation and hardware details.

UPower: https://gitlab.freedesktop.org/upower/upower and WiP branch https://gitlab.freedesktop.org/jelly/upower/-/tree/battery-charge-limit?ref_type=heads GNOME Charge limits: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2553 Charge control limit knobs: https://www.kernel.org/doc/html/latest/power/power_supply_class.html

Speakers

Photo of Jelle van der Waa Jelle van der Waa

Links