Sunday, 8 May 2011

SetVsel: overclock and undervolt your Motorola Defy


You are not getting the maximum power and battery life out of your phone.

Your phone was taught to underachieve

At factory settings your Motorola Defy is underclocked and overvolted, which means that it runs slower than it should and drinks too much battery juice (even so it performs well and has a good battery life compared to other Android phones). Some people believe that the Defy was deliberately crippled for commercial reasons: Motorola didn't want to jeopardise sales of more expensive models by making the Defy too attractive. Nobody knows if this rumor is true or false. Either way, there is a tradeoff between performance and battery life, and Motorola erred on the side of caution. A phone that crashes because it runs too fast at too low a voltage causes a lot of expensive work for customer service. A phone that drains the battery a bit faster while running a bit slower won't send its users back to the stores to demand a fix, as long as it performs within the advertised specifications.

And the specs are too conservative. Your phone can run longer and faster.

To understand why, let's dig into the numbers.

Speed, voltage, and battery trade-offs

Motorola set the three CPU speed/voltage combinations for the Defy at:
1) 300 MHz at VSel1 = 33;
2) 600 MHz at VSel2 = 48;
3) 800 MHz at VSel3 = 58;
at a threshold of 86%.

The threshold determines when the processor steps up to a higher speed. By default, it switches to high speed if it runs at 86% capacity, and slows to a lower gear when the usage drops.

Higher speed (more MHz) requires a higher voltage, which is why the VSel (Voltage Select) goes up. VSel is related to voltage according to:
V = 0.0125*VSel + 0.6.

So at the lowest default VSel (33), your phone runs at 1.0125 V. At the highest default VSel (58) it runs at 1.325 V.

The power consumed by the processor increases in a linear fashion with the clock speed (twice the speed is twice the power), but quadratically with the voltage: twice the volts means four times more power.

The display and the radios eat up most of your battery. Turning down the brightness and switching off GPS, Wi-Fi and mobile data when not in use improves battery life more than undervolting your processor.

However, you can squeeze a few more hours out of a battery charge if you undervolt your CPU, and overclocking may make some apps run a little smoother. Just don't expect miracles, and be prepared for errors and crashes when you push the wrong buttons.

Room for improvement

The main battery saver is a low VSel1 (the lowest voltage at the lowest speed), because your phone runs at this speed most of the time. Underclocking VSel1 is not a good idea, because below the default 300 MHz it takes noticably longer before your phone responds to an incoming call in standby mode. Reducing VSel1 too much makes your phone hang or reboot when it's idle, but you can reduce VSel1 within reason to increase standby time. If you cut VSel1 from 33 to 20 the processor uses 40% less power most of the time, which can make the difference between your phone lasting a full day or blacking out before you get a chance to plug it in. (There are more ways to stretch your battery without dumbing down your smartphone.)

Lowering the intermediate voltage at medium speed (600 MHz by default) saves a bit of juice when you're playing with your phone a lot, because VSel2 is the typical setting when you're using your phone. If you use your phone as an mp3 player on a long trip you may notice the difference.

Your phone rarely runs at top speed. It spikes at VSel3 occassionally, but even with QueueTube streaming, Wi-Fi Ruler scanning, GPS Status looking for satellites, and Dolphin HD loading pages in the background my processor spent most of the time at 600 MHz instead of the default maximum (800 MHz) or my custom 1 GHz.

Overclocking may make a difference if you're playing resource-hungry games or watch badly encoded videos. Just don't overdo it, because the voltage required to run at more than 1 GHz makes your phone produce more heat, reduces battery life, and may even shorten the life of your hardware. Try to keep the maximum VSel below or at the default maximum, and don't let the temperature increase beyond 35°C for too long unless you live in a very hot place. High temperatures won't kill your phone at once, but they will kill your processor and battery slowly. Batteries may be cheap, but a dead processor will turn out very expensive. Especially when the manufacturer finds out you've messed with the settings and voids your warranty.

So what settings should you use?

Workout schedule for your phone

There is no one-size-fits-all answer. Processor performance varies, even if they're from the same batch. Your optimum settings depend on your phone, whether it runs Eclair or Froyo, how you use it, where you use it. A phone in a hot jeans pocket doesn't dissipate heat as fast as a phone in a cool handbag, and shooting video is more demanding than listening to podcasts. You'll have to find the best settings for your phone by trial and error.

Start by lowering VSel1 in small steps and check if your phone runs stable for a while under real world conditions. The stability test that's built in SetVsel is a rough indication, but also test stability by running a couple of streaming video apps over 3G together with other power-hungry apps, because seemless switching between speeds is not the same as an artificial stress test at constant voltage. If your phone starts rebooting by itself, increase the VSel by a safe margin.

There's no point trying to push the numbers to the max, because the power used by your CPU is just a small part of the big picture. Tweak the next VSel after you have the first one tuned. Don't change all at once, because then you don't know which one is wrong if your phone becomes unstable. Tweak your VSels one at a time.

Remember: undervolting won't damage your phone. Pushing the voltage too high may fry your CPU and kill your battery. I wouldn't push my Defy beyond 1000 MHz unless I can make it run at a very low voltage.

Judging from reported values at which Motorola Defy (most of them on Eclair, some on Froyo) phones ran without issues (see below for details), the safe ranges seem to be:

- 300 MHz, VSel1 24-33
(some people report stable systems as low as VSel1 14);
- 600 MHz, VSel2 31-48;
(some people report stable systems as low as VSel2 27);
- 800 MHz, VSel3 41-58.
(some people report stable systems as low as VSel3 39);
- 1000 MHz, VSel3 45-74.
(above VSel3 58 your phone may get really warm).

I started with 300/24, 600/34, 1000/52. When that ran OK for a couple of days I knocked the voltage down in bits and pieces. I now keep my phone running at 300/16, 600/28, 1000/52, with the threshold at the original 86%. My phone runs smoothly, passes the stability test (check the bottom of the SetVsel screen) with flying colors, and the battery lasts noticably longer than with the default settings.

Of course that doesn't necessarily mean these settings will work for you, because every CPU is different. The only way to find out is by trial and error. Push your VSels down in small steps, one at a time, until your phone fails the stability test or starts rebooting by itself. Then go back to the last "safe" setting and continue with the next VSel.

If you like to take risks and don't mind your phone getting hot:

- 1100 MHz, VSel3 55-66;
- 1200 MHz, VSel3 60-75.

More options

SetVsel has two options to let your phone go on a diet when your battery runs low. The first option is to limit your phone to VSel2 when the battery level drops below a set percentage (e.g.30%), the other method is setting the threshold to 99% when the battery runs low. New versions of SetVsel may come with new tricks to squeeze some extra time out of dry batteries.

SetVsel can show your processor status in the notification bar if you check the speed icon box. Don't panic if the reported speed is different from what you entered into the program. SetVsel polls the processor speed more often than the notification refreshes, so the numbers indicate average speeds.

The "apply at boot" option is best left alone. If your phone runs well you won't reboot it very often anyway, and if it crashes a lot you'll probably need to try different voltages and reduce the maximum speed.

Go get it

SetVsel (Android Market)
SetVsel (xda forum)

SetVsel was designed for the Motorola Defy, but it also works on the Droid X and the Milestone. It may work on other phones, but your best bet is to search the market for "overclock" or "undervolt" and pick an app tailored for your device. Read the comments in the market to check if it works on your phone model. Checking out forums like xda before you start messing with the voltage is a good idea too.

Other apps to overclock and undervolt:

Milestone Overclock (Android Market) (not only for the Milestone)
Milestone Overclock (xda forum)
Milestone Overclock (Google Code)
SetCPU (xda forum, free version)

Note: all overclock/undervolt apps require that your phone is rooted.


The safe ranges were estimated by searching Google for "Motorola Defy undervolt" and taking the speed-VSel combinations reported as being stable or unstable. The full list of values used:

reported as stable:
300/15 ? ?, 300/15 500/34 600/38, 300/14 550/26 800/38, 300/16 550/27 800/39, 300/16 600/28 800/39, 300/18 600/33 800/43, 300/20 600/32 800/50, 300/26 600/32 800/44, 300/26 600/33 800/39, 300/24 600/34 900/44, 300/28 600/38 900/46, 300/28 600/38 900/48, 300/18 600/30 1000/52, 300/18 600/38 1000/52 86%, 300/20 600/28 1000/54, 300/20 600/30 1000/48, 300/20 600/30 1000/52 80%, 300/20 600/34 1000/52, 300/22 600/32 1000/52, 300/22 600/32 1000/52, 300/24 600/34 1000/52, 300/24 600/36 1000/56 80%, 300/26 600/32 1000/56, 300/26 600/34 1000/54, 300/30 600/48 1000/58, 300/30 600/48 1000/58, 300/33 600/48 1000/52 92%, 300/33 600/48 1000/58, 300/16 600/27 1100/58, 300/19 600/29 1100/54, 300/26 600/34 1100/58 60%, 300/28 600/44 1100/58, 300/28 600/44 1100/62, 300/30 600/40 1100/58, 300/30 600/44 1100/60, 300/15 600/25 1200/60, 300/20 600/32 1200/63, 300/24 600/34 1200/62 80%, 300/30 666/46 1000/58, 300/17 700/35 1100/57, 300/28 700/52 1100/62, 300/30 700/46 1100/58, 300/16 700/33 1200/60 90%, 300/16 700/34 1200/63, 300/30 700/48 1200/68 86%, 300/30 700/48 1200/68 92%, 300/28 800/46 1200/60, 300/28 800/46 1200/60 76%, 300/25 900/56 1100/66, ? 900/40 ?, ? ? 900/46, ? ? 1000/45, ? ? 1000/50, ? ? 1000/56, ? ? 1000/56, ? ? 1000/56, ? ? 1000/58, ? ? 1000/60, ? ? 1000/74, ? ? 1100/55, ? ? 1100/56, ? ? 1100/58 70%, ? ? 1100/58, ? ? 1100/59, ? ? 1100/64, ? ? 1200/64, ? ? 1200/65, ? ? 1200/66, ? ? 1200/68, 300/33 600/48 800/58 1200/68

reported as unstable:
300/13 ? ?, 300/20 ? ?, 300/20 600/30 800/40, ? ? 900/46, ? ? 1000/56, ? ? 1000/60, ? ? 1100/53, ? ? 1100/54, 300/26 600/40 1100/58, ? ? 1200/60, ? ? 1200/66, ? ? 1350/76



tweet this reddit digg this StumbleUpon digg this digg this

10 comments:

  1. this is very helpful
    thanks so much
    i'm now running at
    300 MHZ -->18
    600 MHZ -->28
    1000 MHZ ->48
    and its very stable

    my quadrant benchmark is 1367
    temperature fluctuates between 35 and 40 but i live in Egypt so i'm sure this is because of the temperature here

    ReplyDelete
  2. ohh god it goes so well. 1200mhz -> 57 and the temperaturi is between 27 and 30. Yeah it was raining and it's cold but still no crashes whatsoever. THanks!!

    ReplyDelete
  3. How much battery it can save in case undervolted?
    Is it 10% or 10% or 50%?

    (it just doesn't make sence playing and fighting for 10% - and I have defy+ which is 1000mhz (and oerformance is suitable for me in all cases)

    ReplyDelete
  4. Somewhere in between 10 and 50% (closer to 10, though), but it's different for every phone. Not all processors can be overclocked to the same extent, even when they're from the same batch.

    My gut feeling says 15-20% is a reasonable target. Doesn't sound like much, but it can make the difference between your phone lasting all day or running out of juice an hour or two to soon.

    If you want solid numbers you'll have to test it on your own phone, and make sure that phone use and network reception with/without overclocking stays the same. This will make your phone immobile and useless during the test, which is why nobody does it.

    The network reception part is really hard to reproduce, since the cell towers and the amount of traffic on them is beyond your control. That's why the web is full with processor benchmarks but short on battery tests.

    ReplyDelete
  5. I like your blog modules.This is one of the good post.Thanks good post.Nice information.
    Android app developers

    ReplyDelete
  6. I have the settings: 300/16 600/28 1000/48 @86% and it works well.

    ReplyDelete
  7. Thanks for sharing this information. It really help me a lot..

    ReplyDelete
  8. The maximum you can save your battery by under volting is 2%. It's not really worth it IMHO.
    See here for test results by bedalus:
    http://forum.xda-developers.com/showthread.php?t=1478406

    ReplyDelete
  9. Undervolting may not be worth the trouble on a Samsung Nexus S in airplane mode while the screen is on and the processor running at its maximum frequency, but there are many more usage scenarios and a Motorola Defy is not a Nexus S.

    >>>
    bedalus wrote:
    1000 MHz V=1.25 so V^2=1.5625 (stock volts)
    1000 MHz V=1.2 so V^2=1.44 (the most UV my phone can handle with a fully charged battery)
    This is an 8% saving.
    [...]
    the screen being on uses about 4 times as much power as the CPU even at its highest frequency.
    <<<

    On a Motorola Defy running at 800 MHz you can cut the voltage from the default 1.325 down to 1.1125. That's 19% less, more than twice the 8% that bedalus managed on his Nexus.

    Phones spend most of their time below the maximum frequency, and at lower frequencies undervolting saves more juice. At 300 MHz undervolting can cut processor power consumption of a Motorola Defy by 40%, five times more than in the maximum voltage Nexus S scenario.

    Whether the processor is idle or not when the screen is off depends on personal usage, and the median display power drain assumed by bedalus doesn't hold for those who tweaked their Motorola Defy screen brightness for maximum efficiency.

    The default voltages of the Motorola Defy are excessively high (those of the Nexus S are not), so undervolting saves a lot more juice than on a Nexus that's voltage-optimised out of the box.

    The 2% maximum holds for a Nexus S under a specific set of conditions which rarely happen in the real world (syncing off, airplane mode, screen on during the entire test). You can't extrapolate this to all other Android devices under all conditions.

    I wonder what the outcome would be if bedalus undervolts a Motorola Defy to the max, doesn't assume that the screen brightness is set at half the maximum (excessively bright under most real-world conditions), and keeps sync, radio, and a VoIP app running so that the processor is doing something when the display doesn't dwarf the processor power usage.

    ReplyDelete
  10. Good point about the Defy having high voltages out of the box.
    I understand Bedalus needed a control, so he set his up that way. Hard to replicate real world usage. I guess the best thing would be to use it for a week, monitoring battery stats, then for another week with vsel set low and similar usage.
    Thanks for the info!

    ReplyDelete