Hello guys, I spent the whole weekend working on an power manager (my girlfriend almost leave me haha)
NEW VERSION: Atucha V8 !!
Features:
- Auto-switch between 4 modes based on screen state, power source and headphones: two sleep modes (sleep & music) and two performance ones (USB/AC & Battery)
- Smart Undervolting: If screen is on, use the undervolt value seted in recovery, if phone are in sleep or music mode, the undevolting is: RECOVERY_UV + 50 (customizable for both modes)
- Auto Freq.: Detect the maximum and minimum processor frequency (for OC kernels )
- Auto Buffer: If screen is off or headphones are plugged, the audio buffer size is set to the best value for listen music.
- Overheating Protection: if the spica reaches 45ºC (113ºF), the CPU is set to the lowest frequency until the temperature drops. (I think that's unnecesary, but it's just for calm down some fears)
- Pauses: don't check status all the time. Might notice a delay when the screen turned off (or disconnect the cable), this is on purpose, to save battery. Not so when you turn the screen, in this case change instantaneously
- Optimal Performance: reach 878 points in quadrant !! (without OC!!)
It works like this:
If the screen is off ==> max freq: 66/133 MHz, governor: conservative
(Whether is plugged or with battery)
Operating with battery + screen-on --> max freq: 66/800 MHz, governor: on-demand
Is plugged-in USB/AC + screen-on --> freq: 800 Mhz, governor: performance
Breef explanation of the CPU governors:
- conservative: slow speed up to 133 MHz
- on-demand: fast speed up to 800 MHz (up_threshold = 90)
- performance: always at 800 Mhz.
There is 3 versions:
0) BASIC MODE: detect headphones (when turn off the screen), and set SPEED for music
1) MUSIC MODE: detect headphones (when turn off the screen), and set SPEED & BUFFER for music
2) DYNAMIC MUSIC MODE: detect headphones any time, and set SPEED & BUFFER for music
You could download any version and set your preferred configuration editing the file atucha.conf (with root explorer or similar). The file is located in " /system/etc".
If you put bigger values, you may get screen freezes, in this case, just reinstall the zip form recovery)
I tested in Cyanogen, Frozen Eclair, Samdroid (Froyo) and Spicagen
Form version 3 onwards, kernel must support dynamic audio buffer, like: XM kernels, ch33ky or Criminal.
I test it with XMister BFS Kernel, it have a little bug on bootscreen. If you have problems, you have to make a clean install, and recovery data without format, and all new patches.
To save your time, i upload a power pack, with all patches, optimizations and libraries you need.
There is 3 versions for CM 8.3/8.3.2 (maybe work with FE):
- Don't delete apps : Power_Pack_luismaf_v1.1_conservative.zip
- Delete some apps : Power_Pack_luismaf_v1.0.zip
- Delete a lot of apps (maps, keyboard, wallpapers, etc): Power_Pack_luismaf_v1.0_extreme.zip
This Power pack don't work in Spicagen, but i make a beta version for SGM: SGM_Power_Pack_luismaf_v0.3.zip
By the way, before installing any version, please MAKE A BACKUP
Installer automatically overwrite old versions and SSSwitch because it modify the same parameters. Have both at the same time could be a desaster. It is also incompatible with the SetCPU.
Has been very tested: I decrease 30 years the lifetime of my spica's screen, I turned on and off the screen so much lol. May still have some error, please let me know.
-------------------------------------------------------------
Auto Buffer:
- jack plugged + Screen OFF --> music mode: max freq=266 Mhz, audio_buffer=64
- jack unplugged + Screen OFF --> sleep mode: max freq=66 Mhz, audio_buffer=64
- jack plugged + Screen ON --> audio_buffer=64
- jack unplugged + Screen ON --> audio_buffer=(value setted in recovery)
Switch the buffer "on the fly" have an small issue: when you are playing, and buffer get changed, the player jump to the next song. So far is inevitable. Solution: start the player after a few secconds connect headphones(or put an ugly song at first, hehe)
The version "music mode" (non-dynamic) music will check for hearphones just on screen change.
PROS: energy save (I don't know how significant it could be)
CONS: if you unplug it when screen is on, the buffer size will be 64 until screen turns off (or reboot)
In both versions, to save battery the algorithm stops when the screen is off, and revive when it's on, then:
to get in music mode you must plug headphones before turn off the screen
when is in music mode, remains so until the screen turns on.
I chose 266 Mhz for music mode because using 320kbps files I got a few cuts with 133MHz. With 266MHz works pretty well, with very infrequent cuts (the same as with 800Mhz). If some one need a version with 400 or 800 mhz of max. freq, just tell me.
I hope you like it
discussion thread, please post comments & feedback in there:
tweaks + power manager with 3 modes: sleep / battery / plugged [discussion]
_______________________________________________
If you like my work, please buy me a beer Thanks!


2Likes
LinkBack URL
About LinkBacks

(or put an ugly song at first, hehe)
Reply With Quote
: 

Bookmarks