| 1 |
# This file is part of upower. |
| 2 |
# |
| 3 |
# The lookup keys are composed in: |
| 4 |
# 60-upower-battery.rules |
| 5 |
# |
| 6 |
# Match string format: |
| 7 |
# battery:<kernel>:<model_name>:dmi:<dmi pattern> |
| 8 |
# |
| 9 |
# The kernel is the name of battery in /sys/class/power_supply for |
| 10 |
# differentiating between multiple batteries. |
| 11 |
# |
| 12 |
# The model_name is battery model name in for example |
| 13 |
# /sys/class/power_supply/BAT0/model_name. |
| 14 |
# |
| 15 |
# The full DMI string of the running machine can be read from |
| 16 |
# /sys/class/dmi/id/modalias |
| 17 |
# That requires a kernel built with CONFIG_DMIID set, which is common. |
| 18 |
# The full DMI string is not needed here and the meaning of individual parts |
| 19 |
# can be seen in the source of the DMIID kernel module |
| 20 |
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/dmi-id.c |
| 21 |
# |
| 22 |
# To add local overrides, create a new file |
| 23 |
# /etc/udev/hwdb.d/61-battery-local.hwdb |
| 24 |
# and add your rules there. To load the new rules execute (as root): |
| 25 |
# systemd-hwdb update |
| 26 |
# udevadm trigger -v -p /sys/class/power_supply/BAT |
| 27 |
# where BAT is the battery in question. |
| 28 |
# |
| 29 |
# CHARGE_LIMIT is in tuple format and each of the variables can be disabled by "_" character. |
| 30 |
# For example: |
| 31 |
# CHARGE_LIMIT=60,80 (charge_control_start_threshold is 60 and charge_control_end_threshold is 80.) |
| 32 |
# CHARGE_LIMIT=_,80 (charge_control_start_threshold will be skipped and charge_control_end_threshold is 80.) |
| 33 |
|
| 34 |
battery:*:*:dmi:* |
| 35 |
CHARGE_LIMIT=75,80 |