So the state is the only thing that is incorrect. The percentage and time are correctly updated when the battery is actually charging or discharging - regardless of the reported state. When booted with charger disconnected and charger is now connected:īattery #1 : discharging, 47.00%, 00:53:43 When booted with charger disconnected and charger is still disconnected:īattery #1 : discharging, 47.00%, 01:39:44 When booted with charger connected and charger is now disconnected: When booted with charger connected and charger is still connected: Here is output from "acpitool -a -b" in various situations: Basically the state what was at the time of boot stays active all the time - regardless of the ac-adapter state. Upower uses the -enumerate switch (short form: -e) ( Listing 1) Acpi has two options: -ac-adapter ( -a) and -battery ( -b) ( Listing 2).I have a new Samsung 9-series laptop (NP900X3B) and the battery state is detected incorrectly. Īll four programs provide information on the various power sources. These utilities include Upower, Acpi, and Acpitool, as well as the Intelligent Battery Monitor, Ibam. A number of utilities make life easier and serve up the data in a human-readable format. But finding and interpreting the data can cause some effort. You can always obtain some basic information by parsing individual files in the /sys/class/power_supply/ directory. The other possible messages are Discharging and Fully charged. In this case, the command reveals that BAT0 is charging. BAT0/status file, which shows the status of BAT0. The following command in Figure 1: cat /sys/class/power_supply/BAT0/status The device has two batteries, one built-in and one replaceable, so the first command in Figure 1 reveals three power supplies: AC power, as well as the first and second batteries ( BAT0 and BAT1).įigure 1: Using the sysfs pseudo filesystem, you can determine the available power supplies and discover detailed information on the power components. Checking on Powerįigure 1 shows power data for a Lenovo ThinkPad X 250 running Debian 8. The developers have now reorganized the filesystem and have moved the information to /sys/class/power_supply/. Up to Linux 2.6.26, ACPI information was found on the proc filesystem below /proc/acpi/. For Debian and its derivatives, you'll need the acpi, acpid, and acpi-support-base packages. Linux comes with some command-line tools that let you read information on battery status and health. )ĪCPI used to be a separate component in Linux, but the Linux kernel developers now maintain ACPI functionality within the framework of the Unified Extensible Firmware Interface (UEFI). (For more information on APM and ACPI check out TuxMobil and the ACPI how-to. ACPI, which first appeared in 1996, has now replaced its predecessor, Advanced Power Management (APM) the current version 6 dates from April 2015. The data for the warning message come from the Advanced Configuration and Power Interface (ACPI). Eventually, however, you will see a message informing you that the charge has reached a minimum threshold, and you have to save your data quickly or else switch to mains mode to continue working while the battery charges in the background. The quality of life for any laptop owner depends on the battery maintaining enough charge to operate off the power grid.
0 Comments
Leave a Reply. |