FreeUnix.Dyndns.Org Sun, 20 July 2008 - 01:52:57 CEST
Home ·  AcpiTool ·  Howto ? ·  Links ·  Hardware ·  FTP Archive ·  Search ·  Contact ·  About
>  A c p i T o o l  <
About AcpiTool
AcpiTool is (yet another) Linux ACPI client. It's a small command-line application, intended to be a replacement for the apm tool. The primary target audience are laptop users, since these people are most interested in stuff like battery status, thermal status and the ability to put their precious laptop to sleep. Most of this does not apply to desktop systems.

Besides "basic" ACPI information like battery status, AC presence, etc . . . , Acpitool also supports various extensions for Toshiba, Asus and IBM Thinkpad laptops, allowing you to change the LCD brightness level, toggle fan on/off, and more.

The program simply accesses the /proc/acpi or /sysfs entries to get/set acpi values. Hence, you need a computer running a Linux kernel from the 2.4.x or 2.6.x series with acpi enabled, to use this program.

Development of AcpiTool started in June 2004, on a Toshiba Satellite Pro 6000, then running Slackware 9.1. The aging Toshiba remained in use till September 2006, when it was replaced with a much faster Dell Latitude C640. The Dell currently runs Slackware 11 with kernel 2.6.20.
This application started as an attempt to "refurbish" my C/C++ programming skills, which were dormant for several years.

AcpiTool is open-source software, distributed under the GNU GPL license.

If you would like to send me some feedback, found a bug, need help, . . . , don't hesitate to send me an email. You can use the form on my contact page.

Disclaimer : This software is provided without any guarantees, including merchantability or fitness for a particular use. The maintainers (that would be me) don't take any responsibility at all if using this software leads to damaged equipment or data, angry neighbors, strange habits, divorce, or any other calamity.

Everybody likes screenshots :
acpitool in action

News Top

Full Changelog for detailed update info.

Release history :

  • 06-Feb-2007 : release of acpitool 0.4.7
    - fixed output for "acpitool --cpu" (C-states, again), and also displays frequency scaling, if found.
    - code cleanup (code split into several smaller files)
  • 09-Aug-2006 : release of acpitool 0.4.6
    - fixed output for "acpitool --cpu" (Bogomips and C-states) again for everything that looks like an SMP system.
    Thanks to John Stembridge (University of Michigan, USA) for reporting this error.
  • 15-May-2006 : release of acpitool 0.4.5
    - fixed output for Bogomips (again) for AMD64 cpu's (well, at least the 3500+) + added cache size information
    - fixed bug causing acpitool to enter an infinite loop when trying to display c-state usage for AMD64 3500+ cpu. This should also fix the "0 (nan %)" output seen on cpu's reporting 00000000 usage for just 1 C-state (C1). Reported by Samuele Kaplun.
  • 05-Feb-2006 : release of acpitool 0.4.4
    - Fixed bug where the total runtime left was calculated even if AC is online.
    Thx to Markus Melms for reporting this bug and providing feedback.
  • 29-Jan-2006 : release of acpitool 0.4.3
    - If 2 batteries are available, also calculate the total runtime left (estimation).
    This was a feature request from Markus Melms(Germany).
  • 19-Jan-2006 : release of acpitool 0.4.2
    - Added support for long options, stuff like --version, or --help. This should avoid surprises for people who take long options for granted.
    - received a patch from Niko Ehrenfeuchter (University of Freiburg, Germany), which integrates c-state statistics in acpitool (-c option). It allows you to see the usage of the c-states supported by your machine. Very nice patch. He even made the effort of reformatting the indentation nicely :)
  • 08-Jan-2006 : release of acpitool 0.4.1
    - acpitool segfaulted when it found number of thermal zones > 3. The number of supported thermal zones is raised to 5 now. The bug was passed on to me by Nicolas Weyland, who received it from someone else. Unfortunately, this person did not provide any feedback to confirm this fix. I am pretty confident however the fix is OK. If not, let me know.
  • 27-Nov-2005 : release of acpitool 0.4.0
    - added initial support for IBM Thinkpad ACPI extensions, provided by Narayan Desai (mcs.anl.gov).
    Many thanks to Narayan for providing valuable information, testing and adding code to the project.
  • 23-Oct-2005 : release of acpitool 0.3.0
    - fixed output for Bogomips and PM capabilities for CPU with very long flags information.
    Thanks again to Giuseppe Della Ricca for reporting and fixing yet another bug.
    - added initial support for Asus ACPI extensions. Many thanks to "ufoalien" (Nicolas Weyland) for providing valuable information, testing and adding code to the project.
  • 06-Oct-2005 : release of acpitool 0.2.8
    - when battery is charging, battery time is now calculated as time needed untill battery is charged
    - minor changes to the -e and -v options
    - minor code cleanups
    - added Bogomips to the CPU information (useless, but hey, I am a number freak :)
  • 09-Mar-2005 : release of acpitool 0.2.7
    - bugfix for thermal zone reporting (info for 2nd thermal zone, if available, was wrong)
    - added quirk for flaky Dell batteries (reported stuff like being charged up to 107%)
    - battery capacity loss is only displayed if there really is capacity loss
    - configure script now tries to guess your arch and no longer defaults to -march=i686
    - help text adapted for -F option (toggle Fan on Toshiba laptops)
    - 10-Mar-2005 update : included fixed acpitool.spec
  • 28-Nov-2004 : release of acpitool 0.2.6
    - Extended support for CPU information
    - Thermal info also displays trip points
    - Battery info also calculates the battery capacity loss
  • 13-Sep-2004 : release of acpitool 0.2.5
    - Added initial support for CPU information : type, speed, PM capabilities
  • 31-Aug-2004 : release of acpitool 0.2.4
    - Added support to enable/disable wakeup devices
    - Moved to autoconf/automake
  • 23-Aug-2004 : release of acpitool 0.2.3
    - bugfix release, code cleanup + some feature enhancements, see the Changelog for more info.
  • 20-Aug-2004 : release of acpitool 0.2.2
    - Added (ro) support for wakeup capable devices (needs wakeup.patch or ACPI 20040715)
  • 15-Jul-2004 : release of acpitool 0.2.1
    - Added support for fan control to the Toshiba ACPI extensions
    - updated the man page
  • 13-Jul-2004 : release of acpitool 0.2
    - Added initial support for Toshiba ACPI extensions
    - Added a man page
  • 05-Jun-2004 : release of acpitool 0.1
    This is the initial release.
Download and installation Top

Download :

Installation (Source) :

  • unpack the source tarball : tar zxvf acpitool.x.y.z.tar.gz or tar jxvf acpitool.x.y.z.tar.bz2.
  • `cd' to the directory containing the package's source code and type `configure' to generate the Makefiles.
  • Type `make' to compile the package.
  • Type `make install' to install the program and any data files and documentation.
  • You can remove the program binaries and object files from the source code directory by typing `make clean'.
Usage Top
That was easy, just copy and paste the output of 'acpitool -h' :)
Usage: acpitool [option] . . . 
Shows ACPI information from the /proc/acpi filesystem, like battery status,
temperature, or ac power. Can also suspend your machine (if supported).

  -a      AC adapter information
  -A      show supported Asus ACPI extensions
  -b      battery status, available batteries only
  -B      battery status, all info on all battery entries
  -c 	  CPU information : type, speed, PM capabilities
  -e      show just about everything
  -f      show fan status
  -F x    force fan on (x=1) or switch back to auto mode (x=0). (Toshiba only)
  -h      show this help screen
  -l x    set LCD brightness level to x, where x is 0..7 (Toshiba only)
  -m x    switch the mail led on (x=1) or off (x=0) (Asus only)
  -n x    switch the wireless led on (x=1) or off (x=0) (Asus only)
  -o x    switch the Asus LCD panel on or off (Asus only)  
  -s      suspend (sleep state S3), if supported
  -S      suspend (sleep state S4), if supported
  -t      thermal information
  -T      show supported Toshiba ACPI extensions (LCD brightness level, video out routing,
          fan status)
  -v      be more verbose when something is not found. Makes sense only when used together
          with other options. 
  -V      show application version number and release date
  -w      show wakeup capable devices
  -W x    enable/disable wakeup device x. Run 'acpitool -w' to see valid numbers for x.
  -z x    set the Asus LCD brightness to x, where x is 0..15 (Asus only).
  
If invoked without options, acpitool displays information about available batteries,
AC adapter and thermal information.
Essentially, this is the same as invoking acpitool with the -bat options.

Or, you can read the man page.

Remarks :

  • 'acpitool -S' does nothing : well, neither does it on my laptop on kernel 2.6.x, but it does what 'acpitool -s' is supposed to do on kernel 2.4.x. Don'k ask why. But, that's why I added the option.
  • The application may spit out error messages when /proc/acpi entries are missing or inaccessible. The future default behaviour will be to print something like "not available", as it does already for the 2nd battery.
  • If acpitool says it can't find some entries, but you are sure you have them, or it reports faulty information, feel free to send me a copy of your complete /proc/acpi directory. That may eventually help me to clear the problem.
  • The -c option (CPU info) supports up to 8 (logical) processors. Now that Core Duo is available, SMP has come to the laptop. Note that Bogomips is displayed for every cpu found.
Contributors Hall Of Eternal Fame Top
I would like to thank the following people for their aid in the development of AcpiTool by means of testing, feedback, contributions, . . . :
  • Jeremy Janssens (Leuven, Belgium) [http://www.gnu-linux.net] :
    - initial testing of acpitool on his Fujitsu laptop
    - reported bug for 2nd thermal zone displaying wrong information (fixed in 0.2.7)
  • Giuseppe Della Ricca (Italy) :
    - provided extensive feedback and patches for problems, occuring on his Dell laptop (fixed in AcpiTool 0.2.3)
    - reported and patched a bug in the CPU option of Acpitool 0.2.8 (fixed in AcpiTool 0.3.0)
  • Jiri Tyr (Czech Republic) : provided feedback on failure to report battery status (fixed in AcpiTool 0.2.3)
  • Christopher A. Ghalon (Minnesota, USA) : provided feedback on failure to report battery status, on yet another Dell laptop
  • Robert Ambrose (USA ?) : kindly submitted acpitool.spec, to build RPM packages.
  • Alan Pope (UK) : provided feedback on yet another Dell with "out-of-spec" batteries. The batteries of his Dell claimed to be charged up to 107% (quirk added in 0.2.7)
  • Patrick "Padde" (Germany) : description for the -F option was not entirely correct, that is, -F1 forces the fan on, but -F0 only switches it off IF it was forced on first, not if was switched on by auto mode. Help text is adapted to reflect this in version 0.2.7.
  • Kir Kolyshkin (Russia) : kindly updated acpitool.spec to fix building of RPM package on Fedore Core 3. Should also work on other RPM based Linux distro's. Included in tarballs since 10-03-2005.
  • Nicolas Weyland (Switzerland) [http://ufoalien.bug.ch] : initiated support for the Asus ACPI driver, provided valuable information, did testing and added Asus code to the project. Nicolas is also active in the Debian community.
  • Narayan Desai (mcs.anl.gov). : Narayan initiated support for the IBM Thinkpad ACPI extensions. Many thanks to Narayan for providing valuable information, testing and adding code to the project.
  • Niko Ehrenfeuchter (University of Freiburg, Germany) : Niko contributed a patch which integrates c-state statistics in acpitool (-c option, since acpitool-0.4.2). It allows you to see the usage of the c-states supported by your machine.
  • Markus Melms (Germany) : Markus requested the implementation of calculating total battery runtime left when 2 batteries are available (acpitool-0.4.3/0.4.4). Many thanks to Markus for testing the code and providing feedback.
  • John Stembridge (University of Michigan, USA) : reported an error in the --cpu option when acpitool runs on a SMP system (well, everything with 2 or more cpu's). Fixed in 0.4.6.