Created attachment 231894 [details] Patch to fix battery monitoring on non-x86 The lumina battery monitoring is currently implemented by shelling out "apm" commands. The apm command does not exist on arm, powerpc, or riscv. The patches attached switch to a sysctl() interface to directly query acpi_battery, so they should work on any platform as well as being more efficient. I would hold off on committing them, though, pending review from upstream: https://github.com/lumina-desktop/lumina/issues/765 If there are no major issues, then maybe we can patch the port until these changes make it into the upstream dist.
LGTM, ship it! Thanks.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f7972afbeec54358e5f80c54baf473b5add0ac92 commit f7972afbeec54358e5f80c54baf473b5add0ac92 Author: Jason W. Bacon <jwb@FreeBSD.org> AuthorDate: 2022-02-23 14:43:06 +0000 Commit: Jason W. Bacon <jwb@FreeBSD.org> CommitDate: 2022-02-23 14:46:06 +0000 x11/lumina-core: Replace apm battery monitoring with sysctls() The apm command does not exist on arm, powerpc, or riscv. This also reduces CPU time for lumina-desktop. Patches have been proposed to upstream. PR: 262018 Approved by: lbartoletti x11/lumina-core/Makefile | 2 +- .../patch-libLumina_LuminaOS-FreeBSD.cpp (new) | 72 ++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-)
Patches sent to upstream as well.