Linux on Mobile Computers
A major concern for many people taking their notebooks away from power outlets is how long their battery will last. Without any power management software, my 486DX4/75 notebook with a NiMH battery will last about forty-five minutes to an hour and a half away from a power outlet. While this will vary from machine to machine, it would be nice if this could be extended.
The goal of power management software is to manage the overall level of power consumption of the hardware by reducing or eliminating power consumption where it is not needed. This process is accomplished by communication between the hardware and operating system through a standard interface. For PC notebooks, this interface is known as the Advanced Power Management (APM) specification, version 1.1 at the time of this writing, and is defined by a document drafted by Microsoft and Intel. The specifications are intended to be operating system independent.
Although the APM specifications are intended to make power management independent of the operating system used, the unfortunate reality of the market is that some notebook manufacturers have decided to implement power management systems that work only with an MS-DOS or MS-Windows operating system.
Usually, new notebooks on the market will implement the specifications correctly, but there are many older models and even a few newer models that do not. If you happen to have one of those machines that does not implement APM correctly or sufficiently, you may be out of luck. Careful research of new machines can ensure that your machine is compatible.
APM works through communication between a properly designed system BIOS and an APM device driver in the operating system. BIOS stands for Basic Input/Output System, and is a Read Only Memory chip on your computer's motherboard. A system BIOS that implements APM can both read and modify the power consumption level of the hardware components in the machine. These components include your CPU, battery, screen, hard disk, floppy drive, PCMCIA drive, I/O ports, sound card, CD-ROM drive, and so forth.
The BIOS can communicate with the operating system's device driver, relaying this information so the operating system and BIOS can together make intelligent decisions about power levels. In this way, the operating system can power down or reduce power to those devices in the system that aren't in use, leaving more battery life for those devices that are in use. In addition, many notebooks feature a Suspend button that lets you manually put the notebook into a state of extremely low power consumption until you wake it up.
The Linux APM driver is maintained by Rik Faith, and the most recent version can be found already in kernel 1.3.46 or later. Support for APM can simply be chosen as a compile option in these kernels. Versions of the driver for older kernels and the 1.2.x kernels do exist as kernel patches, but are no longer supported by Rik and the other developers and lack some of the newer features. Those interested in APM support are therefore strongly encouraged to use a 1.3.x kernel. APM support will be a standard part of the next production kernel series, which will be called 1.4.x or 2.0.x.
In order for the APM driver to work, the system BIOS on your laptop's motherboard must support the APM version 1.0 or 1.1 interface, preferably version 1.1. It must also support 32-bit protected-mode connections. While most late model notebooks meet these requirements, a vendor's marketing claim of APM compliance is not sufficient. While the APM specifications strongly encourage laptop manufacturers to meet these standards, there is some leeway given to them. If APM support is important to you, make sure that the machine you are using meets these requirements.
In addition to the actual APM driver, there are several utilities available that use the APM kernel driver and the /proc/apm directory. These utilities are located at ftp://ftp.cs.unc.edu/pub/users/faith/linux and the current version of the utilities is available in the file apmd-2.1.tar.gz. This package includes a daemon process called apmd that logs battery status, and a utility named apm that simply outputs the information available in /proc/apm including the current battery level. For those running X-Windows, a simple utility called xapm displays a simple graph of battery life. And for those interested in hacking, a C library called libapm.a is provided so users can write their own utilities.
For those who have notebooks that do not have an adequate APM implementation in the BIOS, there is at least one other option available. A simple utility called hdparm is available which sets many IDE parameters, including how much inactivity an IDE drive should wait for before spinning down. The hdparm utility comes with every current Linux distribution, and can be obtained from ftp://tsx-11.mit.edu/pub/linux/sources/sbin/hdparm-2.7.tar.gz This is not true APM, but it's better than nothing. Hard disks use significant power and this simple utility can increase battery life up to 50%, in my experience.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- I once had a better way I
2 min 35 sec ago
- Not only you I too assumed
19 min 58 sec ago
- another very interesting
2 hours 13 min ago
- Reply to comment | Linux Journal
4 hours 6 min ago
- Reply to comment | Linux Journal
11 hours 29 sec ago
- Reply to comment | Linux Journal
11 hours 16 min ago
- Favorite (and easily brute-forced) pw's
13 hours 7 min ago
- Have you tried Boxen? It's a
18 hours 59 min ago
- seo services in india
23 hours 31 min ago
- For KDE install kio-mtp
23 hours 32 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?