Sunday, October 26, 2008

Extending battery life on the Dell XPS M1210

Introduction
I own a Dell XPS M1210. I bought it because it was powerful and small and kinda lightweight. I didn't buy it because I wanted to sit on an aeroplane and work.
Nonetheless, it'd be nice to get a bit more battery life out of it. There are a lot of reviews out there raving about the xps m1210 battery life, but that's the review models sing the 9-cell battery. It's an 80 watt-hour pack that sticks an inch out the back of the machine, ruining advantage number two: small size. So I bought the 53Whr 6-cell battery and only get two and a half hours of battery life. This laptop is a power hog.
For comparison, my previous laptop (a Dell Inspiron 4100) used a 59Whr pack and got four hours of life. You could remove the CD-ROM, put two battery packs in there, and run all day without ever plugging in. That was a mobile laptop, apart from the fact that it weighed 3kg in that configuration.
Just to compare, the old laptop (almost five years old!) sucked down 15W on average. The new laptop uses 21W. And it's using "the latest in power management technology"!
Obviously, the new one blows away the old one on performance. But for a lot of what I do - writing, coding, emailing, browsing the web - the old CPU was just fine. The main reason I upgraded in the first place was that the old laptop didn't have enough RAM for what I wanted, not that the CPU was too slow!
Improving power consumption has more benefits than just extending the dell xps m1210 battery life; the machine will run quieter (lower fan levels) and cooler (improved comfort). Supposedly it might extend its lifetime as well, although I can't see myself using it past the end of the three-year warranty anyway.
Taking measurements
I'd like to know what configuration changes will reduce power consumption and hence improve laptop battery life. Conveniently, modern batteries will also report the amount of energy being drawn from them.
Monitoring the battery discharge rate with RightMark CPU Clock Utility
I found a nice utility called RightMark CPU Clock Utility. Amongst other useful features - which I'll get to - it'll report the discharge rate of the battery. Thus, we can see exactly what helps, what doesn't, and how much of a gain we've made with each adjustment.
The best way to do this would be to run the system from a bench power supply and measure the current consumption there. I don't have a sufficiently powerful bench power supply lying around, nor do I want to destroy one of my Dell power supplies, so software-based measurement will have to do. I'm not so interested in exactly how much power each device consumes - more whether it's using power at all.
Things to adjust
CPU clock and voltage
The most obvious place to start is to tweak the CPU to use less power. For a while, CPUs have been able to adjust their clock rate on-the-fly, and most (including the Core 2 Duo in the M1210) let you reduce their voltage at the lower clock speeds, further improving battery life.
See the screenshots for the settings that I chose. I only use two different CPU states: 1GHz/0.95V and 2GHz/1.212V. If it's running on battery, I force the slower speed. If it's running from the AC adapter, I force the higher speed. You might like to set up more states, such as "sitting on the couch with the AC adapter" where you want it to run cool but ramp up if you need the performance. Remember to click the 'Battery' tab at the top when you're setting up your Power Saving profile!
RMClock Settings (1)RMClock Settings (2)RMClock Settings (3)
You can also use the throttle settings to reduce the on-battery power even more (down to 300MHz) but I found performance to be unbearably slow. It also didn't save much power.
There's also an RMClock registry setting that will enable even more multiplier and VID options - you might be able to reduce the voltage below Intel's recommended levels and hence improve power economy even more. Conversely, if you can force a higher multiplier (which you probably can't, given it's an Intel chip) you can improve performance (overclock). Of course, you're risking system stability, and I find the settings here are already close to optimal for power usage. Take a look at RMClock_Tweaks.reg in the RMClock directory.
In general, you'll want to keep the CPU utilization as low as possible. No video encoding or games. Especially not games; the video card chews through power like crazy. Modern CPUs use a lot less power when they're sitting idle. RMClock has options that will let you put a CPU usage monitor on your task tray if you need it.
Interestingly, even at 100% utilization/1GHz/0.95V, the CPU doesn't suck up a lot of power. You definitely don't want to run it flat out, but it's not that painful. It'll depend on what you're using the machine for at the time.
Once you've set up RMClock - and you're confident that it's stable - you need to save the settings by exiting the RMClock program (right-click on the sprocket tray icon and choose Exit RMClock Utility). It won't save your settings automatically in case you manage to make your machine unbootable.
Video card (NVIDIA GeForce Go 7400)
The NVIDIA control panel has a PowerMizer setting that lets you set performance levels on battery and AC power. Again, maximum performance on AC, maximum power savings for battery.
NVIDIA PowerMizer settings
If you want to fiddle around, install the CoolBits registry hack. This will let you adjust the GPU and memory clock speeds by hand. Reducing these to the minimum seems to give a slight reduction in power consumption. Certain versions of the driver will perform this for you automatically - they'll reduce the clock speeds when you're on battery and increase them again on AC.
NVIDIA CoolBits Settings
Screen brightness
Reducing the screen brightness can save you a few watts. I run at the default settings, though. With normal indoor lighting, the lower settings are too dark to actually see anything.
Of course, if you're in a darkened room, you can run lower brightness without hurting your eyes. You won't save the planet, but you might be able to sit on the couch for a bit longer without getting up.
Disabling devices
The main idea here is if you're not using it, turn it off. This includes every device in the system - the peripherals, the fans and as much as possible, the CPUs. Obviously, your exact usage scenario is going to affect this - I always use my WiFi at home, but if I was getting on a plane, disabling it would be sensible (and required).
Wireless
I suppose you could disable WiFi, since it's trendy to do so. You've got a switch for it. I usually end up using my WiFi while I'm on battery. There's an option in the BIOS to disable Bluetooth with the switch; I guess you could do the same thing with Device Manager too. The same would apply if you're lucky enough to have an EVDO card.
Logitech USB Camera: 600-2000mW
The webcam is a bit odd for power usage. What I found - and your results may vary - is that it won't draw any significant power if you don't use it. If you use it, it'll draw about 2W. If you then turn it off, it doesn't seem to entirely 'turn off'; it keeps drawing about 600mW. Explicitly disabling it in Device Manager seems to turn it off properly.
Webcam on a notebook? I've got work to do...
I don't use it much, so I just disable it all of the time. It's in Device Manager->Universal Serial Bus Controllers->Logitech USB Camera (Dell Notebooks). Right-click and hit Disable. If you want it back, right-click and hit Enable. No reboot is necessary. Most of the devices that need to be explicitly disabled will work this way.
Unplug your Ethernet if you're not using it? Does it make much difference? (See, I told you this was a post-in-progress. I'm still sketching notes for myself!)
Disable the modem in the BIOS. There might be other peripherals you can disable in the BIOS if you're not using them.
Theoretically, you can tell the hard drive to spin down after a certain timeout. I've never ever seen that timeout expire on Windows XP; it seems to access the disk constantly. So that doesn't help so much. I don't know how much more power the 7200rpm drive uses over the 5400rpm.
Disable USB host controllers in Device Manager. So long as you don't disable the USB2 host controller, all of your ports will still work, but only in USB2 mode. You can leave one enabled if you connect a mouse while on battery. Each additional host controller seems to use a bit more power. You can disable the USB2 controller for even more power savings.
This makes me wonder what temperature is reported as the CPU temperature. Turning off all of these peripherals does significantly reduce the reported temperature, so maybe they're all sharing a heatsink inside the laptop. Or that temperature which is being reported is actually a system temperature of sorts.
It'd be nice to have a program which disabled all of these peripherals automatically when you went on battery and then turned them on again when you plugged into AC.
You could unplug the DVD drive for a 200g weight saving and probably negligible power saving. Haven't tried this yet. There's a screw on the bottom of the case that you need to undo first.
You could disable one of the CPU cores entirely. You can definitely do this in the BIOS. Don't know if Device Manager will allow it. Theoretically you can get better power efficiency from a single high-speed core versus two low-speed cores (less work being done sharing resources on the cores) though I wouldn't stake my reputation on it. But then, performance isn't my priority in this anyway.
The CPU fan and system fan might use a good chunk of power, too. By changing the fan thresholds in i8kfangui you could make the fans come on later, saving a bit of power at the expense of getting your lap hot. I've found the CPU fan to be remarkable ineffective, even at full power. The best thing I've found for long-term use (if you don't want the automatic thermal throttling to kick in) is to keep the laptop elevated off the desk. It still throttles occasionally. It doesn't help that it's summer in Sydney right now and ambient temperatures of 30 degrees Celcius are common.
Running efficient software
I tried booting Damn Small Linux off a USB drive; the theory was that I could run it entirely from a RAM disk and then save files to an SD card. This would let me turn off the hard drive altogether and drop to near-zero CPU utilization at the same time. Unfortunately, it didn't make much difference at all to power use. I also couldn't explicitly disable devices like in Windows, so it was worse off overall. It was extremely responsive, though. No waiting for anything. Ever. So it might be a gain for productivity in certain situations - but a panacea for power consumption, it is not.
Conclusion
Before tweaks - everything at its default settings - the machine draws xxxxxmW when idle, giving a predicted battery life of y.yy hours.
After all of the tweaks, it's using just xxxxxmW for a y.yy hour battery life.

Informations from http://www.mouldy.org/extending-battery-life-on-the-dell-xps-m1210

----------------------------------------------------------------------------------------------
Want to buy dell xps m1210 laptop battery:
Specifications: Battery Technology : Li-ion, 11.1V, 8000mAh
Condition : Brand New, High Quality, Safe, Shipping Fast !

Dell xps m1210 battery in usa http://www.my-batteries.com/laptop-batteries/dell-xps-m1210.htm
xps m1210 battery in uk http://www.shopbatteries.co.uk/laptop-batteries/dell-xps-m1210.htm