Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
View Poll Results: Which version do you use?
HAVS-AXI 98 71.53%
HAVS 16 11.68%
SVS-AXI 16 11.68%
SVS 7 5.11%
Voters: 137. You may not vote on this poll

Post Reply

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

OP EViollet

22nd December 2010, 04:02 PM   |  #1  
OP Senior Member
Thanks Meter: 540
 
1,413 posts
Join Date:Joined: Aug 2010
Donate to Me
More
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...re-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 by EViollet; 11th January 2012 at 09:59 AM.
The Following 71 Users Say Thank You to EViollet For This Useful Post: [ View ]
22nd December 2010, 04:03 PM   |  #2  
OP Senior Member
Thanks Meter: 540
 
1,413 posts
Join Date:Joined: Aug 2010
Donate to Me
More
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 mondilv@xda
  • Fixed "adb devices" id name bug
  • Fixed battery calibration
  • Added lazy governor thanks to Ezekeel : http://forum.xda-developers.com/show....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 by EViollet; 11th January 2012 at 09:56 AM.
The Following 15 Users Say Thank You to EViollet For This Useful Post: [ View ]
22nd December 2010, 04:13 PM   |  #3  
Fightspit's Avatar
Senior Member
Flag Paris
Thanks Meter: 339
 
1,052 posts
Join Date:Joined: May 2010
More
Bien joué/Well played
22nd December 2010, 04:16 PM   |  #4  
vivmar's Avatar
Senior Member
Flag Brescia
Thanks Meter: 138
 
1,337 posts
Join Date:Joined: Sep 2009
More
difference between base and "se" version?
22nd December 2010, 04:20 PM   |  #5  
Senior Member
Flag Sunderland
Thanks Meter: 263
 
1,040 posts
Join Date:Joined: Nov 2010
Donate to Me
More
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
22nd December 2010, 04:27 PM   |  #6  
OP Senior Member
Thanks Meter: 540
 
1,413 posts
Join Date:Joined: Aug 2010
Donate to Me
More
Quote:
Originally Posted by vivmar

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?
The Following 2 Users Say Thank You to EViollet For This Useful Post: [ View ]
22nd December 2010, 04:35 PM   |  #7  
Senior Member
Flag Leicestershire
Thanks Meter: 23
 
424 posts
Join Date:Joined: Mar 2007
More
Quote:
Originally Posted by EViollet

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?
22nd December 2010, 04:39 PM   |  #8  
OP Senior Member
Thanks Meter: 540
 
1,413 posts
Join Date:Joined: Aug 2010
Donate to Me
More
Quote:
Originally Posted by coutts99

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...
22nd December 2010, 04:40 PM   |  #9  
Senior Member
Flag Sunderland
Thanks Meter: 263
 
1,040 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Quote:
Originally Posted by EViollet

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?
22nd December 2010, 04:44 PM   |  #10  
OP Senior Member
Thanks Meter: 540
 
1,413 posts
Join Date:Joined: Aug 2010
Donate to Me
More
Quote:
Originally Posted by Marsbar

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 by EViollet; 22nd December 2010 at 04:48 PM.

Post Reply Subscribe to Thread

Tags
128mhz, battery, eviollet, havs, kernel, manu, svs, undervolting, volt
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes