yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] rossmoore81:
wifi

Its gotta be something else bc i run wifi all the time no 3g in my area. And on my dream i have better battery life than on any other cyan build. I even ran a newer hero update to check out battery dropped so fast. reinstalled newest cyan and battery holds like a champ. All day w no charging required. On stock battery that came w phone btw.
[G1 Android Development] cyanogen:
Alright..

Can you grab this driver and push it to /system/lib/modules:

http://n0rp.chemlab.org/android/testing/wlan.ko

Restart wifi or reboot so the driver reloads.. Let me know if you get better results.
[G1 Android Development] aryndar:
calander sync

This worked for me.

Delete phone's calander data, re-sync.

Menu...settings...applications...manage applications...calander data...clear data

Cheers
[G1 Android Development] igashu:
The plot thickens. Why, then, after flashing back to 3.6.8.1, (from 3.9.4) does the Launcher.apk still contain that new default wallpaper? :confused:
[G1 Android Development] ubernicholi:
I just wanted to chime in and state that I have noticed a significant drain using 3g vs wifi. One hour of 3g with a fully cycled/charged battery dropped me down to 74%. 2.5 hours of surfing = 53%

one hour of wifi surfing with fully charged/cycled battery only dropped me to 92% 2.5 hours =81%

Not scientific, by any means. Just my observation/2cents whatever.
[G1 Android Development] zimphishmonger:
Well, We really appreciate the work that you have put into this rom. This build has seen more development than almost all the OTA updates combined, not to mention the fact that the build is updated almost every 2 days or so. :D Beer money is coming as soon as the next paycheck arrives.....Keep up the great work and response! Thanks again
[G1 Android Development] cyanogen:
Here's the problem.. What is the baseline? What should we be expecting? I guess these kinds of tests need to be repeated on a bone-stock ROM (or something at least close, like JF's ADP1 image) in order to establish some kind of reference.
[G1 Android Development] zimphishmonger:
Chill man, there are SO many userinit.sh scripts on this forum that you literally could go crazy comparing all of them.

http://xdaforums.com/showthread.php?t=542304

Give this a shot, and post and questions in the Swap and CM forum........
[G1 Android Development] c0t0d0s2:
What's the best way for us to give you good data on this?

I myself have not noticed better or worse battery usage, but I am also used to plugging the phone in whenever I can.

This phone always eats battery like a fat kid in a candy store, no matter if I'm using stock roms or one of Cyanogen's. Coming from a Blackberry, days where I can use it for 2 days without a charge are over. (Its worth it, though, dangit)

EDIT:

If I was assuming cpu cycles = battery usage, if we can get sar running on this phone, it might help track down if cpu usage is the culprit or not...
[G1 Android Development] uwonsum:
This is getting crazy. That is all I can say. Either way, I will be posting my result with wifi use soon.
[G1 Android Development] zimphishmonger:
This is def not meant to start a rant\argument, but you are cruising a forum that is based around the

EXTREME

customization of an operating system that runs on top of a linux kernel. everything mod, hack, and tweak on this forum is possible simply because our devices are running open source software. Linux has its problems as does EVERY operating system, but for this exact purpose, Linux is def the best option....just look at all the cool stuff we can do that Iphone\WM\Palm\Blackberry owners couldnt even dream of....all due to the fact that linux is at the heart of Android. Sorry if I ran off topic
[G1 Android Development] uwonsum:
This is something that has not been mentioned much. When I first got this phone, coming from a Dash (don't flame me), the one complaint I had was the battery drainage. I did not root until a couple months later. So take this into consideration. Am not calling anyone out, but it is something to consider.
[G1 Android Development] flaggg:
I sent cyanogen beer money earlier today for all his hard work, but now I'm going to send him triple that for having to read this thread ;)

I have no issues with battery so far, but I haven't been paying too much attention either. Thanks for the awesome builds, I really appreciate it.
[G1 Android Development] yomamaster:
Writing a test bed

I reading over the threads on battery life and cyanogen's frustration with there being no reference, it made realize that we actually need some good ol' fashioned testing tools.

If there were a tool that would log a starting voltage and then go through a series of tests (e.g. flogging the 3G, 2G, wifi, CPU, etc) and then take an end voltage, we'd be able to compare it to a variety of ROMs.

Then you'd also know for sure if one revision really does better than another rather than people's perceptions.

I don't know crap about the Android platform, but I'm pretty familiar with Linux. If anyone wants to help, I'll try to hack this up. Or, if this already exists, then let's start using it.
[G1 Android Development] andonnguyen:
10 char. delete.
[G1 Android Development] ScottGood:
for the record, sorry no log tonight but I had wifi on from a full charge and in 2 hours was down to 49%, I turned wifi off and charged to full 6 hours later I'm at 81% just food for thought, I'm off to bed. you all have fun.
[G1 Android Development] ScottGood:
no screenshots attached
[G1 Android Development] cyanogen:
I just built sysstat for Android. I'll up a tarball in a minute.
[G1 Android Development] Coreburner:
I doubt its the rom

Just a thought but my wife and I got are G1's at the same time from the same store Rooted same day and have always had the same ROM on each Phone with the same SD cards. I've beat the hell out of my phone and it's stil rock solid after six months. She's on her 5th G1 all had some hardware problems, one was DOA, and all of hers had/have the same crappy battery life. I've swapped our batteries and hers still sucks power. I'll bet even money it's HTC's QA process with this product line thats the problem. MY wing, MDA, and dash still work great.
[G1 Android Development] andonnguyen:
Sorry:)

Running powertop, and was getting suggestions at the bottom of my terminal (seems to be towards power-saving measures)

$su

#powertop -d

for those wondering what powertop is: http://www.lesswatts.org/projects/powertop/
[G1 Android Development] mdavidf:
This happened to me once...remove the battery cover and see if cleaning your lens helps.

I'll second that...a lot of people want the world in these modified ROMs and expects their sole request to be answered.

Everyone just needs to leave the man (Cyanogen) alone and take an objective view of their issue. Most of the time, it's not the ROM, it's something on your particular phone.

All I have to say to this is...hehehehehehe. You don't owe anyone anything, amigo.

The plot doesn't thicken. Cyanogen has provided that wallpaper for the last several builds...I couldn't swear to which build he started including it, but it's been there for awhile.

I just want to point out two three about the battery issue and I'll never mention the battery again:

1) Most of you are using the generic battery that came with the phone;

2) You're using the generic battery on a suped-up ROM, so, what do you expect?; and

3) Stop whining about it (I'm speaking to the two who haven't stopped posting about it all friggin' day). It's been posted non-stop for several builds and you know what? For most of you, see 1 & 2 for the answer.
[G1 Android Development] cyanogen:
Ignore the suggestions. It thinks you are running on x86, and it also can't properly read the kernel configuration. Everything it recommends is already done.
[G1 Android Development] zimphishmonger:
[mods] Delete
[G1 Android Development] uwonsum:
This test was carried out using a battery monitoring app (available on the market), and the data was exported after an hour of using wifi and browsing the web. If you look at the time in state, you will see I did some browsing. So after an hour, the battery dropped 9 percent (100-91).

Battery Usage (output monitored by battery graph application)

sample_date sample_date_in_seconds battery_level
23:33:41 1249184021 100
23:38:41 1249184321 100
23:43:42 1249184622 100
23:48:42 1249184922 99
23:53:42 1249185222 99
23:58:43 1249185523 99
00:03:43 1249185823 98
00:08:44 1249186124 95
00:13:43 1249186423 94
00:18:43 1249186723 92
00:23:44 1249187024 92
00:28:44 1249187324 92
00:33:44 1249187624 91

# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
19200 0
122880 0
128000 233001
245760 11754
384000 125842
528000 44625

# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/trans_table
From : To
: 19200 122880 128000 245760 384000 528000
19200: 0 0 0 0 0 0
122880: 0 0 0 0 0 0
128000: 0 0 0 0 0 130
245760: 0 0 61 0 0 24
384000: 0 0 70 81 0 647
528000: 0 0 0 4 798 0
[G1 Android Development] devsk:
your transition table is very interesting. Most of your transitions are between 384-528 and back, whereas most of my transitions have been from 128-528 and back. You never seem to be going to 128. And that is turning out to be better. May be transitions are indeed eating battery more than they are conserving.
[G1 Android Development] ShatBag1105:
Idk if its true, but I believe it.

Im at a steady 528/528 and my battery will last about 24hrs on a normal day of calls ans app usage. Slow times: Id charge it about once every 2 days Id say.

I was using overclock widget on previous cm builds, and my battery was sucking till I set it to 528 constant to run GBA emulator and forgot to turn it back to switch mode. My battery lasted all day and thats when i figured "cm mods love 528 lol"

And Ive never "trained my battery" or anything like that.
[G1 Android Development] uwonsum:
I have to disclose now that I do have an option enabled in the kernel that changes the way my transition table works.
[G1 Android Development] isikh:
What's the default frequency Cyanogen's builds are on?

I read somewhere it's 528, but my battery life is not that good; am I missing something, my 3G is always off too
[G1 Android Development] devsk:
You did not disclose...:D Can you please? I would love to know because my battery is sucking at this time.
[G1 Android Development] devsk:
It certainly is looking to be true. uwonsum's state transitions are from 384-528 mostly and he has better battery life than me when my transitions are from 128-528 mostly. So, there does seem to be some correlation here.

I will try 528/528 combo and see what that gives me.
[G1 Android Development] devsk:
I have heard its from 245 to 528 but I have observed its varying from 128 to 528.
[G1 Android Development] roxthiaguin:
Just to say...

There is missing a 0 again in the sampling rate...

the sampling rate is 200000 instead of 2000000

so it`s causing it to run always on the max freq =P
[G1 Android Development] cyanogen:
No, it's not. It was actually set to 20000 before. This value is OK, I set it that way to test the performance.
[G1 Android Development] roxthiaguin:
How the hell do you stay in that freq all the time and you can make it last 24h? oO`

If my battery could last at least 18h I would be very happy =D

anyway

your rom rules cyan!

loving 3.9.4...can`t wait for 3.9.5
[G1 Android Development] d2dthetide:
With 3.9.3 charged to 100% I drained til phone shut off then charged to 100% again. I unpluged it at 5AM with a full charge, put it into sleep and went to bed. At 11:11 AM I woke it up and it was 84%. Checked taskiller to make sure everything was off and just watched the phone. Only things running were the clock widget, battery life and background light set to low.

11:29 79%

11:40 70%

11:47 68%

11:49 67%

11:54 63%

11:57 60%

11:58 58%

12:00 55%

12:02 52%

12:07 50%

12:00 48%

Put the phone to sleep and went outside for a three hours and when I came back the phone was dead. Charged to 100% did a few things with it and thought to watch it again. Checked taskkiller same 2 widgets running

10:57 84%

10:59 80%

11:00 78%

11:01 77%

11:02 76%

11:10 69%

literlly watching the power drain away

Flashing to 3.9.4 hope that is better
[G1 Android Development] roxthiaguin:
I see..

I think I just got confused lol

Will 2000000 (with 6 zeros) mess with something on my phone?
[G1 Android Development] uwonsum:
Interesting, I notice the previous kernels were using, 200000, but 3.9.1/3.9.2 used 2000000 if am not mistaking. I am using 2000000 and it seems to be fine.
[G1 Android Development] beast.in.black:
I'll help with this, though I suffer from the same malady as you: don't know much about the platform itself, but am tolerably familiar with linux scripting/programming.
[G1 Android Development] devsk:
cyanogen: any chance you messed up a bit...:D The value that I got without any changes on my part was 2000000 (2Million = 2seconds). It was 20000 (2*10^4) earlier and you wanted it to be 200000 (2*10^5) but I think you added one zero too many.
[G1 Android Development] Paul22000:
Just to re-iterate what I said a few pages back, I've read that leaving it in 528/528 actually yields better battery life, because the transitions are what kills the battery.

How's this transitions table? :D

Until we hear otherwise, I'm sticking with the "528/528 gives the best battery life" theory.

Cyanogen, any thoughts on this?
[G1 Android Development] roxthiaguin:
Sorry if Im annoying (and sorry for my bad english =P)

I was looking at setCPU now and did the changes there to observe

I set the min128 and max 524

then, changed the sampling rate to 200000 (5 zeros)

it stayed always on 524! always on max

Then I canged to 2000000 (6 zeros)

I saw it went to 128...When I put it to refresh a lot, It requires more power and then it went to 524...but when I stopped doing that, it went to 128 again

but with (5 zeros) it stayed always on 524 :eek:
[G1 Android Development] Nedlinin:
Flashed from 3.9.1 to 3.9.3 then to 3.9.4 and my sampling_rate is currently 200000.

Seems something is a bit awkward with your sampling rate..
[G1 Android Development] devsk:
Are you sure your userinit.sh is not changing it?
[G1 Android Development] uwonsum:
This only thing I can add to this is, that, I did some research and it seems 200000 should be the right number, but 2000000 is working great.

And to even complicate things even more, here is a conversation from #android

<jsharkey>	oh you mean on a phone? my sapphire says 20000 i thought you meant desktop
[G1 Android Development] ei8htohms:
it's time for FULL disclosure

I've been reading this thread with great interest and I'm confident some tweaks can be found to optimize power consumption. The idea of a standardized "battery bashing and logging" app/test seems the best way to go, and if it could be run on a variety of different ROMs it would probably yield some useful comparisons. It would have to do a lot of different battery draining chores and also spend some idle time to give a good idea of how the ROM handles down time and transitions to background processes from idle states.

Remaining post/question moved to this thread:

http://xdaforums.com/showthread.php?p=4250435#post4250435
[G1 Android Development] uwonsum:
edit/use the code option, makes things easier to read in my opinion.
[G1 Android Development] Nedlinin:
I am positive - The only thing my userinit.sh currently does is link the media folders and setup compcache
[G1 Android Development] isikh:
Are you guys saying, if one uses setcpu and makes the min 528 and the max 528, they will get better battery life?
[G1 Android Development] uwonsum:
This is not the place to discuss some of these topics...try this thread, just so we keep things on topic.
[G1 Android Development] cyanogen:
I just ported the new "fuel gauge" from Donut over, maybe it will help :)
[G1 Android Development] G1-evolve:
whats that?
[G1 Android Development] roxthiaguin:
It`s just driving me crazy!

I promisse it`s the last time I`ll bring this question here =P

Just wanted to know what is better

200000

2000000

for sampling rate! What would be better for battery?

I thought the 6zeros one would be better cause it makes the cpu not staying at the top all the time. , but, when our friend there said it`s better make it runs all the time at 524 it just drive me crazy!

How can an all-time-overclock be better for battery instead of it only gets high when it`s requested? :eek: I need to review my points of view D:
[G1 Android Development] cyanogen:
Fuel gauge screenshots..
[G1 Android Development] cyanogen:
Something we are learning about Android is that a lot of tricks and optimizations that we'd use on a desktop or server just don't apply at all.
[G1 Android Development] shotad:
omg this looks incredible! :D:D:eek::eek::eek::eek:
[G1 Android Development] uwonsum:
This is why the government does not let the public know about aliens...maybe we should not have been notified about this:D

You stole my reaction.
[G1 Android Development] G1-evolve:
How can I get to that? What is its purpose?
[G1 Android Development] cyanogen:
It will be in 3.9.5. It tells you very detailed information about battery and network usage.
[G1 Android Development] Coreburner:
I think your confusing cpu frequency with CPU load. mine is maxed at 528 with setcpu, but the back light is set to 1 minute wifi and gps always on, ill pull 5 days easy ( i have a ginormous 3500 mah battery) between charges.
[G1 Android Development] cyanogen:
Something I just want to mention..

When you talk about "force close", there are two different dialogs you will see for this..

One is a crash, and there is no option to wait. This means that an application threw an exception and crashed. To debug this, the output of logcat is needed.

The other is "application not responding" or ANR. This is not a "force close", it just means that the system is bogging down. This either indicates that something is using a lot of cpu time or behaving badly. It also happens sometimes when you first boot the system because of all the services starting up.

It's important to note what kind of "FC" you got when posting a bug report. The first kind (a crash) is what I really care about.
[G1 Android Development] roxthiaguin:
5 days to get another charge? oO`

It`s cause I live in Brazil, so, it`s hard to get another battery here

I`ve heard that there is a lot of better batteries for g1 than the original one

can you give me a link to one, that I can import to here?
[G1 Android Development] devsk:
As freaky as it may sound, it looks like the CPU state transitions are destroying the battery. I have been playing with my phone last half hour with 528 min/max (no transitions) and meter went from 100% (I powered off, charged till green and booted) to 97%. The test bed was same: play around with settings menus/gmail/market/where etc. and then the 10 minutes of teeters. It looks like I am staying with 528/528 and I will watch for few hours.
[G1 Android Development] cyanogen:
Something that might be of interest.. The new phones are clocked at 384/528 by default. The smaller jump might be a good compromise.
[G1 Android Development] chevycowboyusa:
Odd battery indication

I dont know if this will help.

I had my phone on charge (a/c) and unplugged it @ 100%. I made a few calls, went on facebook and XDA on 2g. for a few minutes. I read the battery issues on the thread, so I installed battery graph. I had an average drain from 12:30 this noon until 8:40pm where it had drained down to 41%. after i installed battery graph i put the phone away for a few minutes. when i went back to battery graph it said it had 87% battery left. hadn't played with it much more and now its @66% @ 12:32am (while im typing now). i have never had it last this long!

i have overclock widget set for 128k min and max for screen off and 384 min/max screen on.

theres my 2 cents...

Great job Cyan!
[G1 Android Development] voxluna:
FWIW I've been moving my ringtones/alarms/notifications all to /system/media/audio/[folder] for quite some time -- ever since I got root. But not because of speed, it's so they don't show up in TuneWiki, Meridian, whatever.

Unfortunately, every time I flash a new version of CM, those folders get overwritten with a single example file. (And before someone points me to audio-resources.zip, yes I know. :p)
[G1 Android Development] cidica:
@cyan,

Any reason the new modded phone.apk file still viberates even when it's not selected to do so? All incoming calls and when I hang up the call it still does it even though it's not selected.
[G1 Android Development] Coreburner:
try amazon.com my friends all are using mugen 2400mah and they talk useing blue tooth headsets on confernce calls all day some use a voip client so there wifi on all day. all runing Cyan last stable build. mine was made by a buddy who builds batteries for night vision goggles. the power curve on the stock battery is a joke.
[G1 Android Development] yrrebnarg:
For what it's worth, there's also a surprising effect you see in architectures that sleep very efficiently. A race at 528MHz to a sleep state sometimes uses less power than doing the same work at 128MHz. I have no idea how the MSM7k chips perform at various clock speeds, but it wouldn't surprise me if it's just that it spends more time idle when the processor is pegged at max speed for the entire time. How does battery life compare when running a fixed clock at 128 or 384? The results might be surprising.

edit: my own battery pain on this build was caused by a runaway com.android.calendar, which was using 100% CPU for an hour after I deleted a recurring event through the google calendar web page. I have no idea if it's been happening for anyone else, but it's worth paying attention to.
[G1 Android Development] roxthiaguin:
Oh yeah man!

very very thanks!

They can ship that battery to me =P

I can`t buy a lot of things from amazon. I would be very happy if I could =P

Tech things here in Brazil are so much expensive! Because of the tax and things

I just need to get some money and I`ll buy as soon as possible!
[G1 Android Development] devsk:
That would make this already thick phone even more thicker. I would just get another G1 battery for backup purposes when you travel etc.
[G1 Android Development] userfriendlyme:
Well if you just put them on your memory card and leave them in there folders, Ringtones, Notifications and alarms...it will have the same effect as moving them to the /system folder. Also your notifications and tones wont show up when your playing your music player. It beats having to redo it everytime you flash and works exactly the same. also pulls up in the right list when selecting alarms, notification and so on. Just and fyi.
[G1 Android Development] Kainous:
The force close I get with HTC IME is the one without the option to wait.

I've had that ever since 3.9.3

It pops up but whenever I push a button on it it will force close. I tried QWERTY, Compact QWERTY, and phone keypad.

Happened with them all.
[G1 Android Development] lordsaibat:
Wifi

Anyone noticing that their wifi does not auto associate with the network when you come back into range?
[G1 Android Development] chevycowboyusa:
no problem with wifi

I haven't had a problem with it. I walk in and out of range @ work and it picks em up every time!
[G1 Android Development] dumfuq:
Yep have for a while, but so has my roomate who runs stock unrooted. If you open up wifi settings it usually connects.
[G1 Android Development] shotad:
I noticed the battery life improved a lot on this update...and I'm not too sure, but I think it does charge hell of a lot faster!
[G1 Android Development] igashu:
The only problem with that is that they won't work when your FAT partition is mounted via USB as it becomes unavailable to the phone. I ended up just tarring up all of my 'added' stuff to /system with a directory structure, dropping the tarball on my sdcard, and then using Rogro's Gscript app to make a script to remount /system rw, and then untar everything into it. At least now it's just one click every time I reflash.