- Suspend and Ignore as the CriticalPowerActions (!218 and !218)
- Support for battery charging threshold (!208)
- Tweak the device priority to make sure the device kind joystick can be correctly shown. (#267)
One of the charge_control_start|end_threshold isn't writable for some
systems, for example, Macbook Air. Therefore, if both files can't be
written, the error is returned.
This allows the one of charge_control_start|end_threshold can be ignored
by a "_" character.
The udev hwdb can be set in the following format.
- Skip charging start limit
CHARGE_LIMIT=_,80
- Skip charging end limit
CHARGE_LIMIT=30,_
The configuration file holds the enable status of the battery charging
threshold for individual batteries. If it is enabled, upower will recover
the settings when upower starts up. If the configuration file is not
present, the battery charging threshold is disabled by default.
Signed-off-by: Kate Hsuan <hpa@redhat.com>
It sets the battery start and end charging threshold to the kernel and also
saves the configuration in a file. If upower is restarted, upower
can recover the charging threshold setting through the configuration file.
The configuration file is based on the model name and serial number of the
battery so the battery can be configured individually.
Signed-off-by: Kate Hsuan <hpa@redhat.com>
ChargeThresholdSupported property is used to show if the battery supports
Charging threshold feature. ChargeThresholdEnabled is used to show the
configuration (enabled/disabled) status of the feature.
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Set per battery-specific start/stop charge limits in udev as environment
variable with the option to allow a user to override the default 60%
start and 80% stop charge limit.
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Give a new priority for device type since the gaming_input may include
a keyboard, a touchpad... etc, for example, a Sony DualShock4 joypad.
A mouse and a touchpad may include a mouse and a keyboard.
Therefore, the priority is:
1. Audio
2. Gaming_input
3. Keyboard
4. Tablet
5. Touchpad
6. Mouse
If AllowRiskyCriticalPowerAction is true and the CriticalPowerAction
is "Suspend", The "Suspend" can be the CriticalPowerAction.
Otherwise, "HybridSleep" will be the CriticalPowerAction.
The warning message will be shown when CriticalPowerAction is "Suspend".
One iwarning message is for enabling the risky CriticalPowerAction and
the other is to show the potential risk when
AllowRiskyCriticalPowerAction is true.
When using UPower in a non-hybernate setup, the result of a
CriticalPowerAction would be PowerOff. Certain users prefer
Suspend instead, because this is the only way to recover
graceful from that state.
Suspend action will only used, when explicit configured.
Closes: #23Closes: #59
Signed-off-by: Kate Hsuan <hpa@redhat.com>
1. Resolved high disk and CPU rate.
2. Update glib2 requirement to 2.66.0.
3. Stop guessing the unknown battery as a power supply.
4. Continue to support lid handling.
5. Document fixes and bug fixes.
This resolves the following deprecation warning, meson these days has a
special function for installing an empty directory:
* 0.60.0: {'install_subdir with empty directory'}