Repository navigation
Conversation
[Medium impact] The PR appears safe to merge. SummaryUpdates
Reviews (2) · Last reviewed commit: "Treat a supported charge limit UPower do..." · Reviewed by Greptile |
|
Thanks for picking this up so fast. I tested this change against the hardware from #17137, and the guard can never match, so the phantom value remains. Why: UPower only prints if (up_exported_device_get_charge_threshold_enabled (priv->proxy_device))
g_string_append_printf (string, " charge-threshold-enabled: %s\n",
up_device_bool_to_string (...));
So Reproduced on the Dell XPS 13 DX13260 (limit disabled, thresholds 75/80 from hwdb, sysfs reads fail with ENXIO): applied this PR's diff to the current No change. The added test passes because the stub supplies a What would work here:
Happy to test a revised patch on this machine and report the output. |
|
@areen-dev Thank you for testing it on the hardware, and for the pointer into 1a8e768 follows your first option. When UPower reports If you can run the updated script on the XPS once more, that would confirm it. |
|
Confirmed on the XPS 13 DX13260 (BIOS 1.6.0, UPower 1.91.5) with 1a8e768. Real and Results: The phantom line is gone, and nothing is lost in its place: the kernel's I also checked the two cases the guard must not break, with stubbed output:
And This fixes the reporting bug from #17137 on this hardware. The underlying limitation is unchanged — the firmware still refuses every write, so no OS-side charge limit — but the panel no longer claims one exists. |
|
Thanks @areen-dev, that covers all three cases. |
|
Closing in favour of #16685, which covers this too. Thanks! |
UPower fills in its hwdb default thresholds (75/80) for batteries that expose the charge control attributes, even when the limit is off and the firmware refuses it, so
omarchy-battery-statusreported a 75-80% limit on this Dell that is not active. UPower printscharge-threshold-enabledonly while the limit is on, so the status now ignores UPower's thresholds when it reports a supported limit without that line, and still shows an enabled limit or one the kernel itself reports. The battery status test covers all three.Closes #17137