yashsingh1/xdaforums huggingface dataset:
[Droid Eris Android Development] mrfitz98:
Doesn't survive reboot

Kaos.froyo v32

I've got this installed and pidof batt.sh shows that it is not running (it returns nothing). When I run batt-cfg and select 2 it starts and sets 710 like it should and pidof batt.sh now shows that it is running. It does not survive a reboot though. Any suggestions? Reinstall? Everything is obviously installed, otherwise I couldn't start it manually. Do I need to change permissions on something somewhere, or am I just sol?
[Droid Eris Android Development] swaggerwocky:
I have the same experience. I have to run batt-cfg and disable/enable a setting then save & exit so it starts up batt.sh.
[Droid Eris Android Development] LexusBrian400:
Unrelated to OP, but it sounds like you should be turning your 3G off at work if its that bad. Easy Switch is a nice widget for doing so.
[Droid Eris Android Development] chimpsnest:
line 107?

So, I went in this morning and restarted batt-cfg in terminal and when I selected setting 2 and hit enter I got the following:

Most is normal, but note the line I put in bold down below:

The batt-cfg utility configures the

collin_ph battery tweak. When on USB/AC

power, maximum performance settings will be

used. When on battery, more conservative

settings will be used. As the battery

drains, the CPU clock will be lowered. The

CPU Scales between min and max settings

always. Additional timing and memory

settings are adjusted.

Please choose an option and press enter.

[1] Revert to 768mhz defaults and exit

[2] Revert to 691mhz defaults and exit

[3] Customize settings

[4] Disable Battery Tweak Entirely

[5] Enable CFS Tweaks

[6] Disable LED Fix (If LED Stuck)

[7] Disable Disk Boost

[8] Enable Audio Fix (Disable Stagefright)

[9] Save Changes & Exit

[Enter]: Exit Without Saving Changes

2

Loading 691mhz defaults

Killing batt.sh process

Saving Settings...

Settings Saved.

Starting batt.sh

/system/bin/batt-cfg: line 107: start: command not found

NOTE: when you exit ADB or terminal, you may

have to hit CTRL-C

Exited batt-cfg as root

sh-3.2$

When I do pidof batt.sh I get

4091

sh-3.2$

What's up w/that line 107 thing?

My battery doesn't seem to be saving much, I've been texting a lot this morning, but I'm down to 67%, I did run CardioTrainer w/GPS for 30 minutes too, checked facebook a couple times, but I was hoping for better.

I don't mind doing manual settings, but need a bit of guidance on the best tweaks in the custom area. lol
[Droid Eris Android Development] swaggerwocky:
I was having the same issue as well. I wiped data/cache and reflashed KF V35 and CFSv5 and all is well, for the most part. Just have the issue of batt.sh not surviving reboot.
[Droid Eris Android Development] suppliesidejesus:
Same problem here. It always comes back up when I run batt-cfg and save and exit (and my custom settings are there as well!!), but I'd like for it to survive reboot.
[Droid Eris Android Development] Decad3nce:
See post 2 for what you need to do to have it survive a reboot.
[Droid Eris Android Development] mrfitz98:
How about that? No init.rc Should I just create it?

sh-3.2# ls

01_qcomm_omx.cfg dhcpcd permissions

AudioFilter.csv ecclist_for_mcc.conf ppp

AudioPara4.csv event-log-tags profile

AudioPreProcess.csv firmware pvplayer.cfg

CHANGELOG-CM.txt gps.conf resolv.conf

NOTICE.html.gz hosts security

apns-conf.xml init.d terminfo

batt.conf init.goldfish.sh vold.conf

bluetooth init.local.rc vold.fstab

dbus.conf media_profiles.xml wifi

adding...

Well, duh. In the ramdisk, so obviously it is put there at boot, but from where? Creating init.rc in /etc doesn't do anything.
[Droid Eris Android Development] nemish13:
Ignore line 107... it should be commented out
[Droid Eris Android Development] Decad3nce:
init.rc is in the ramdisk.. you need to put the 'import' cal there, as stated in post 2.
[Droid Eris Android Development] Decad3nce:
Already commented that out.
[Droid Eris Android Development] swaggerwocky:
Thanks, missed that post!
[Droid Eris Android Development] chimpsnest:
In order words it's a glitch w/o any consequences, I don't need to reflash, etc.?

Thanks
[Droid Eris Android Development] Decad3nce:
No it just means that there's no support for that command in whatever ROM you're running(probably KaosFroyo).

Idk about consequences yet.
[Droid Eris Android Development] ahjee:
Just wanted to say thanks again man... this really has helped my battery life as well performance.. and mine works on boot automatically without problems. Really nice work, compliments conaps latest kernel very well
[Droid Eris Android Development] Lucky_Charms:
I'm getting the same message except mine says line 96 instead of 107. Should I ignore that also?
[Droid Eris Android Development] jdog94:
ok i assume if i flash a new rom i need to flash this fix again

my question is if i flash a new kernel to/over the current rom will this fix get messed up?
[Droid Eris Android Development] Decad3nce:
Eh? line 96 shouldn't be giving you any errors. I mean it can't.

It's not a fix. If you flash a new ROM over the current ROM, you'll have to reflash this script, but not for a kernel.
[Droid Eris Android Development] Lucky_Charms:
Here's a full printout of the error if it helps anymore. I tried reflashing kaos v34 to see if it would help but still getting same error.

The batt-cfg utility configures the

collin_ph battery tweak. When on USB/AC

power, maximum performance settings will be

used. When on battery, more conservative

settings will be used. As the battery

drains, the CPU clock will be lowered. The

CPU Scales between min and max settings

always. Additional timing and memory

settings are adjusted.

Please choose an option and press enter.

[1] Revert to 768mhz defaults and exit

[2] Revert to 691mhz defaults and exit

[3] Customize settings

[4] Disable Battery Tweak Entirely

[5] Enable CFS Tweaks

[6] Disable LED Fix (If LED Stuck)

[7] Disable Disk Boost

[8] Enable Audio Fix (Disable Stagefright)

[9] Save Changes & Exit

[Enter]: Exit Without Saving Changes

2

2

Loading 691mhz defaults

Killing batt.sh process

Saving Settings...

Settings Saved.

Starting batt.sh

/system/bin/batt-cfg: line 96: start: command not found

NOTE: when you exit ADB or terminal, you may

have to hit CTRL-C

sh-3.2#

Any Ideas? I am able to activate and deactivate CFS tweaks without a problem.
[Droid Eris Android Development] ahjee:
I've noticed that I have an error on 107 but only when I use tazzs rom if I use listys I have no error and works on boot..maybe something with the builds or something? Just thought I'd throw out there
[Droid Eris Android Development] DoubleByte:
I have also been unsuccessful at installing. Running KaosFroyo v34/CFSv5. I won't rehash but experiencing the same problem with script errors as others.

However, I was able to run batt-cfg. After configuration, pidof reported it running. I rebooted and the script did not load.

Tried installing and uninstalling, etc. Same result.
[Droid Eris Android Development] loki154:
Thanks guys. No problems running this on tazz froyo 6.0 vanilla.
[Droid Eris Android Development] FrankAmato:
Can I flash this on my HeroC? or will it only work for the eris, because i thought some stuff was interchangable between them.
[Droid Eris Android Development] Decad3nce:
There already is one for the HeroC... Search the development forum.
[Droid Eris Android Development] chimpsnest:
Thanks, I'm running Tazz's Sabbath V2.

Phone was doing some funky things yesterday as the battery got down to about 15% and below, it had a couple of reboots on its own, got laggy and unresponsive, will turn off this tweak today and see what my results are as the day goes on.

This didn't seem to give me any sort of gigantic battery advantage, so far anyway.
[Droid Eris Android Development] mrfitz98:
Ok, I've been searching high and low for this and can't find it anywhere, how do I mount the ramdisk r/w?

Thanks.

Found it....
[Droid Eris Android Development] ahjee:
sh-3.2$ su

sh-3.2#

When using kaosfroyo or tazzs Rom I get that when I load the terminal however with listys nonsensikal I get just the $ and #... when I get sh-3. 2 and run the script I have the line 107 error and I don't when its just #.
[Droid Eris Android Development] xr4v3nx:
It seems I can't change the default value of 15 in the polling when ON USB and ON AC. Can you check that? Or is it just me?
[Droid Eris Android Development] DS36:
im curious to what some peoples custom settings are

right now im testing out a low clock speed of 19200 mhz (of course no side effects) what are the best way

im curious to know why i have heard a few people saying under clocking too much is bad ? i would rather not hear rumors but facts for once.

in the setting under disk boost i says "disable" so im guessing its enabled already??? is it better to enable or disable it doesnt say in the OP

running kaos froyo does the cfs tweak apply to his rom its said to have a modified cfs kernel????

also is there and easier way to add in the scritp to make this stick after a reboot

i dont have my computer with adb on it

thanks
[Droid Eris Android Development] vinylfreak89:
its only bad if your using the interactive CPU scheduler... in adb shell run or terminal editor run "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" and tell me what it comes back as
[Droid Eris Android Development] DS36:
I have it set to on-demand so then i should be ok there

i also did not use the "presets" as i like to clock my cpu down to 19

all my setting are 19200--710400 in all profiles

im curious to the cfs tweaks and the "koasfroyoV.35 modified cfs optimization" can i use this tweak on this Rom ?????

also in batt. menu it says "disable disk boost " so that means it should be enabled and running now.....in the OP here it doesnt state which is superior to the other enabled or disabled?????

and last the advanced settings like (i like battery life more)

cpu scheduler...which is better ?

polling interval....whats the best setting ?

and is there an easier way to make this stick after a reboot i dont have adb right now but i have root explorer

thank you so much for your superior knowledge and help kaos with a sweet rom

you are a gentleman and a scholar :p
[Droid Eris Android Development] bleichtman:
Just curious as to what others think comparing this to set cpu. Which one tends to give better battery life. Are they essentially the same depending on the settings and profiles set?
[Droid Eris Android Development] ahjee:
I have personally gained about three more hours of battery life using this script, I never had that with setcpu. This has some more capabilities too i believe
[Droid Eris Android Development] bleichtman:
My phone seems to lag a bit when settings are applied. Any suggestions
[Droid Eris Android Development] chimpsnest:
Do you mind if I ask what kind of settings you are on? Is it custom or just one of the pre determined ones? Also, are you constantly checking email, facebook etc etc. or do you try to limit that to an as needed basis?

I'm back on Tazz Froyo 'blackened' v7. I had left for Kaos 35, but I have a few issues w/that ROM so I'm going to stay w/Tazz for a bit, but would love to tweak the battery settings.
[Droid Eris Android Development] bubba1114:
With it being on 19200 do you know if you have pandora or rhapsody playing will the music skip? Right now I'm not seeing much improvement with this script but was just wondering if the music skips when its underclocked that low?
[Droid Eris Android Development] DS36:
haha even with setcpu i used to down clocked to 19--480 on sleep

i use pandora AND CARDIO TRAINER together at the same time everyday no skippin no issues

Cardio trainer is one heavy-ass app too

u must know when there is load the cpu will speed up to compensate

doesnt sit at 19

i like to down the clock when its ilde
[Droid Eris Android Development] bubba1114:
Ok thank you. I'm not having much luck with the script. I had custom settings on yesterday and I got maybe an hour if that more of battery life now I changed it to the #2 setting in the menu and I'm losing battery just checking the time. Its always on 3g from what I can see but idk what's going on. Any ideas?
[Droid Eris Android Development] DS36:
run the set up again and do 19200min --719max on all EXCEPT usb where u do 480min--710 max

ondemand

all other settings are default

fyi u have to resave it after you reboot
[Droid Eris Android Development] jdog94:
what do you mean resave after reboot?????

go through and set it all again???
[Droid Eris Android Development] DS36:
No just hit save
[Droid Eris Android Development] jdog94:
where do you hit save

i have never hit save on collins
[Droid Eris Android Development] jdog94:
ok i went to

batt-cfg

the choose save and exit

is that what you mean?????

after every reboot???
[Droid Eris Android Development] nemish13:
Yes unless your rom has import it will require you manually starting it.
[Droid Eris Android Development] DS36:
Correct
[Droid Eris Android Development] DS36:
RIGHT HERE MR. Beindroid ????
[Droid Eris Android Development] Izeltokatl:
You technically dont have to save after each reboot on any CM ROM (like Kaos, CELEB), it saves it and restores at boot.

see original mention of this:

http://xdaforums.com/showpost.php?p=8174668&postcount=50
[Droid Eris Android Development] nemish13:
Latest Kaos doesn't have the import line. So maybe it doesn't have the latest CM yet.
[Droid Eris Android Development] Izeltokatl:
DOH!

Anyway we can manually add this line back in? Dont want to have to keep running the custom settings.
[Droid Eris Android Development] nemish13:
Once your batt.conf is saved all you need to do is run batt-cfg and select 9 to save and exit.

Don't have to keep running the custom settings.

But hopefully Kaos will fix reboot issue in v36
[Droid Eris Android Development] kzoodroid:
Was having the same problems not getting a response out of pidof batt.sh and tired this suggestion. Finally got a 773 after running pidof batt.sh a second time after running batt-cfg but I used preset #1 instead.

kaosfroyo v35-1

My Quadrant scores are slightly lower than with SetCPU, 386 versus 423. But I noticed the CPU frequency reported in Quadrant now was 608 and with SetCPU I had it maxed at 768. Just have to wait and see what improvment I get in battery life. It does seem snappier now though.
[Droid Eris Android Development] acidburnd:
I run pidof batt.sh and the# is 1401 this is bad or good?
[Droid Eris Android Development] Decad3nce:
It's just the process id. That means its running.
[Droid Eris Android Development] acidburnd:
Oh ok thanx
[Droid Eris Android Development] chimpsnest:
A guide to this

Am I missing something in the way of a FAQ/guide to what's what w/this tweak?

I think I'd like to try some custom settings but am unsure of certain things. Also, as a side note, I CANNOT overclock my phone, anything over 710 goes all skippitydoodah on me and really whacks out. I had used option 1 for 768 and when plugged my phone in I got bootloop because it was overclocking at that time. Am thinking of using the #2 presets, but I like to know what it all means so I can figure out what's best for me.

So:

Should I go "underclock (recommended) or "powersave bias" - and then choose my options ? (I know what underclock means, not sure of powersave bias)

If I go one of those routes then, under CPU scaling which one?

ondemand user space performance or interactive? (differences?)

CPU Scheduler, noop anticipatory <deadline> bfq (not sure what these mean)

Then for min/max what are you guys using for:

On battery

On USB

On AC

Polling Interval - how often?

I understand that this is how often the phone checks status, just not sure what's best

On battery

On USB

On AC

And, finally, CPU/Processor Speed - max %

Thank you!
[Droid Eris Android Development] Izeltokatl:
you may want to run quadrant a couple times, the scores change slightly each time you run it.
[Droid Eris Android Development] 5thAgent:
Deca: thanks again. This is what I've needed.
[Droid Eris Android Development] Decad3nce:
There's a link to a documentation in the OP.

You can find specifics on powersave bias all over xda.
[Droid Eris Android Development] chimpsnest:
I've read this: Original documentation can be found here: http://www.primoweb.com/froyo/battery_tweak_v3.html

and this, all 9 pages:

The original thread can be found here: http://xdaforums.com/showthread.php?t=762283

I guess I understand a majority of the "how it works" by governing cpu settings under certain circumstances (ac/batt/usb), I'm just unsure of what the best settings are for each of those, although I do know I cannot OC, how often it should poll and what those terms mean under cpu scaling and cpu scheduler, I was hoping for more of a guide to this, I keep getting info on SetCPU if I look up powersave_bias.

I'm going back to google/search here, but I just didn't know if I was missing a specific thread or document on THIS particular tweak. Usually there is something that says "this is what this means" and I just didn't see it.

I have searched 'powersave bias' on here and get a ton of threads/hits, but all I have seen are notes on what people have it set on and I kinda wanted to know what it all means.

Still learning, thanks.
[Droid Eris Android Development] whojabacod:
Bfq vs. Deadline?
[Droid Eris Android Development] Decad3nce:
Powesave bias: http://osdir.com/ml/kernel.cpufreq/2006-07/msg00114.html

BFQ: http://kerneltrap.org/taxonomy/term/1231

Deadline: http://kerneltrap.org/node/431

And for those of you spitting back errors regarding line 107. I've updated the zip in the front a while ago to uncomment that line. You'll have to run the 'save settings' to make sure everything works alright though. The reason you get the error is because of a missing binary, which I have yet to figure out which it is. :S
[Droid Eris Android Development] chimpsnest:
Thanks Dec, that site never even came up in any of my searches - I understand it a bit more now.
[Droid Eris Android Development] chimpsnest:
So what are you guys using

Curious what ROM's you guys are running this on and what folks are using for settings, custom or one of the preset ones? I'm using #2 right now, haven't had the courage to plunge into custom settings yet.
[Droid Eris Android Development] ahjee:
Sorry decadence I wasn't trying to be redundant, I had mad a comment about it before and didn't have a diagnosis. thought it may help.
[Droid Eris Android Development] Izeltokatl:
For those looking to figure out what this DiskBoot actually does.

http://www.howtoforge.com/reducing-disk-io-by-mounting-partitions-with-noatime

Linux has a special mount option for file systems called noatime. If this option is set for a file system in /etc/fstab, then reading accesses will no longer cause the atime information (last access time - don't mix this up with the last modified time - if a file is changed, the modification date will still be set) that is associated with a file to be updated (in reverse this means that if noatime is not set, each read access will also result in a write operation). Therefore, using noatime can lead to significant performance gains.
[Droid Eris Android Development] Izeltokatl:
Decad3nce, I'm curious all the settings and options you have enabled/disabled... I assume you've enbled all the tweaks and using option 1?
[Droid Eris Android Development] pkopalek:
So I'm a little confused. KaosFroyo 35-1 based on Cm6.

I manually configured my settings to max 806mhz in each condition. (within batt-cfg).

I've rebooted lots of times.

When I go /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq, it reads 710400, every time I reboot.

Is this not really where my max speed is listed? Kind of awkwardly, I ran batt-cfg again, made sure everything was 806400, and now it says 741888.

Strange?

Once I go to 'stats' folder, and check out time_in_state, it says I've only been at 806400 for '12', and every value above 729600 is "0".

710400 is "744122" and every value below that has values.

Do I need to do something new to run batt-cfg on boot?

In Root Explorer, I changed 'scaling_max_freq' to 806400 by long-pressing it in Root Explorer, and changing it with a text editor.

Now my time_in_state lists 806400 in the thousands, just moments later. As soon as I reboot, everything's back down to 710mhz.
[Droid Eris Android Development] Decad3nce:
I'm running my own BFS kernel. On CM6, no JIT, no compcache, nothing. I have no tweaks enabled aside from the disk boost.

batt.conf:

audio_fix=0
CFStweaks=0
MOUNToptions=1
enabled=1
LEDfix=0
cpu_limiting_method=1
min_freq_on_battery=245000
max_freq_on_battery=768000
min_freq_on_USBpower=245000
max_freq_on_USBpower=768000
min_freq_on_power=245000
max_freq_on_power=768000
polling_interval_on_battery=60
polling_interval_on_power=15
polling_interval_on_USBpower=15
cpu_max_underclock_perc=15
scaling_governor=ondemand
cpu_scheduler=deadline

That is strange. What scaling governor are you using?

I'm also wondering if it isn't saving settings properly at this moment.

Seems like the only ROM that is the main offender seems to be KaosFroyo; I think it's missing some OTHER dependencies aside from the ones I've listed.
[Droid Eris Android Development] pkopalek:
Yeah. I'm manually setting cpu_max_freq every reboot. It works fine then.

I'm using ondemand.

Suggest something else?

EDIT: What if I got my settings EXACTLY how I wanted them, then renamed Batt.sh to Autostart.sh.

Then downloaded the app Autostart from Market? Think this would work then?
[Droid Eris Android Development] Decad3nce:
batt.sh is called by the init.local.rc in system/etc/

You'd also have to change every instance of batt.sh to Autostart.sh to have a functional tweak.

I don't see the point of Autostart.

Is the tweak not running at boot for you?
[Droid Eris Android Development] pkopalek:
That's exactly what I'm thinking.

Every reboot, it's at the default for this rom, 710.

As if I didn't do the tweak!
[Droid Eris Android Development] Decad3nce:
For the time being, you can manually do the tweaks in the batt.conf file.

I'll see whats up when I have some more time.
[Droid Eris Android Development] pkopalek:
batt.conf is actually 100% edited the way I want it, and looks like it should be working. Everything goes to 806400 like I set it.

It really really seems like something is strange with batt.sh? Because I think that 744122 is not a possible cpu speed with this kernel on this phone, and it was odd that it set max_scaling_freq to that.

Again, once a boot, manually editing scaling to 806400 seems to work great.

batt-diag seems to show me the time that it's at 806, and it's definitely working right, after I manually edit scaling_freq on each reboot.
[Droid Eris Android Development] collin_ph:
Are you running plugged in or on battery? The tweak reduces CPU speed as the battery drains, so that could be it.
[Droid Eris Android Development] pkopalek:
I've done this process before and after bring plugged in both usb and wall charger.

If I manually run batt.sh, and close terminal emulator once it starts looping with errors, then check my max scaling, it's 806.

It seems pretty clearly like batt.sh isn't running on its own at all. My phone can be on for hours, on and off the charger sporatically, and it'll be at 710 all day until I a) manually change the file to 806400 or b) manually run batt.sh from terminal.

In all these cases, I've been above 80% battery.
[Droid Eris Android Development] Decad3nce:
Check bottom of post 1. Zip updated, too.
[Droid Eris Android Development] lp4261:
Can someone please explain this to me? Having been rooted for only about two weeks, I'm still trying to get some of this stuff figured out. My understanding is that this is flashable via recovery, but then what? Do you configure the settings through the terminal emulator? Am I going to be changing script or just configuring settings? Thanks for your help and patience.
[Droid Eris Android Development] Decad3nce:
Flash via recovery. You can configure the settings in either adb shell or in terminal emulator. You're not changing the actual script aside from a few variables.