I would like to understand how the various ways to read the battery status fit together.
I can do this
this is one way to read the battery status.> acpi -bi
Battery 0: Discharging, 73%, 01:13:10 remaining
Battery 0: design capacity 5320 mAh, last full capacity 1393 mAh = 26%
Or I can look at the files below /sys/class/power_supply/BAT1:
If I divide the content of "energy_now" and "energy_full" I get the percentage that the acpi call displays and if I divide the content of "energy_full" by the content of "energy_full_design" I get the "last full percentage" value.> find /sys/class/power_supply/BAT1/ -type f -exec echo {} \; -exec cat {} \;
/sys/class/power_supply/BAT1/uevent
POWER_SUPPLY_NAME=BAT1
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=11100000
POWER_SUPPLY_VOLTAGE_NOW=11642000
POWER_SUPPLY_POWER_NOW=9453000
POWER_SUPPLY_ENERGY_FULL_DESIGN=62160000
POWER_SUPPLY_ENERGY_FULL=16280000
POWER_SUPPLY_ENERGY_NOW=11340000
POWER_SUPPLY_CAPACITY=69
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=42T4957
POWER_SUPPLY_MANUFACTURER=SANYO
POWER_SUPPLY_SERIAL_NUMBER= 1170
/sys/class/power_supply/BAT1/serial_number
1170
/sys/class/power_supply/BAT1/technology
Li-ion
/sys/class/power_supply/BAT1/power_now
9453000
/sys/class/power_supply/BAT1/present
1
/sys/class/power_supply/BAT1/power/runtime_active_time
0
/sys/class/power_supply/BAT1/power/runtime_active_kids
0
/sys/class/power_supply/BAT1/power/runtime_usage
0
/sys/class/power_supply/BAT1/power/runtime_status
unsupported
/sys/class/power_supply/BAT1/power/autosuspend_delay_ms
/sys/class/power_supply/BAT1/power/async
disabled
/sys/class/power_supply/BAT1/power/runtime_suspended_time
0
/sys/class/power_supply/BAT1/power/runtime_enabled
disabled
/sys/class/power_supply/BAT1/power/control
auto
/sys/class/power_supply/BAT1/manufacturer
SANYO
/sys/class/power_supply/BAT1/energy_now
11340000
/sys/class/power_supply/BAT1/type
Battery
/sys/class/power_supply/BAT1/capacity
69
/sys/class/power_supply/BAT1/cycle_count
0
/sys/class/power_supply/BAT1/voltage_now
11642000
/sys/class/power_supply/BAT1/status
Discharging
/sys/class/power_supply/BAT1/alarm
3108000
/sys/class/power_supply/BAT1/model_name
42T4957
/sys/class/power_supply/BAT1/voltage_min_design
11100000
/sys/class/power_supply/BAT1/capacity_level
Normal
/sys/class/power_supply/BAT1/energy_full_design
62160000
/sys/class/power_supply/BAT1/energy_full
16280000
That makes sense and I assume they are the same thing.
But how does acpi derive "design capacity" of 5383 mAh from the value 62160000 in "energy_full_design".
And if I configure UPower to hibernate the laptop at 7% - do these "7%" refer to the "energy_now/energy_full" ratio or has UPower yet another notion of these percentages?
Many thanks!