Comprehensive Guide to Laptop Battery Information on Fedora 41
Monitoring your laptop’s battery health and status on Fedora 41 can be done entirely from the command line. This guide covers battery status, health (capacity degradation), cycle count, and charge/discharge rates using several tools: UPower, TLP, ACPI, and the sysfs interface. We’ll also include installation steps (if needed) and explain the key output fields from each tool.
1. Using UPower (upower)
UPower is a power management daemon that is usually installed by default on Fedora. It provides a convenient CLI tool (upower
) to query battery status and statistics. You do not typically need superuser privileges for upower
. Follow these steps to get detailed battery info with UPower:
Enumerate power devices – Run
upower -e
to list all power devices and find your battery’s device path. For example:bash
$ upower -e
/org/freedesktop/UPower/devices/line_power_AC0
/org/freedesktop/UPower/devices/battery_BAT0
/org/freedesktop/UPower/devices/DisplayDeviceLook for the entry ending in
BAT
(e.g.battery_BAT0
); this is your battery.Get battery information – Use the device path from above with the
-i
(or--show-info
) flag:bash
$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
This will display detailed information about the battery. For example, you might see output like:
makefile
state: discharging
energy: 38.66 Wh
energy-full: 38.66 Wh
energy-full-design: 50.5 Wh
energy-rate: 2.782 W
percentage: 100%
capacity: 76.5545%
charge-cycles: 325
...(The above values indicate the battery is fully charged (100% of its current capacity), but the current full charge is only ~38.66 Wh compared to the original design 50.5 Wh – i.e. it’s at ~76.6% of its design capacityhashbangcode.com. The
charge-cycles: 325
shows the battery has undergone 325 full charge/discharge cycles.)
Interpreting UPower output: Key fields from upower -i
include:
state
– Current status: e.g. “discharging”, “charging”, or “fully-charged”.energy
– Current energy content of the battery (in Wh). If discharging, this decreases over time.energy-full
– The maximum energy the battery can hold now (when fully charged).energy-full-design
– The battery’s design capacity when new. By comparing this with energy-full, you can gauge capacity degradation. For example, if energy-full is 38.8 Wh and design was 53.9 Wh, the battery holds only ~71.9% of its original capacity. Thecapacity
field directly shows this percentage.energy-rate
– The present charge or discharge rate. This is the power draw from the battery in watts (W). A higher number means the battery is draining faster (or charging faster, if negative – though UPower typically shows charge rate as a positive value as well). For instance, an energy-rate of 12.97 W means the system is consuming about 12.97 W at that moment.percentage
– The current charge level as a percentage of current full capacity (not of design capacity).capacity
– The health of the battery as a percentage of the design capacity. This indicates wear; e.g. 85% means the battery’s max charge is 85% of what it was when new.charge-cycles
– Number of charge cycles the battery has been through (if the hardware provides this). One cycle is typically one full discharge->charge. For example,charge-cycles: 194
means 194 full cycles so far. (If this field doesn’t appear, your battery may not report it. Some batteries simply don’t support cycle count, or it may show 0/“not supported” if unavailable.)
UPower may also show time to empty
or time to full
when discharging or charging, respectively (indicating how long until the battery empties or fully charges at the current rate).
2. Using TLP (tlp-stat
)
TLP is an advanced power management tool for Linux. It is not installed by default on Fedora 41, but it can be easily added. TLP includes a script tlp-stat
that provides extensive battery details (by reading sysfs data).
Installation (Fedora 41): Install TLP and its radio control package via DNF, then enable the service:
bashsudo dnf install tlp tlp-rdw​:contentReference[oaicite:1]{index=1}
sudo systemctl enable --now tlp.service
Fedora’s default power profile daemon (power-profiles-daemon or tuned in Fedora 41) can coexist with TLP, but it’s generally recommended to disable other power managers to let TLP operate without conflict.
Once installed and running, use tlp-stat
to get battery info (root privileges are recommended for full details):
Basic battery report:
bash
sudo tlp-stat -b # (“-b” or “--battery” shows battery details only)
This outputs a detailed report. For example:
bash
Battery 0: Charge = 0%, Status = Charging
Battery 0: design capacity 4542 mAh, last full capacity 3268 mAh = 71%
/sys/class/power_supply/BAT0/cycle_count = 777
/sys/class/power_supply/BAT0/energy_full_design = 57020 [mWh]
/sys/class/power_supply/BAT0/energy_full = 41030 [mWh]
/sys/class/power_supply/BAT0/energy_now = 0 [mWh]
/sys/class/power_supply/BAT0/power_now = 0 [mW]
/sys/class/power_supply/BAT0/status = ChargingIn the above sample (from a ThinkPad battery), TLP shows both a summary and the raw sysfs values:
The battery was at 0% (fully drained) and is charging. Design capacity is 4542 mAh, but last full charge was 3268 mAh (~71% of design).
Cycle count is 777 cycles.
It also lists energy values in mWh corresponding to those capacities (57020 mWh design, 41030 mWh last full).
Interpreting TLP output: The fields correspond closely to the sysfs files (see Section 4 below). Notable entries:
design capacity / last full capacity – TLP prints this in mAh (with a computed percentage) similar to ACPI. This indicates battery health (here 71% of original).
cycle_count – Number of charge cycles used (if supported by your hardware).
energy_full_design / energy_full / energy_now – Design, full, and current energy in mWh, matching the design capacity and current charge levels. In the example, design is 57,020 mWh (which is 57.02 Wh), and currently a full charge is 41,030 mWh (41.03 Wh).
power_now – Instantaneous power draw or charge rate in mW. (0 mW in the example because the battery was empty and not supplying power at that moment).
status – Charging/discharging status (similar to
state
in UPower). “Charging” here indicates the battery is being charged by AC power.
TLP Tip: If you have a ThinkPad or certain models, TLP can also show and set charge thresholds and offers recalibration. The output above shows a “Battery Care” section with threshold settings. Those are beyond the scope of just reading info, but worth noting if you want to manage charging limits.
Note: If
cycle_count
shows as “(not supported)” in TLP’s output, don’t be alarmed – not all batteries report cycle count. Some hardware simply doesn’t expose it. Also, a brand new battery with 0 cycles may initially appear as “not supported” because the kernel reports0
which TLP can’t distinguish from unsupported hardware. After the first full cycle, it should show up if the feature is available.
3. Using ACPI (acpi
command)
The acpi
command-line utility directly queries the ACPI interface (which the kernel exposes via /proc
or /sys
) to report power and thermal status. It’s a quick way to get battery info but may need to be installed on Fedora:
Installation:
bash
sudo dnf install acpi
Usage: Once installed, you can use
acpi
to check battery status. Common options:acpi -V
(verbose) – Show all battery info plus thermal sensors, AC adapter status, etc.acpi -i
– Show battery information (including capacities) in a concise form.acpi -b
– Battery status only (percent and time remaining).
For example, using the info flag:
bash
$ acpi -i
Battery 0: Discharging, 68%, 03:42:57 remaining
Battery 0: design capacity 4209 mAh, last full capacity 3618 mAh = 85%This output shows Battery 0 is discharging at 68% with about 3h43m remaining. The design vs last full capacity is given in mAh, and we see the battery’s current full charge is 3618 mAh out of an original 4209 mAh (about 85% of the design capacity).
If you have multiple batteries (some laptops have secondary batteries), they would be listed as “Battery 1”, etc., each with their own status. AC adapter status (on-line/off-line) is also shown in verbose mode. If the system is charging, ACPI will indicate “Charging” and may show the rate. For instance, ACPI might report “charging at 1200 mA” or time to full. In the verbose output, you’ll also see thermal info (temperatures) if available.
Interpreting ACPI output: The fields are fairly straightforward:
Status (Charging/Discharging), current percentage, and estimated time to full/empty.
design capacity vs last full capacity – Indicates battery health/wear (ACPI calculates the percentage for you as shown above). A significant difference means the battery can’t hold as much charge as it used to (capacity degradation).
ACPI does not typically show cycle count via this command. It focuses on capacity and status. For cycle count, use UPower or TLP as described above.
4. Reading from Sysfs (/sys/class/power_supply
)
All the above tools ultimately get their data from the kernel’s power supply class interface (sysfs). You can access this information directly via the file system in /sys/class/power_supply/
. This is useful for scripts or if you want to see raw values. The battery is usually named BAT0
(and BAT1
if a second battery exists). Within /sys/class/power_supply/BAT0/
you’ll find files representing various parameters. For example:
bash$ ls /sys/class/power_supply/BAT0
alarm capacity capacity_level charge_full charge_full_design
charge_now current_now cycle_count manufacturer model_name
present serial_number status technology type uevent voltage_min_design voltage_now
Important files/fields and their meanings include:
status
– The charging status (e.g."Charging"
,"Discharging"
,"Full"
,"Not charging"
, etc.).capacity
– The current charge level as a percentage (0–100). This is essentially the battery gauge reading in percent.charge_full_design
orenergy_full_design
– The design capacity of the battery when new. If the battery reports charge in ampere-hours, you’ll see “charge_” files; if it reports in energy (Watt-hours), you’ll see “energy_” files. Both represent the original maximum capacity. (Units are in microamp-hours (µAh) for charge or microwatt-hours (µWh) for energy.)charge_full
orenergy_full
– The current full charge capacity. As the battery wears, this value drops. The ratio ofcharge_full
tocharge_full_design
(or energy equivalents) is the health percentage. For example, ifcharge_full_design
is 4,100,000 µAh (which is 4.10 Ah) andcharge_full
is 900,000 µAh (0.90 Ah), the battery’s full charge is now only ~22% of what it was (0.90/4.10) – a heavily worn battery.charge_now
orenergy_now
– The real-time charge present in the battery (in µAh or µWh). This decreases when discharging and increases when charging.current_now
– The instantaneous current flow (in microamperes, µA). A positive value typically indicates discharge current. For instance, 1,089,000 µA means the laptop is drawing 1.089 A from the battery at that moment. When charging, this might show the charging current (and could be negative on some systems, or just indicated via status).power_now
– The instantaneous power draw (in microwatts, µW). Not all systems have this (it may be present instead ofcurrent_now
if the battery reports energy). If available, it directly tells you the power usage. For example, 12,000,000 µW would be 12 W. (In TLP’s output this was shown aspower_now [mW]
.)cycle_count
– The number of charge cycles the battery has gone through. Not all batteries provide this. If the file is missing or reads as 0 while the battery is old, it likely isn’t supported by your hardware (or the kernel driver).
You can view the content of these files with simple commands like cat
. For example:
bashcat /sys/class/power_supply/BAT0/status # e.g. "Discharging"
cat /sys/class/power_supply/BAT0/capacity # e.g. "75" (means 75%)
cat /sys/class/power_supply/BAT0/energy_full_design
cat /sys/class/power_supply/BAT0/energy_full
cat /sys/class/power_supply/BAT0/energy_now
cat /sys/class/power_supply/BAT0/cycle_count
By reading these, you can calculate battery health and estimate runtime:
Capacity degradation: Compare
energy_full
toenergy_full_design
(or charge equivalents). For instance, a battery might showenergy_full_design = 50,000,000 µWh
(50 Wh design) andenergy_full = 38,000,000 µWh
(38 Wh now). This is a ~76% remaining capacity (38/50) — matching what tools like UPower show as capacityhashbangcode.com.Runtime estimation: Using
energy_now
andpower_now
orcurrent_now
, you can estimate how long the battery will last. For example, ifenergy_now
is 675,000 µAh (0.675 Ah left) andcurrent_now
is 1,089,000 µA (1.089 A draw), then time to empty ≈ 0.675 Ah / 1.089 A ≈ 0.62 hours (~37 minutes). (UPower’s “time to empty” does this calculation for you.)
Note on units: Values in /sys/class/power_supply
are in micro-units (except percentage and status). You may need to divide by 1000 or 1,000,000 to convert to more familiar units:
For charge in µAh: divide by 1,000,000 to get Ah (or by 1000 for mAh).
For energy in µWh: divide by 1,000,000 for Wh (or by 1000 for mWh).
For current in µA and power in µW: similarly, divide by 1,000,000 for A or W.
Most tools (UPower, TLP, ACPI) already convert these to human-friendly units (mAh, Wh, W, etc.) in their output.
5. Summary of Key Fields and Their Meaning
Battery “Status” (State): Indicates if the battery is charging, discharging, full, or idle. This is shown by all tools (
state
in UPower,status
in TLP/sysfs, text in ACPI output).Current Charge %: How full the battery is relative to its current full capacity. Shown as
percentage
in UPowerhashbangcode.com, or as the numeric percent in ACPI output, orcapacity
file in sysfs.Design Capacity vs Current Full: These indicate battery health. The design capacity is the charge the battery could hold when new, and the current full (sometimes called “last full”) is what it holds now. A large gap means wear and capacity loss. UPower shows
energy-full
vsenergy-full-design
, TLP/ACPI show “design capacity … last full capacity … = X%”, and in sysfs these correspond to*_full_design
and*_full
. The ratio (X%) is the capacity degradation (100% when new; lower over time).Cycle Count: How many complete charge/discharge cycles the battery has experienced. Shown as
charge-cycles
in UPower,cycle_count
in TLP (or sysfs), not available via plainacpi
. High cycle counts (hundreds) typically correlate with more wear, as batteries are often rated for a limited number of cycles (e.g. 500 cycles for ~80% capacity remaining).Charge/Discharge Rate: How quickly the battery is being drained or charged. UPower’s
energy-rate
gives the discharge rate in watts. In sysfs, you might look atcurrent_now
(in µA) orpower_now
(in µW). ACPI’s verbose output will indicate if charging at a certain rate or give time remaining. A higher discharge rate means shorter runtime; a higher charge rate (when plugged in) means the battery is charging faster. These values can fluctuate with system load.Time to Empty/Full: Not directly asked, but for completeness – UPower provides
time to empty
ortime to full
in hours, and ACPI shows an estimated time in its output. These are computed estimates based on current draw.
By using the tools above, you can get a complete picture of your laptop’s battery on Fedora 41. For example, you might use UPower for a quick overview of capacity and cycles, TLP for a comprehensive text report (especially if tuning power management), ACPI for a quick one-liner status, and sysfs for scripting or custom calculations. Each tool complements the others and helps you monitor battery status, health, and performance over time.
Sources:
UPower CLI usage and sample outputhashbangcode.com
Explanation of battery capacity vs design (wear percentage)
Cycle count meaning and example
TLP installation on Fedora and sample outputostechnix.com
ACPI tool usage and output example
Kernel power supply (sysfs) values and their interpretation