Results 1 to 6 of 6
Like Tree2Likes
  • 2 Post By luismaf

Thread: tweaks + power manager with 3 modes: sleep / battery / plugged

  1. [translate]    #1
    Senior Member
    Join Date
    Nov 2010
    Location
    Rosario, Argentina
    Posts
    104

    Cool Smart Undervoting + Auto-buffer + Power Manager

    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):



    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!
    Attached Files Attached Files
    Last edited by luismaf; 03-28-2011 at 07:03 AM. Reason: NEW VERSION: Atucha V8 !!

  2. [translate]    #2
    Senior Member
    Join Date
    Oct 2010
    Location
    EU
    Posts
    161

    Default

    using this one below with latest CM 6.1.1 A8.1 cheeky001 BFS: do I need to set any undervolt value in recovery-advanced-kernel tuning? I used to have 90 there but after installing 140-200 dyn it went to 0 and I can no longer set a value in revovery...phone freezes when pressing back button after setting a value and screen goes beserk and I need to pull the battery...thanks.
    Quote Originally Posted by luismaf View Post
    atucha_luismaf_v05 (140-200uv) dynamic music.zip
    (5.2 KB, 30 views)
    Last edited by rapasamdroid; 12-20-2010 at 07:27 AM.

  3. [translate]    #3
    Senior Member
    Join Date
    Nov 2010
    Location
    Rosario, Argentina
    Posts
    104

    Default

    Quote Originally Posted by rapasamdroid View Post
    using this one below with latest CM 6.1.1 A8.1 cheeky001 BFS: do I need to set any undervolt value in recovery-advanced-kernel tuning? I used to have 90 there but after installing 140-200 dyn it went to 0 and I can no longer set a value in revovery...phone freezes when pressing back button after setting a value and screen goes beserk and I need to pull the battery...thanks.
    Please, use the discussion thread. I answer you there.

  4. [translate]    #4
    Senior Member
    Join Date
    Aug 2010
    Location
    Paris
    Posts
    241

    Default

    I do a tweak for my phone : tweak_v10.1_uv240_cfs for the krnl cfs !
    screen off : laptop_mode is actived
    screen on : laptop_mode is desactived

    &

    screen off : undervolt 240
    screen on : undervolt 0

    &

    *scheduler i/o
    *mount blocks with option noatime et nodiratime
    *OOM et laptop_mode activé
    *swapiness desactivé
    *connection tcp/ip
    *min_free_kbytes a 4096
    *governor on ondemand
    *dirty ratio 95 et dirty_background_ratio 60

    Enjoy

  5. [translate]    #5
    Senior Member
    Join Date
    Nov 2010
    Location
    Rosario, Argentina
    Posts
    104

  6. [translate]    #6
    Senior Member
    Join Date
    Nov 2010
    Location
    Rosario, Argentina
    Posts
    104

    Default

    Power pack don't work in Spicagen, but i make a beta version for SGM: SGM_Power_Pack_luismaf_v0.3.zip

    I tested with BFS XMister with very good results:

    829-sgm-xm.png
    Last edited by luismaf; 03-26-2011 at 09:31 PM.
    Shaka Inket and hyenahun like this.
    If you like my work, please buy me a beer. Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •