[TESTING] SCBS: Improved battery meter system
Intro:
Hopefully this stuff will fix your battery woes once and for all. You will need to download and install 4 files. Kernel, modules, rootfs, and an APK. The kernel is an up to date Wistilt2 esque contraption that should support camera and all the latest goodies but no bluetooth support as that seems to interact badly with this setup. Edit: Now that Wistilt2's kernel pack includes SCBS support you can choose to use his kernel pack. In that case only download the rootfs and BABS.apk. You do not need the kernel or modules. Instructions: 1. Download the 4 files from the links at the bottom on this post. 2. Copy zImage, modules******.tar.gz, and rootfs.img to the andboot folder of your sd card. 3. Edit STARTUP.TXT and make sure pm.sleep_mode=1 is in there. 4. Boot android 5. Use whatever method you like to install BABS.apk. I use "adb install BABS.apk" from the command line. 6. While should notice improvements right away, SCBS will need to generate a model of your particular battery for maximum correctness. Charge your phone all the way up, and then discharge it to at least 20% with a mixture of sleep and heavy use. Then charge it up again. The more varied use and charge your log has, over a wider range of charge, the better the model will turn out. Edit: I believe that you will need many hours of sleep, not necessarily all at once for it to work right. Say 8 for now. 7. Open up the Ba Tree App, go to analyze logs. Select the file that represents your charge/discharge data from step 6. If you have not rebooted, this will simply be SCBS.log. 8. Select analyze now. This will use lots of power so have it plugged in, and it won't process while sleeping, so either wake it up periodically until its done, or set the timer. When the process is completed it will show you the model on the screen and ask if you would like to use it. This is an example from my phone: cc=0.278898 cb=145.042435 rc=0.663357 re=0.150437 vf=1.098000 cf=0.312500 lr=0.000001 sl=36.714553 se=0.007000 Make sure that your numbers are sort of like this. If they are not, please post your result and log file used to generate it. The result is found in /sdcard/scbs.conf.temp. If you like the model, then hit yes and enjoy your new meter. Comments: There are a couple of constants we are using that just don't appear the same on different models of TP2. Some adjustment of those may be necessary as data is gathered. Credits: Jonpry for lots of stuff. Wistilt2 for writing some early kernel mode drivers and doing lots of testing and log generating. Arrrghhh and rpierce99 for testing and log data. Links: http://www.prymfg.com/kernel/zImage http://www.prymfg.com/kernel/modules...3-dirty.tar.gz http://www.prymfg.com/kernel/rootfs.img http://www.prymfg.com/kernel/BABS.apk |
Re: [TESTING] SCBS: Improved battery meter system
I was hopin this would make it to the outside world soon!
Great job ;). |
Re: [TESTING] SCBS: Improved battery meter system
Thanks!!! Was waiting something like this for a long time. Wow, too many things to test at once. ;)
|
Re: [TESTING] SCBS: Improved battery meter system
Would this only apply to/work with the TP2 or should this also work with the TP?
|
Re: [TESTING] SCBS: Improved battery meter system
Awesome work guys. I'll share my results in a few days!
|
Re: [TESTING] SCBS: Improved battery meter system
It probably can work, but there are at least 2 numbers that have to be calculated for each device. The process for that is pretty straightforward. There is one person trying to get it to work on Topaz right now, and there are some difficulties getting measurements in a suitable format.
I can get you the instructions, but if it doesn't work the first try it probably will involve getting help from one of the kernel devs with a raph. |
Re: [TESTING] SCBS: Improved battery meter system
jonpry, I use a couple batteries so I assume the "model" is learning about a specific battery, correct? So it won't be the same for the two batteries, correct? I'll just use my "newer" battery.
|
Re: [TESTING] SCBS: Improved battery meter system
That's correct ndno. Eventually I want to try and identify the battery that is installed, so you can have a model for each of them.
|
Re: [TESTING] SCBS: Improved battery meter system
+1 on fav thread :cool:
Will check it out and post back if additional instruction is needed |
Jonpry, how many charge/discharge cycles do you recommend to get an accurate model? I'm on my 3rd cycle now since using your files. Should this be run at stock speed or does it not matter? Thanks!
Sent from my FRX06-ized TP2 using Tapatalk |
Re: [TESTING] SCBS: Improved battery meter system
I'm not really sure what it takes to get a good model. That is part of the reason for this thread. But i think 3 cycles is more than I have ever done. You should be good to go. I'll be posting a new rootfs shortly that will be able to generate more accurate models.
|
Re: [TESTING] SCBS: Improved battery meter system
Quote:
The way the model works is the more information it has, the better, so you can generate a model today and then generate a model in 3 weeks and the new one will be better than the old one, assuming you used the logs from the whole available time. The important things are that it got charge and discharge at varying levels of battery, make sure you got your battery fairly low before charging it, at least one time. The speed you use during logging should match the speed you're going to use during use. You are more or less training the app what your battery will do under varying circumstances. |
Re: [TESTING] SCBS: Improved battery meter system
Hmmm... I got the following results after 3 cycles (charged fully under FRX06 OCed at 650mhz, discharged with normally usage: some texting, some voice calls, a lot of browser surfing, some tapatalk, some youtube, a lot of sleeping in between)
cc=0.353938423 cb=115.441281066 rc=0.454638059 re=0.131118549 vf=1.098000000 cf=0312500000 lr=0.000001000 sl=7.535142851 se=0.007000000 Defintely do not resemble anything in the first post. Unfortunately, these values are Latin to me. The most current scbs.log file I have is 803Kb big. I have like 5 other scbs.log files (.1, .2, ..., .6) which I didn't include in the analysis, should I include them also? |
Re: [TESTING] SCBS: Improved battery meter system
Ndno,
Imho those numbers are great. Use them and let us know how it goes. |
Re: [TESTING] SCBS: Improved battery meter system
Quote:
BTW, I like how you have this in the first post :mrgreen: Deservingly so ;) Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
Ndno,
Unfortunately the winmo battery meter is not terribly accurate. Wistilt2 has been doing lots of "reboot to winmo" experiments anyway, and he says it is consistently within 1%. The things that make this a lot better are that: 1. Plugging in the charger won't cause the level to jump 60% 2. 100% should actually be fully charged. 3. zero, its well empty. 4. Heavily loading the phone won't cause a dip of 10% 5. Putting the phone in sleep doesn't make it apparently charge 6. Thing should be fairly linear. If your charge only goes up to 98% or so, let me know, there is fix for that. |
Re: [TESTING] SCBS: Improved battery meter system
What's the likelyhood of you being able to cordinate with F22/WisTilt to push the required changes to run the apk with the latest development kernel bits/rootfs? I'd imagine that you need both to read the values off battery, and shouldn't interfere if not running the apk. That way you get a good base of guin^H^H^H^Husers and we get to keep the new keymaps etc.
-- Starfox |
Re: [TESTING] SCBS: Improved battery meter system
I am working on something with wistilt2 atm. He kind of wants to keep the kernels seperate so that any problems scbs itself can be identified. That being said he is using scbs on his phones and seems to like it. So i'm guessing wistilt2 kernels will be getting scbs added shortly. If F22 wants to integrate my stuff into his rootfs, more power to him.
|
Quote:
Sent from my FRX06-ized TP2 using Tapatalk |
Re: [TESTING] SCBS: Improved battery meter system
Ndno,
Edit /sdcard/scbs.conf and change Vf to 1.103. Then either reboot the phone or "killall -HUP scbs" What model are you running, ie RHOD100 etc? |
Re: [TESTING] SCBS: Improved battery meter system
Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
Analysis finished. Candidate is:
cc=0.171811426 cb=72.369357367 rc=0.452867817 re=0.248552169 vf=1.098000000 cf=0.312500000 lr=0.00000100 sl=0.036095755 se=0.007000000 Looking good so far. Any red flags? |
Loving this kernel with the SCBS feature. My battery meter is so stable; no crazy percentage jumps or dips, especially when I decide to use data a lot, just very steady discharging percentage. Going swap out my new battery (seller said it's OEM but it sucks, more like a cheap generic) with my old one and redo the model again. My old battery is still very good.
By the way, no crashes, SODs, or reboots to WinMo; been running without shutting down Frx06 for over 30 hrs straight with a 3 or 4 charge/discharge cycles. Only con is the slow panel wake; sometimes I have to wait over 5 seconds before it wakes up. Sent from my FRX06-ized TP2 using Tapatalk |
Re: [TESTING] SCBS: Improved battery meter system
Boominsvx,
Cb and Sl look low to me. I have seen lower Cb though. Maybe your battery is old and on the fritz. Maybe you did not discharge/charge the phone far enough? Anyways if it works then it works. The model isn't weird enough to cause the nuclear effect or anything. Sometimes we get like negative Cb, so it will charge when unplugged and discharge when plugged in. :p |
Re: [TESTING] SCBS: Improved battery meter system
I'll give it a good run tomorrow with a full discharge.recharge cycle and see if I just got a short log. Testing to many things I guess. You're right though. This battery is about a year and a half old at least. I can try my other one sunday and compare. Will let you know.
|
Wow, this kernel is so amazingly accurate in terms of the battery meter. I know you said the winmo meter is not really accurate but every time I boot back to winmo, the percentage is just within 2 percentage points if not dead on. I switched back to my old battery and after 3 charge/discharge cycles, here are my new values:
cc=0.192870918 cb=128.659464784 rc=0.766339117 re=0.132407606 vf=1.103000000 cf=0.312500000 lr=0.000001000 sl=9.651638728 se=0.007000000 However, there is one issue with this kernel: I can't get the wifi to work; it keeps saying error. When I switched back to using the 4/4 wiltist2 kernel posted by arrrghhh, wifi works fine. Can I use the wifi module from that kernel with this kernel? Other than that, this kernel is solid. Sent from my FRX06-ized TP2 using Tapatalk |
Re: [TESTING] SCBS: Improved battery meter system
Ndno,
Your new model looks good. There is a new kernel and rootfs.img i have uploaded. Need both at the same time, neither are backwards compatible. It will make some attempt to determine se=. right now it is just at the default. I think this will improve sleep accuracy, se should be within 0 - .008 Did you download the modules .tar.gz from the first post? That will be necessary to get working wifi. If its still not working post a dmesg from when you try to enable wifi. Works on my phone, just a module problem one way or another. |
Quote:
Had a charge lockup this morning. I went to sleep having my phone hooked up to the charger. When I woke up this morning, the led was blinking green but I couldn't get it to wake up; pulled the battery and rebooted to winmo, which showed a 100% charge; booted back to android and it showed a 98% charge. This is with the 1.103 to one of values in sbcs.conf you recommended because my phone would stop charging at the 95-98% range. Sent from my FRX06-ized TP2 using Tapatalk |
Re: [TESTING] SCBS: Improved battery meter system
Quote:
Very weird condition... I wonder if there's some way to have logs going at all times, that rotate when they need to? Probably won't be able to rotate them when they need to... but maybe we can at least get some logging going with the hope that it catches this crap. |
Re: [TESTING] SCBS: Improved battery meter system
I haven't seen this charge lock up thing before. I'll have my phone spend more time on the charger in hopes of catching it.
|
Re: [TESTING] SCBS: Improved battery meter system
Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
Quote:
I'm going to test the wifi now and post the dmesg for you. EDIT: OK, it looks like the kernel you have in the first post has a different "version" than the modules you posted. I ran the "lsmod" command and it shows no modules loaded, meaning the broadcom module for the wifi hardware is not loaded. I did some further investigation: Quote:
I tried to force the wifi hardware load as follows: Quote:
Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
How are you checking that the files are the same as they used to be? Definitely uploaded new stuff. When you run the app it should say scbs version 0.4.a. I will upload a new modules tar shortly and update this post. I thought it would work as long as the git commit was the same id.
|
Quote:
Edit: OK, I have 0.3.d as the version which is old. Is this from the kernel, modules, or rootfs? I will replace the ones on my SD card with the new ones downloaded from the first post. Sent from my FRX06-ized TP2 using Tapatalk Edit2: Ok, my rootfs.img was old so I replaced it and now the version is 0.4.a (the only difference was the scbs binary executable). My zImage and modules I have on my SD card are exactly from the first post; the broadcom module won't load as I stated in my last post, even if I forced it via the insmod command. |
Re: [TESTING] SCBS: Improved battery meter system
I spent like an hour trying to edit the first post and it just won't commit for me. Urgh. Here is a link to the new modules.
http://prymfg.com/kernel/modules-2.6...b-dirty.tar.gz |
Re: [TESTING] SCBS: Improved battery meter system
Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
Ndno,
Do you have any logs generated from the new kernel and 0.4.a combination that you can run an analysis on and tell us the results, specifically the se=. ~Jon |
Re: [TESTING] SCBS: Improved battery meter system
Quote:
|
Re: [TESTING] SCBS: Improved battery meter system
1 Attachment(s)
Jon,
So I had all of yesteday and overnight to gather some more data for the scbs.log(s). Attached is a rar of the 3 scbs*.logs. I tried 3 hours today to run the analysis and it won't stop. At one point, I had it running for 90 minutes and it still didn't finish. Not sure why. :scratch: I was able to do my previous analysis within 30 minutes. So I'm stuck with my previous values (which was obtained 2 days ago with the latest kernel and older SCBS (0.3.d or something like that)). EDIT: Not sure what's going on but my TP2 keeps going to sleep after a couple minutes even when I set the display timeout to 30 minutes (so that I can run the analysis without it going to sleep). Hmmm... something's not right with my phone. |
All times are GMT -4. The time now is 12:03 PM. |
Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com