CriticalPowerAction should allow None
Submitted by C. Wu
Assigned to Richard Hughes @hughsient
Link to original bug (#105263)
Description
Hi,
My battery can actually last more than 6 hours, however due to some reasons it always shows 0% even if it has been fully charged.
Device: /org/freedesktop/UPower/devices/battery_BAT0
native-path: BAT0
vendor: PEGA
model: G71C000FP110
power supply: yes
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
warning-level: none
energy: 0 Wh
energy-empty: 0 Wh
energy-full: 0 Wh
energy-full-design: 0 Wh
energy-rate: 0 W
voltage: 17,368 V
percentage: 0%
capacity: 100%
technology: lithium-ion
UPower should tolerate such unsupported batteries (or battery sensors), in the way that it should not always power-off the computer, even if 0% percentage is detected.
My proposal is to allow CriticalPowerAction=None
.
Temporarily I changed the UP_DAEMON_ACTION_DELAY to be enough long as a dirty solution to prevent undesired power-off in case of using batteries. I hope there could be an official patch for this situation.
Best regards C.W.