[AOSP/CM7 Kernel] 11/01/2012 ManU 2.1 - 2.6.35 based battery efficient kernels

Which version do you use?


  • Total voters
    133
  • Poll closed .
Search This thread

EViollet

Senior Member
Aug 9, 2010
1,834
708
I'm listing here 2 different 2.6.35 based kernels :
The 1.x series exist for Froyo and Gingerbread. They are based on a 2.6.35.8 linux kernel. They are CFS only (no BFS version), and forked from Richard Trip's kernels (https://github.com/richardtrip/cm-kernel)
The 2.x series are for GingerBread only. They have CFS and BFS versions. They are based on a 2.6.35.13 kernel and forked from _thalamus' kernels (https://github.com/thalamus/kernel)

All of my kernels have the following characteristics :
  • Go from 128Mhz to 1190Mhz. If your phone crashes at those speeds, then don't use them. Not all phones are equal and they won't all accept these frequencies.
  • The noop IO scheduler is defined as default. I think that all the other schedulers are unnecessary with flash disks. They are too complex and consume more CPU for the same result.
  • Two-way call recording thanks to avs333 (http://forum.xda-developers.com/showthread.php?t=993793)

The following characteristics are available in some kernels :
  • BFS. Brain F*ck Scheduler. Only available on the 2.x kernels.
  • CFS. Completely Fair Scheduler. Choose which scheduler suits your needs the best. Check here for a description of both : http://www.stackednotion.com/2010/06/04/what-are-bfs-and-cfs
  • AXI. AXI optimisation is available in some kernels : http://forum.xda-developers.com/showthread.php?t=665110. When it is enabled, the AXI bus speed is lowered to 64Mhz instead of 128Mhz when the screen is off. In the other kernels, the AXI bus speed is throttled according to the current CPU speed.
  • HAVS. Hybrid Adaptive Voltage Scaling. Dynamically changes the phones voltage. Should use up less battery than SVS. In comparison with Richard's original kernel, I upped the maximum voltage in the overclocking frequencies to 1350mV instead of 1300mV because it didn't seem enough (at least on my phone). I also set the minimum voltage to 900mV. I feel it's a good compromise between 875 and 925... ;)
  • SVS. Static Voltage Scaling.
  • On the ManU kernel series, it is possible to change the voltages table on the fly using the following method. On the SVS kernel, the following method was used : http://forum.xda-developers.com/showthread.php?t=821372. See the post below for a simpler description of this

The following kernels are based on an OLD version of the Android kernel. The main advantage is the battery usage : it's very low compared to the latest kernels. The source code is available at http://github.com/eviollet/cm-kernel.

As of versions 2.1, SVS versions are no longer supported. Only HAVS versions are available.

2.6.35.13 ManU-Version 2.1 - Gingerbread ONLY
Gingerbread-HAVS-CFS ----------------
Gingerbread-HAVS-AXI-CFS ----------------
Gingerbread-HAVS-BFS ----------------
Gingerbread-HAVS-AXI-BFS ----------------

2.6.35.8 ManU-Version 1.4
Froyo-HAVS-CFS ---------------- Gingerbread-HAVS-CFS ----------------
Froyo-SVS-CFS ---------------- Gingerbread-SVS-CFS ----------------
Froyo-HAVS-AXI-CFS ---------------- Gingerbread-HAVS-AXI-CFS ----------------
Froyo-SVS-AXI-CFS ---------------- Gingerbread-SVS-AXI-CFS ----------------

Many thanks to Richard Trip for helping me out with the 1.4 kernel, and to thalamus for help on the 2.0 kernel.
 
Last edited:

EViollet

Senior Member
Aug 9, 2010
1,834
708
Version history :

11/01/12 ManU-V2.1:
  • HAVS only. The voltages run from 1000mV to 1350mV which means that they should be stable on all phones. Feel free to play around with the voltages using a script, or IncrediControl
  • LED notification should now work on GingerVillain 2.8 and upwards thanks to Richard Trip.
  • Added smartassV2, thanks to erasmux.
  • Fixed VPN on MIUI (and perhaps other ROMs) thanks to [email protected]
  • Fixed "adb devices" id name bug
  • Fixed battery calibration
  • Added lazy governor thanks to Ezekeel : http://forum.xda-developers.com/showthread.php?t=1276092
  • Added system files to display the current state of the vdd levels
  • Optimized onDemand governor: ondemand: Remove the iowait-is-busy tunable code. Thanks to someone (I don't know who, sorry...)
  • Changed the Lazy governor default values to the ones recommended by Dr Byte (80/30000)
  • Added debug information in the AVS module when voltage changes occur. Especially if they fail.
  • Added working VPN back again (credits go to mondilv)
  • Started changing the AVS vdd changing logic. Now only changes the frequencies that are directly impacted.
  • Add WiFi screen off power level switch
  • Fix sound issue when using voice commands when bluetooth is connected (??)

28/05/11 ManU-V2.0:
  • kernel rebased on V2.6.35.13

07/04/11 ManU-V1.4:
ManU-V1.3:
  • added CPU Vdd levels sysfs interface for HAVS kernels as well
  • changed the audio settings
  • changed the modules location
ManU-V1.2:
  • added CPU Vdd levels ("undervolt") sysfs interface for SVS kernels (http://forum.xda-developers.com/showthread.php?t=821372)
  • fixed video recording crashes
  • updated most of the drivers to most recent versions
  • changed the kernel name in the Android about box (now reports version number as well)
  • changed the zip flash to (hopefully) fix problems when flashing on phones with bad sectors
  • fixed some kernel versions having CPU governor performance by default
ManU-V1.1:
  • fix battery charging issue between 90% and 100%
  • disable 128Mhz when the screen is on, in the AXI kernels
ManU-V1.0: Kernel based on an old version (approx. October 2010)
V1 : Fix for IPV6 on MIUI. 6.1 and 6.1se kernels
V0 : First version : 6.1 and 6.1se kernels

FAQ:

  • How do I know which version I'm running? : Look at the "About the phone" screen at the kernel version. It should display which options you're currently using.
  • Which kernel do you recommend? : I'd say ManU-HAVS-AXI-CFS. On my phone on idle, I'm using up approx. 2-3ma/h instead of 6-7 with the default kernels with this kernel. So I'm very happy with it, and am currently using it as my main kernel. If you do any testing, feel free to tell us about your own experience! :)
  • Do you recommend any settings with SetCPU? : I currently use 128-440 conservative governor when the screen is off, and 128-1130 interactive when the screen is on and it gives good results.
  • After some time my phone feels sluggish. Why? : Apparently there seems to be an issue when switching governors, especially with "interactive". I recommend not to use it, or stick with it and don't change. This may be fixed in the future.
  • *Something* doesn't work with this kernel. Can you fix it? : First of all, my knowledge of the current state of the kernel is very limited. I just changed a few things in the DeFrost kernel to suit my taste and thought that this kernel may be of interest to some other people. If you have a problem, try explaining it, and give the following details : Name and version of your current ROM, previous kernel that worked, which version of the kernel you are now trying and any other details that may be of interest. I can't guarantee that I'll be able to fix it, because I don't develop the kernel, but I can try to help.
    If you have a problem, try disabling the 128Mhz and overclocking options. They may be the culprits.
  • If 128Mhz saves battery, why isn't it enabled by default in other kernels? : Good question, and I don't know exactly. why. Apparently it causes issues on some phones. So, if you have a problem, try disabling 128Mhz. Also, 1190Mhz is a very high value and can also cause issues. So try lowering the maximum frequencies if you have issues.
  • On which ROMs do these kernels work? : 1.x series work on DeFrost 6.1, probably earlier versions as well, MIUI and GingerVillain, Redux, and probably others. The 2.x series only work on GingerBread.
  • On which ROMs do these kernels NOT work? : Oxygen 2. I recommend directly using _thalamus' kernels for Oxygen 2 : http://thalamus.ineige.org/kernels/2.6.35/

Here is a description of how to use the sysfs interface to configure voltage levels :
For SVS kernels, the file name is "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" and on HAVS kernels, the file name is "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs".
This file is used to read the current voltage state of write new voltage settings.
How to read the settings with the HAVS interface:
connect to the phone using a terminal, or adb shell, and type "cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs". The phone will display the frequencies and the associated high and low voltages.
If you want to change the voltages, just send "echo 128000 875 1000 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs". This will configure the minimum voltage to 875mV and max to 1000mV for the 128000 frequency.
Another useful command is "echo -25 +25 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs". This will lower the minimum voltage by 25mV and raise the maximum voltage by 25mV on ALL frequencies.

As for the SVS interface, the commands are similar.
"cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" will display the frequencies and the voltages, and "echo 128000 900 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" will set the voltage to 900mV when the CPU is at 128Mhz.

Please note that voltages are multiples of 25mV. So, accepted values are 800, 825, 850, etc. Other values will be rounded.


There is also the possibility to visualize how the kernel is managing the HAVS voltages by using the following system files: /sys/devices/system/cpu/cpu0/cpufreq/vdd_table_havs and /sys/devices/system/cpu/cpu0/cpufreq/vdd_tables_havs

The first file lists the voltages being used for each frequency at the current temperature range.
The second file first displays the current temperature range index (starting at 0) and then the voltages being used for each frequency and for each temperature range.

The WiFi screen off power level can be configured by modifying the following file: /sys/module/bcm4329/parameters/wlLowPower
By sending 'echo 1 > /sys/module/bcm4329/parameters/wlLowPower' the WiFi will switch to low power level when the screen is switched off. By default maximum power is used at all times.

Test versions:
The following section contains test materiel. This means that I need feedback on this version, as it may (or may not) become the next official version.
For the moment, no beta/test version available.
 
Last edited:

EViollet

Senior Member
Aug 9, 2010
1,834
708
difference between base and "se" version?

The base version is the current state of the art of Richard Trip's kernel, as used in DeFrost 6.1. However there seems to be battery drain issues for some using this kernel, so he put up a 6.1se version that removes all the latest patches/addons to fix the drain.
I find the normal version quite stable and works well for me, but some may prefer the se version...

I hope this answers your question?
 

Marsbar

Senior Member
Mar 31, 2007
532
52
Nottinghamshire
The following characteristics are available in the different kernels :
  • HAVS. Hybrid Adaptive Voltage Scaling. Dynamically changes the phones voltage. Should use up less battery than SVS. In comparison with Richard's original kernel, I upped the maximum voltage in the overclocking frequencies to 1350mV instead of 1300mV because it didn't seem enough (at least on my phone). I also set the minimum voltage to 900mV. I feel it's a good compromise between 875 and 925... ;)
Boooo :( my phone works fine at 875 and 1300... but I want to try your kernels for axi....

I'll have to start work on that /proc/havs interface, since no-one else seems to want it. At least I'll have a week over xmas :)

Incidentally, the AXI thread you mentioned suggests that the modification is already in HTC's Desire kernel... what do they do at 128MHz?
 

EViollet

Senior Member
Aug 9, 2010
1,834
708
I'd be interested in seeing the AXI patches please, if not I'll go the hard way and fix up the ones off that thread :)

I just enabled the AXI patches in the kernel. Apparently the functionnality is already included in the kernel.

Am I missing something? I must admit that I didn't look any further than that. Perhaps what I wrote is completely wrong...
 

coutts99

Senior Member
Nov 1, 2010
1,406
261
Sunderland
I just enabled the AXI patches in the kernel. Apparently the functionnality is already included in the kernel.

Am I missing something? I must admit that I didn't look any further than that. Perhaps what I wrote is completely wrong...

Did you patch the kernel or was it already in? Did richardtrip patch it?
 

EViollet

Senior Member
Aug 9, 2010
1,834
708
Boooo :( my phone works fine at 875 and 1300... but I want to try your kernels for axi....

I'll have to start work on that /proc/havs interface, since no-one else seems to want it. At least I'll have a week over xmas :)

Incidentally, the AXI thread you mentioned suggests that the modification is already in HTC's Desire kernel... what do they do at 128MHz?

Do be honest, my phone also works fine at 875mV. But I had a few issues with the latest kernel that were fixed by setting it to 900mV. So I believe that 900mV is a little bit more stable. I don't intend on compiling 2 versions of the HAVS kernels, so 900mV seemed a nice compromise. Especially as quite frankly I don't see a difference in battery usage between 875 and 925...
I don't think it's worth the bother...
And as for the higher voltage for the higher speeds, it's just that I allowed HAVS to go higher. It doesn't mean that it will though. It depends on your hardware and what HAVS decides to do with it. If your phone works fine @1300mV it won't try to go any higher. HAVS adapts the voltage automatically by using 2 boundaries (high and low), and it works it's way between them...

As for the 128Mhz... the thing is that the AXI patch lowers the AXI bus to 63Mhz instead of 128Mhz. The problem is that in order to lower the CPU speed to 128Mhz, the kernel relies on the AXI bus speed. So if the AXI bus is lowered, so will the CPU. And, it will crash. Because it can't really go below 128Mhz.
That's why you can't use 128Mhz AND the AXI patch.
In any case, that's what I figured out by looking at the source code and trying it myself (I had a few crashes before understanding why... ;) )

Regards,
 
Last edited:

crapula512

Senior Member
Sep 17, 2008
406
23
London, UK
great work man, i was looking forward a kernel with hvas/bfs/noop and max freq 1190. min freq of 128 and axi are welcome!

only thing i dont like is the min freq, but its ok.

are you building straight from richard's repo? can you share the sources? and the config file?

thx!
 

Tweak³

Senior Member
Aug 5, 2008
54
0
@EViollet
First of all excellent work!
But I have one question.
You say in order to use AXI in your kernel, you have to choose at least 256MHz when the screen is on. In other words this means when it scales from 128MHz to let´s say 998 MHz AXI is automatically disabled?! So I have to choose 384MHz at SetCpu as minimum in order to use AXI?
 
Last edited:

crapula512

Senior Member
Sep 17, 2008
406
23
London, UK
1 issue, after enabling wifi it does nothing just keeps scanning.
Its necessary to turn airplane on/off or reboot.
Im using bfs havs axi @ 1190 max.

Sent from my HTC Desire using XDA App
 

EViollet

Senior Member
Aug 9, 2010
1,834
708
great work man, i was looking forward a kernel with hvas/bfs/noop and max freq 1190. min freq of 128 and axi are welcome!

only thing i dont like is the min freq, but its ok.

are you building straight from richard's repo? can you share the sources? and the config file?

thx!

I'm adding a tgz file to the first post that lists all the changes I made to Richard's source code, and the configuration files I created for all the kernels. Hope this helps.
 

EViollet

Senior Member
Aug 9, 2010
1,834
708
@EViollet
First of all excellent work!
But I have one question.
You say in order to use AXI in your kernel, you have to choose at least 256MHz when the screen is on. In other words this means when it scales from 128MHz to let´s say 998 MHz AXI is automatically disabled?! So I have to choose 384MHz at SetCpu as minimum in order to use AXI?

If you use AXI, the CPU frequency must be higher than 128Mhz when the screen is on. If you leave 128Mhz, in reality it will get much lower, so will eventually crash.

So, the values I use are :
Screen off : 128-450
Screen on : 256-1190

Regards,
 

EViollet

Senior Member
Aug 9, 2010
1,834
708
1 issue, after enabling wifi it does nothing just keeps scanning.
Its necessary to turn airplane on/off or reboot.
Im using bfs havs axi @ 1190 max.

Sent from my HTC Desire using XDA App

Hi.

I'm afraid I won't be able to do much here.
I'm not a developper of the kernel, so I don't know where to start.

Which ROM are you using? And which version of the kernel? 6.1? Or 6.1se?

Regards,
 

crapula512

Senior Member
Sep 17, 2008
406
23
London, UK
6.1se, rom is ginger villain 0.2.
I think its kernel related as it was working fine with 6.0c.
maybe is just a coincidence, but today benee updated his vorkkernel and ppl was having this same problem and later on he made anew version with wifi fixed.
Hope that helps and good work!

Sent from my HTC Desire using XDA App
 

EViollet

Senior Member
Aug 9, 2010
1,834
708
6.1se, rom is ginger villain 0.2.
I think its kernel related as it was working fine with 6.0c.
maybe is just a coincidence, but today benee updated his vorkkernel and ppl was having this same problem and later on he made anew version with wifi fixed.
Hope that helps and good work!

OK. Thanks for the update.

Did you try the 6.1 kernel? It has more a more recent WiFi driver. Maybe it works better...

Edit : I just checked GingerVillain 0.4 and can confirm that the WiFi driver doesn't work correctly.
It ends up connecting but it takes a VERY VERY long time to scan.

The WiFi update in the CyanogenMod kernel probable fixes this, so I'll have a look into it.

But, for the moment I'm afraid there is no support for Gingerbread...

Regards,
 

Top Liked Posts

  • There are no posts matching your filters.
  • 70
    I'm listing here 2 different 2.6.35 based kernels :
    The 1.x series exist for Froyo and Gingerbread. They are based on a 2.6.35.8 linux kernel. They are CFS only (no BFS version), and forked from Richard Trip's kernels (https://github.com/richardtrip/cm-kernel)
    The 2.x series are for GingerBread only. They have CFS and BFS versions. They are based on a 2.6.35.13 kernel and forked from _thalamus' kernels (https://github.com/thalamus/kernel)

    All of my kernels have the following characteristics :
    • Go from 128Mhz to 1190Mhz. If your phone crashes at those speeds, then don't use them. Not all phones are equal and they won't all accept these frequencies.
    • The noop IO scheduler is defined as default. I think that all the other schedulers are unnecessary with flash disks. They are too complex and consume more CPU for the same result.
    • Two-way call recording thanks to avs333 (http://forum.xda-developers.com/showthread.php?t=993793)

    The following characteristics are available in some kernels :
    • BFS. Brain F*ck Scheduler. Only available on the 2.x kernels.
    • CFS. Completely Fair Scheduler. Choose which scheduler suits your needs the best. Check here for a description of both : http://www.stackednotion.com/2010/06/04/what-are-bfs-and-cfs
    • AXI. AXI optimisation is available in some kernels : http://forum.xda-developers.com/showthread.php?t=665110. When it is enabled, the AXI bus speed is lowered to 64Mhz instead of 128Mhz when the screen is off. In the other kernels, the AXI bus speed is throttled according to the current CPU speed.
    • HAVS. Hybrid Adaptive Voltage Scaling. Dynamically changes the phones voltage. Should use up less battery than SVS. In comparison with Richard's original kernel, I upped the maximum voltage in the overclocking frequencies to 1350mV instead of 1300mV because it didn't seem enough (at least on my phone). I also set the minimum voltage to 900mV. I feel it's a good compromise between 875 and 925... ;)
    • SVS. Static Voltage Scaling.
    • On the ManU kernel series, it is possible to change the voltages table on the fly using the following method. On the SVS kernel, the following method was used : http://forum.xda-developers.com/showthread.php?t=821372. See the post below for a simpler description of this

    The following kernels are based on an OLD version of the Android kernel. The main advantage is the battery usage : it's very low compared to the latest kernels. The source code is available at http://github.com/eviollet/cm-kernel.

    As of versions 2.1, SVS versions are no longer supported. Only HAVS versions are available.

    2.6.35.13 ManU-Version 2.1 - Gingerbread ONLY
    Gingerbread-HAVS-CFS ----------------
    Gingerbread-HAVS-AXI-CFS ----------------
    Gingerbread-HAVS-BFS ----------------
    Gingerbread-HAVS-AXI-BFS ----------------

    2.6.35.8 ManU-Version 1.4
    Froyo-HAVS-CFS ---------------- Gingerbread-HAVS-CFS ----------------
    Froyo-SVS-CFS ---------------- Gingerbread-SVS-CFS ----------------
    Froyo-HAVS-AXI-CFS ---------------- Gingerbread-HAVS-AXI-CFS ----------------
    Froyo-SVS-AXI-CFS ---------------- Gingerbread-SVS-AXI-CFS ----------------

    Many thanks to Richard Trip for helping me out with the 1.4 kernel, and to thalamus for help on the 2.0 kernel.
    15
    Version history :

    11/01/12 ManU-V2.1:
    • HAVS only. The voltages run from 1000mV to 1350mV which means that they should be stable on all phones. Feel free to play around with the voltages using a script, or IncrediControl
    • LED notification should now work on GingerVillain 2.8 and upwards thanks to Richard Trip.
    • Added smartassV2, thanks to erasmux.
    • Fixed VPN on MIUI (and perhaps other ROMs) thanks to [email protected]
    • Fixed "adb devices" id name bug
    • Fixed battery calibration
    • Added lazy governor thanks to Ezekeel : http://forum.xda-developers.com/showthread.php?t=1276092
    • Added system files to display the current state of the vdd levels
    • Optimized onDemand governor: ondemand: Remove the iowait-is-busy tunable code. Thanks to someone (I don't know who, sorry...)
    • Changed the Lazy governor default values to the ones recommended by Dr Byte (80/30000)
    • Added debug information in the AVS module when voltage changes occur. Especially if they fail.
    • Added working VPN back again (credits go to mondilv)
    • Started changing the AVS vdd changing logic. Now only changes the frequencies that are directly impacted.
    • Add WiFi screen off power level switch
    • Fix sound issue when using voice commands when bluetooth is connected (??)

    28/05/11 ManU-V2.0:
    • kernel rebased on V2.6.35.13

    07/04/11 ManU-V1.4:
    ManU-V1.3:
    • added CPU Vdd levels sysfs interface for HAVS kernels as well
    • changed the audio settings
    • changed the modules location
    ManU-V1.2:
    • added CPU Vdd levels ("undervolt") sysfs interface for SVS kernels (http://forum.xda-developers.com/showthread.php?t=821372)
    • fixed video recording crashes
    • updated most of the drivers to most recent versions
    • changed the kernel name in the Android about box (now reports version number as well)
    • changed the zip flash to (hopefully) fix problems when flashing on phones with bad sectors
    • fixed some kernel versions having CPU governor performance by default
    ManU-V1.1:
    • fix battery charging issue between 90% and 100%
    • disable 128Mhz when the screen is on, in the AXI kernels
    ManU-V1.0: Kernel based on an old version (approx. October 2010)
    V1 : Fix for IPV6 on MIUI. 6.1 and 6.1se kernels
    V0 : First version : 6.1 and 6.1se kernels

    FAQ:

    • How do I know which version I'm running? : Look at the "About the phone" screen at the kernel version. It should display which options you're currently using.
    • Which kernel do you recommend? : I'd say ManU-HAVS-AXI-CFS. On my phone on idle, I'm using up approx. 2-3ma/h instead of 6-7 with the default kernels with this kernel. So I'm very happy with it, and am currently using it as my main kernel. If you do any testing, feel free to tell us about your own experience! :)
    • Do you recommend any settings with SetCPU? : I currently use 128-440 conservative governor when the screen is off, and 128-1130 interactive when the screen is on and it gives good results.
    • After some time my phone feels sluggish. Why? : Apparently there seems to be an issue when switching governors, especially with "interactive". I recommend not to use it, or stick with it and don't change. This may be fixed in the future.
    • *Something* doesn't work with this kernel. Can you fix it? : First of all, my knowledge of the current state of the kernel is very limited. I just changed a few things in the DeFrost kernel to suit my taste and thought that this kernel may be of interest to some other people. If you have a problem, try explaining it, and give the following details : Name and version of your current ROM, previous kernel that worked, which version of the kernel you are now trying and any other details that may be of interest. I can't guarantee that I'll be able to fix it, because I don't develop the kernel, but I can try to help.
      If you have a problem, try disabling the 128Mhz and overclocking options. They may be the culprits.
    • If 128Mhz saves battery, why isn't it enabled by default in other kernels? : Good question, and I don't know exactly. why. Apparently it causes issues on some phones. So, if you have a problem, try disabling 128Mhz. Also, 1190Mhz is a very high value and can also cause issues. So try lowering the maximum frequencies if you have issues.
    • On which ROMs do these kernels work? : 1.x series work on DeFrost 6.1, probably earlier versions as well, MIUI and GingerVillain, Redux, and probably others. The 2.x series only work on GingerBread.
    • On which ROMs do these kernels NOT work? : Oxygen 2. I recommend directly using _thalamus' kernels for Oxygen 2 : http://thalamus.ineige.org/kernels/2.6.35/

    Here is a description of how to use the sysfs interface to configure voltage levels :
    For SVS kernels, the file name is "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" and on HAVS kernels, the file name is "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs".
    This file is used to read the current voltage state of write new voltage settings.
    How to read the settings with the HAVS interface:
    connect to the phone using a terminal, or adb shell, and type "cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs". The phone will display the frequencies and the associated high and low voltages.
    If you want to change the voltages, just send "echo 128000 875 1000 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs". This will configure the minimum voltage to 875mV and max to 1000mV for the 128000 frequency.
    Another useful command is "echo -25 +25 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels_havs". This will lower the minimum voltage by 25mV and raise the maximum voltage by 25mV on ALL frequencies.

    As for the SVS interface, the commands are similar.
    "cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" will display the frequencies and the voltages, and "echo 128000 900 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" will set the voltage to 900mV when the CPU is at 128Mhz.

    Please note that voltages are multiples of 25mV. So, accepted values are 800, 825, 850, etc. Other values will be rounded.


    There is also the possibility to visualize how the kernel is managing the HAVS voltages by using the following system files: /sys/devices/system/cpu/cpu0/cpufreq/vdd_table_havs and /sys/devices/system/cpu/cpu0/cpufreq/vdd_tables_havs

    The first file lists the voltages being used for each frequency at the current temperature range.
    The second file first displays the current temperature range index (starting at 0) and then the voltages being used for each frequency and for each temperature range.

    The WiFi screen off power level can be configured by modifying the following file: /sys/module/bcm4329/parameters/wlLowPower
    By sending 'echo 1 > /sys/module/bcm4329/parameters/wlLowPower' the WiFi will switch to low power level when the screen is switched off. By default maximum power is used at all times.

    Test versions:
    The following section contains test materiel. This means that I need feedback on this version, as it may (or may not) become the next official version.
    For the moment, no beta/test version available.
    14
    1% per hour on standby (or even less)

    I'd love to show you another graph, but CurrentWidget had another of its famous infarcts, and lost several hours' worth of data. Suffice it to say that I'm at over seven hours, with 91% left, having spent a good half hour diagnosing K9 wakelock problems.

    So: if you're not getting around 1%/hour or better, and want to...

    • Check out what is using your battery and try to put it in a lower-energy mode.
    • If it persists, try stopping services
    • If there are no programs running, check out your WakeLocks (Spare Parts, BetterBatteryStats) and see if anything is using more than (say) 1% of the time.
    I found that Fancy Widgets (an HTC Clock/Weather widget clone) kept using a large amount of "WakeLock" time even though it was set to update only every two hours.

    K9 also uses a huge amount of WakeLock time, even though the logs say it isn't... if you don't need PUSH email, turn it off to save a huge amount of WakeLock.

    My "Deep Sleep" has gone from about 85-87% to nearly 97% in a day. After 7 hours and change on OnDemand, I'm now seeing what Lazy will do for the rest of the day... before trying SmartassV2 again.

    Observations:
    • Wifi/3G/Sync on need not mean a fast battery drain
    • Battery "burn" is directly proportional to the amount of time NOT spent in "Deep Sleep" - the CPU is actually the most efficient component in the phone - everything else is profligate in its use of energy by comparison! To maximise your charge lifetime, maximise "Deep Sleep"
    • PUSH email (K9) can cause a significant increase in "awake" time (4-6% overall). Try polling instead, and see what a difference it makes. Set the mail program to only search the required folders (say, inbox) and you'll be surprised how much difference it makes to keep your inbox uncluttered!
    • Widgets may also keep the phone awake when they're supposedly not allowed to.
    • You can get up to 100 hours on standby on a Desire with CM7
    • The Kernel is the critical factor in battery drain in standby; .35 kernels use less than current ones
    • Tuning voltages too low can significantly INCREASE your battery drain as well as making the phone appear laggy and become unstable.
    • Tuning voltages to reasonable, safe levels (undervolting) can marginally improve your battery life
    • Tuning frequencies down (underclocking) can marginally improve your battery life
    • Running at 729MHz/1050mV uses just as little power as 128-729... with the side-effect of slower response times. The difference between 128, 245 and 729 is so small that it's not measurable in any meaningful way (too many uncontrolled variables) and produces much the same results.
    • Governors make FAR less difference than anything above. Some will use a bit more, some less. OnDemand gives the most consistent results (same statistics over and over) whereas Lazy can provide better AND worse results at the same time.
    • A properly tuned, sleeping phone doesn't care what governor is running, since it spends so little time actually running when in standby. Therefore, choose the Governor based on your actual needs while the screen is ON and CPU is active. If you use background file transfers, sync, or streaming - choose a Governor to suit. Otherwise, it's pointless arguing about what governor to use for 1-4% of the time.
    • Use one governor for everything - using different ones for screen-on and screen off can cause issues on the transition, especially on wakeup. Again, there is little point spending time optimising 4% of the problem - go for the 96%!
    • Tools are your friend. Use them to identify where your drain is, and systematically address it. If necessary, temporarily uninstall packages. Repeat this step until all the high drain problems are eliminated, then look for alternative settings or applications.
    • Change one thing at a time, or prepare to be confused!
    • When in doubt, increase the minimum voltages. It will have trivial or no impact on your current draw, but may make the phone a lot more stable.
    • Unless you know better, use 1350mV for all your maximum voltages. That way, the phone has the option of using it if necessary to cope; too little Vmax, and it may crash.
    • If your phone works on other or previous kernels with the same voltages, that isn't because it was using them - it's because of BUGS and RESTRICTIONS in those kernels that meant it wasn't actually using the low voltages you set! 2.0.3 and 2.0.4 will try to do what you ask. Don't complain if you get what you asked for - a voltage too low to operate reliably!
    • If you are using a script or application such as "IncrediControl" to manage your voltages, use the "Set at boot" checkbox with great care! It is very easy to set the boot-time voltages so low that you will have to restore your phone from backup (or use adb) to regain control of it again. When you DO use the checkbox, make sure you use very safe minimum voltage values, such as 1100mV or higher.
    • Tweak your operating voltages down once the phone is already booted and under your control, but don't expect miracles: the major drains are:
      • Display
      • GPS
      • Camera
      • WiFi
      • Mobile connection
      • ...and well-behaved applications/widgets running on the phone or in standby are trivial by comparison.
    • Some kernels use (or allow you to enable) PS_MAX (max powersave) mode for WiFi. 2.x uses PS_FAST (Fast, but power-light) mode by default, whereas 1.4 uses PS_MAX. MAX may sound like a good idea, but it limits the available bandwidth while in that mode, which may interfere with operations like file copies or streaming music while the screen is off. Use with care. Also, it seems not to save much (if any) power in practice.
    • WiFi conditions may also affect your "battery life." If you are in a saturated WiFi area, the phone will have to SPEAK LOUDER to be heard, using more power. Similarly, it will have to "listen" to more traffic in the background hubbub compared to a quiet area with only its own, virtually silent network.
    • Similarly, 3G conditions will affect your "Mobile connection" services' battery drain. If you are in a marginal coverage area, it will take more "oomph" to talk to the nearby tower(s).
    • It may be counterintuitive, but you will probably find that the phone uses less battery if you run at a higher minimum frequency with the screen off. What? Easy: you want the phone to be in "Deep Sleep" as much as possible. This means finishing the work as soon as possible. If it's entirely CPU bound, the faster the clock speed, the faster it can go back to sleep, using virtually no power. 20 seconds of power-on at 128MHz uses more power than 10 seconds at 384, and it probably won't even use that much.

    UPDATE: See http://forum.xda-developers.com/showpost.php?p=19895459&postcount=1870 for an update on GpsLocationProvider wakelocks among others, related to WiFi Network location.
    10
    That's all folks!

    Hi everyone.

    Just passing by to say that 2.1 will probably be the last version of the 2.x series. I switched to ICS last weekend and I'm loving it!! :)

    Maybe there'll be a 3.x version for ICS some time from now. Who knows? But until then, I guess development on this kernel is kind of stopped.
    8
    Hi all.

    Just a quick update on the (very slow) progress.
    Smartassv2 has been added.
    Led notification now works with GV>2.7
    Lots of cleanup of the code
    Battery calibration should now work

    Still have a few things to fix, but I suppose a release seems possible next week.

    Regards

    Sent from my HTC Desire using Tapatalk
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone