• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [ROM] CM7 TG-Reloaded (Final: 03-25)

Like some others on this thread, I've been struggling with bad battery life using either Whyzor's CM7 TG-Reloaded or his separate kernels (flashed over Tickerguy's 11-19 build). I had the same problem with TheOCv1.5-wip-2 and TheOCv1.6.14 kernels. Untouched, the phone's battery would lose 15-20% an hour. With TheOCv1.1-wip-1, the phone would lose 4-6% an hour while idling.

In an attempt to balance battery life and performance I had the Min-Max frequency spread set to 122-1400 MHz and undervolted using Mantera's "aggressive" undervolting table.

The system was completely stable with TheOCv1.1-wip-1 and the above-listed overclock/undervolt scheme. I thought I was stuck on TheOCv1.1-wip-1 kernel for the long haul but decided to give WhyKernel-01-18 one last try. Once again the battery drain problem reared its head. I tried changing the governor but no luck. I was ready to go back to the working TheOCv1.1-wip-1 kernel when I decided to try the "less aggressive" volting levels listed in Mantera's post. Bingo! With the phone idling I was now getting 2-3% battery drain over an hour.

So the lesson I learned is be careful with pushing undervolting too low. Even if your system is completely stable, it could result in the exact opposite of your intended outcome--unexpected battery drain. I guess the only mystery that remains is why TheOCv1.1-wip-1 didn't suffer the same high battery drain when "aggressively" undervolted. Hope this explanation helps others experiencing bad battery life.

Finally, a big thanks to Whyzor for your great work. It is much appreciated.
 
Like some others on this thread, I've been struggling with bad battery life using either Whyzor's CM7 TG-Reloaded or his separate kernels (flashed over Tickerguy's 11-19 build). I had the same problem with TheOCv1.5-wip-2 and TheOCv1.6.14 kernels. Untouched, the phone's battery would lose 15-20% an hour. With TheOCv1.1-wip-1, the phone would lose 4-6% an hour while idling.

In an attempt to balance battery life and performance I had the Min-Max frequency spread set to 122-1400 MHz and undervolted using Mantera's "aggressive" undervolting table.

The system was completely stable with TheOCv1.1-wip-1 and the above-listed overclock/undervolt scheme. I thought I was stuck on TheOCv1.1-wip-1 kernel for the long haul but decided to give WhyKernel-01-18 one last try. Once again the battery drain problem reared its head. I tried changing the governor but no luck. I was ready to go back to the working TheOCv1.1-wip-1 kernel when I decided to try the "less aggressive" volting levels listed in Mantera's post. Bingo! With the phone idling I was now getting 2-3% battery drain over an hour.

So the lesson I learned is be careful with pushing undervolting too low. Even if your system is completely stable, it could result in the exact opposite of your intended outcome--unexpected battery drain. I guess the only mystery that remains is why TheOCv1.1-wip-1 didn't suffer the same high battery drain when "aggressively" undervolted. Hope this explanation helps others experiencing bad battery life.

Finally, a big thanks to Whyzor for your great work. It is much appreciated.


I would say that 2-3% is still kinda high. With just 3G on, I normally get better battery life than that. I wonder if you have some stuff running in the backround that's syncing. Maybe facebook or email?

Also, I have noticed that overly low voltages seem to run the phone hot. I think when the settings are read, they get misinterpreted. Like it loops around, or something? I need to test more.
 
Whyzor, just out of curiosity, what exactly is the MMC wakelock? Maybe if I know more about it I could possibly narrow down what reproduces it? I'm still getting it with the 1/18 kernel. At some point when I feel like redoing everything, I'll try a clean install. Maybe something just got stuck from an earlier build and hasn't been cleared out since I haven't done a clean install in quite a while.
 
Whyzor, just out of curiosity, what exactly is the MMC wakelock? Maybe if I know more about it I could possibly narrow down what reproduces it? I'm still getting it with the 1/18 kernel. At some point when I feel like redoing everything, I'll try a clean install. Maybe something just got stuck from an earlier build and hasn't been cleared out since I haven't done a clean install in quite a while.

Every wake_lock() call inside the kernel has an ID, "MMC wakelock" is just a term I came up with here to describe one of the wakelocks that is held inside the drivers/mmc/host/msm_sdcc.c file.

The two suspiscious ones are sdio_suspend_wlock & sdio_wlock related to sdcard(multi-media-card) access. My fixes makes sure the first is freed. The other one is supposed to time out, but if I try to free it intentionally, the system is unable to boot. So it's possible that the sdio_wlock still needs to be unlocked somewhere, but my theory is that the problem is fixed with just clearing the sdio_suspend_wlock since I haven't been able to reproduce it ever since the 01-07 build, and since you're the only one reporting it, I'm guessing there's some weird fluke with your phone/flashing history.

Until I can reproduce (or others report the same problem still exists) I'm not going to spend more time trying to hunt down the problem any further.
 
Hey guys, just wanted to say ty to whyzor for all the work and loving this cm7 so far and credit goes to TG also and was bummed when he decided to leave :/ So ty for all the work and when i can get over 23hrs of life from this phone with normal use and even data on...im in heaven cuz most i got before on TGs was around 12ish or so, so kudos to u man.

Now onto the question portion lol. Ive seen alot of ppl talking bout undervolting and read and view other articles on the triumph but everyone i find and read, i cant find where the values are that need to be inputed. I found one a earlier poster talked about using but when i go into increcontrol and look on sites for values listed, alot of the ones listed are not on the phone and not sure which to put in phone. So question is, where is a link to the values that increase battery life ( not like i need but still ) that is accurate to this cm7 build and not based off something that this phone doesnt have or maybe im just totally missing something. Any info be great and again, ty for the work u do when u dont have too, i am muchly thankful for it :)
 
.
Every wake_lock() call inside the kernel has an ID, "MMC wakelock" is just a term I came up with here to describe one of the wakelocks that is held inside the drivers/mmc/host/msm_sdcc.c file.

The two suspiscious ones are sdio_suspend_wlock & sdio_wlock related to sdcard(multi-media-card) access. My fixes makes sure the first is freed. The other one is supposed to time out, but if I try to free it intentionally, the system is unable to boot. So it's possible that the sdio_wlock still needs to be unlocked somewhere, but my theory is that the problem is fixed with just clearing the sdio_suspend_wlock since I haven't been able to reproduce it ever since the 01-07 build, and since you're the only one reporting it, I'm guessing there's some weird fluke with your phone/flashing history.

Until I can reproduce (or others report the same problem still exists) I'm not going to spend more time trying to hunt down the problem any further.
I've seen several people reporting battery drain ominously similar to what I get when I get the wakelock, but I doubt that many besides myself constantly check CPU spy and betterbatterystats throughout the day (not that I'm doubting you). Is that something I can mess with or does that require digging into the code (which I know nothing about)? If it's related to the sd card, is there any chance it could be the card itself?
 
. I've seen several people reporting battery drain ominously similar to what I get when I get the wakelock, but I doubt that many besides myself constantly check CPU spy and betterbatterystats throughout the day (not that I'm doubting you). Is that something I can mess with or does that require digging into the code (which I know nothing about)? If it's related to the sd card, is there any chance it could be the card itself?

I suspected that the SD card may be the issue, since mmc{0,1,2} are associated with the SD card reader system. I removed the card and rebooted, but the wifi wakelock bug still bites me (unable to deep sleep after wifi is toggled).
 
Anyone running with 3g on all the time and having background data syncing, i.e. facebook, gtalk, gmail? I'm not able to get more than 7 hours a charge this way. The way I see it, these "should" be on for a "proper" smartphone setup. If I kill all data and reboot, I get great battery life obviously. Since I have 4 batteries, I just juggle batteries all day long and plug in whenever possible.

By contrast, my friend uses his phone in a very similar fashion: g2x running cm7 with gtalk, gmail, facebook, words with friends running in the background. Uses his phone a LOT more than I do, and he charges every 2-3 days. Of course, we're talking AMOLED screen, and for sure the triumph eats battery with the screen on, but even if I don't touch it, I still only get 7 hours. Currently, I'm doing a test. Wiped system, data, cache, installed cm7, gapps+gtalk and facebook. Set up gmail, gtalk, facebook. Didn't install or configure anything else. Didn't even power up the screen. Lasted 8 hours before it died.

Current iteration, I haven't touch voltages or clocks either. Contemplating getting betterbatterystats, but don't know what that'd tell me except maybe killing data syncing for certain apps, which I'd rather not do. I want to be able to get IMs in real time.
 
Anyone running with 3g on all the time and having background data syncing, i.e. facebook, gtalk, gmail? I'm not able to get more than 7 hours a charge this way. The way I see it, these "should" be on for a "proper" smartphone setup. If I kill all data and reboot, I get great battery life obviously. Since I have 4 batteries, I just juggle batteries all day long and plug in whenever possible.

By contrast, my friend uses his phone in a very similar fashion: g2x running cm7 with gtalk, gmail, facebook, words with friends running in the background. Uses his phone a LOT more than I do, and he charges every 2-3 days. Of course, we're talking AMOLED screen, and for sure the triumph eats battery with the screen on, but even if I don't touch it, I still only get 7 hours. Currently, I'm doing a test. Wiped system, data, cache, installed cm7, gapps+gtalk and facebook. Set up gmail, gtalk, facebook. Didn't install or configure anything else. Didn't even power up the screen. Lasted 8 hours before it died.

Current iteration, I haven't touch voltages or clocks either. Contemplating getting betterbatterystats, but don't know what that'd tell me except maybe killing data syncing for certain apps, which I'd rather not do. I want to be able to get IMs in real time.

When I'm at work I don't hav a lot of time for my phone. So for me, I only sync when i'm about to use it. I open my mail, it's syncs then. I don't need to hear that I have a new email every few minutes. That's my way of saving my battery. I get a FULL day out of my phone. That's all I need. If I used face book, I would run it the same way. Sync when I have time.

Personally I think it's funny to see my coworkers plugging in thier phones all of the time. Some work on computers, it makes more sense for them. I go on test drives,or need to carry the data with me as I work. I can't be teathered to a plug.

On that note, Thank you to Whyzor and TG. For you two especially have made the battery life the priority. I wish I could contribute more skill to the cause, but I couldn't even get "hello world" to work.:eek:
 
Whyzor:

Do you know what specific tweaks tickerguy made so that wifi stayed on after the screen turned off? I suspect that may be the cause of my mmc wakelock woes, but I can't find anything of substance in his ROM thread.
 
Now onto the question portion lol. Ive seen alot of ppl talking bout undervolting and read and view other articles on the triumph but everyone i find and read, i cant find where the values are that need to be inputed. I found one a earlier poster talked about using but when i go into increcontrol and look on sites for values listed, alot of the ones listed are not on the phone and not sure which to put in phone. So question is, where is a link to the values that increase battery life ( not like i need but still ) that is accurate to this cm7 build and not based off something that this phone doesnt have or maybe im just totally missing something. Any info be great and again, ty for the work u do when u dont have too, i am muchly thankful for it :)

Using incredicontrol, you can lower the voltages for certain frequencies. Every phone is different, and will be able to handle a certain min voltage before it becomes unstable (reboots, freezes, or corrupts data). So you'd have to do a lot of trial and error if want to go this route.

. I've seen several people reporting battery drain ominously similar to what I get when I get the wakelock, but I doubt that many besides myself constantly check CPU spy and betterbatterystats throughout the day (not that I'm doubting you). Is that something I can mess with or does that require digging into the code (which I know nothing about)? If it's related to the sd card, is there any chance it could be the card itself?

I've posted the link to betterbatterystats in the OP in the hopes of others reproducing the problem and confirm it's MMC wakelocks. But nobody else has, I'm guessing they either don't bother with the extra work or find out it's some app that's draining the battery.

Anyone running with 3g on all the time and having background data syncing, i.e. facebook, gtalk, gmail? I'm not able to get more than 7 hours a charge this way. The way I see it, these "should" be on for a "proper" smartphone setup. If I kill all data and reboot, I get great battery life obviously. Since I have 4 batteries, I just juggle batteries all day long and plug in whenever possible.

Current iteration, I haven't touch voltages or clocks either. Contemplating getting betterbatterystats, but don't know what that'd tell me except maybe killing data syncing for certain apps, which I'd rather not do. I want to be able to get IMs in real time.

Get the BetteryBatterStats app from OP link (it's free if you go through xda-dev thread). It'll give you more detailed info about which app/process drains the battery. Your drain is higher than a wakelock. I'm guessing it is one of the apps that keeps synching to the network. Different phones work differently internally, and your friends settings may "seem similar" to yours, his phone's software and app settings could be very different. There are also different methods of synching to apps, some use polling methods, others can use more efficient methods.
 
Whyzor:

Do you know what specific tweaks tickerguy made so that wifi stayed on after the screen turned off? I suspect that may be the cause of my mmc wakelock woes, but I can't find anything of substance in his ROM thread.

I remember reading his comments about putting intentional wakelocks for when wifi is loaded in order to prevent it from disconnecting when screen turns off. It's a workaround for another bug. I see in the source code where he has them in there. It's probably the same reason why BT disconnects after a while too until my recent fix (they share the same BCM4329 chip).
 
I suspected that the SD card may be the issue, since mmc{0,1,2} are associated with the SD card reader system. I removed the card and rebooted, but the wifi wakelock bug still bites me (unable to deep sleep after wifi is toggled).
I'm pretty sure the MMC wakelock is different from the wifi wakelock. The wifi wakelock isn't necessarily a bug per a, just the workaround TG used (as Whyzor pointed out). So you can confirm you're getting the MMC wakelock as well? I haven't been able to pinpoint what's causing it, and whyzor hasn't been able to reproduce it, do until one of those two things occurs, we're screwed lol. I'm starting to get into the habit of rebooting every few hours because of it.





Anyone running with 3g on all the time and having background data syncing, i.e. facebook, gtalk, gmail? I'm not able to get more than 7 hours a charge this way. The way I see it, these "should" be on for a "proper" smartphone setup. If I kill all data and reboot, I get great battery life obviously. Since I have 4 batteries, I just juggle batteries all day long and plug in whenever possible.

By contrast, my friend uses his phone in a very similar fashion: g2x running cm7 with gtalk, gmail, facebook, words with friends running in the background. Uses his phone a LOT more than I do, and he charges every 2-3 days. Of course, we're talking AMOLED screen, and for sure the triumph eats battery with the screen on, but even if I don't touch it, I still only get 7 hours. Currently, I'm doing a test. Wiped system, data, cache, installed cm7, gapps+gtalk and facebook. Set up gmail, gtalk, facebook. Didn't install or configure anything else. Didn't even power up the screen. Lasted 8 hours before it died.

Current iteration, I haven't touch voltages or clocks either. Contemplating getting betterbatterystats, but don't know what that'd tell me except maybe killing data syncing for certain apps, which I'd rather not do. I want to be able to get IMs in real time.
What kind of signal strength do you get? I get below average to bad signal most anywhere I am, so if I keep 3G on at all times, it drains as fast as wifi does, or worse, and I've even tried juicedefender set to 15 minutes and that still drains it pretty badly. That may not be what it is, but you might wanna ask your friend what kind of signal he gets.
 
Well the problem is though like i lowered all the voltages to 600 which is the lowest i believe and phone stays on and never reboots or seems unstable but it does seem to get warmer even when its cool which i dont like really but if i reset to default voltages the temps seem to be normal. I just dont know whats the right voltages for each setting like 61-1024, if anyone has settings they can share or if u know which are best over all whyzor. like i said i read few links and guides but the ones listed dont match up to whats on the triumph and i think its cuz its for a different type of rom or something but ya.
 
Well the problem is though like i lowered all the voltages to 600 which is the lowest i believe and phone stays on and never reboots or seems unstable but it does seem to get warmer even when its cool which i dont like really but if i reset to default voltages the temps seem to be normal. I just dont know whats the right voltages for each setting like 61-1024, if anyone has settings they can share or if u know which are best over all whyzor. like i said i read few links and guides but the ones listed dont match up to whats on the triumph and i think its cuz its for a different type of rom or something but ya.
mantera has an undervolting table here, which is a good starting point: http://androidforums.com/showthread.php?t=441417
There's also another thread here that might have some helpful info: http://androidforums.com/showthread.php?t=480169
 
I'm pretty sure the MMC wakelock is different from the wifi wakelock. The wifi wakelock isn't necessarily a bug per a, just the workaround TG used (as Whyzor pointed out). So you can confirm you're getting the MMC wakelock as well? I haven't been able to pinpoint what's causing it, and whyzor hasn't been able to reproduce it, do until one of those two things occurs, we're screwed lol. I'm starting to get into the habit of rebooting every few hours because of it.

Perhaps I'm using the terms incorrectly. After I use wi-fi (and even after I disable it), the mmc0, mmc1 and mmc2 wakelock remain indefinitely on my phone. Via BetterBatteryStats, I see that they all have the same total time, which suggests that they were created simultaneously and never removed.

The only way I can get the phone to go into zombie mode (no deep sleep) is by activating wi-fi, no other app causes it.

As a test, I removed the wakelocks in adb like so
Code:
echo "mmc0" > /sys/power/wake_unlock
echo "mmc1" > /sys/power/wake_unlock
echo "mmc2" > /sys/power/wake_unlock
and then the phone can go back into deep sleep. Until I use wi-fi again, of course!

Since the system uses WPA, I'm thinking of creating a cron script to clear the mmc wakelocks every 15 minutes if the wireless isn't in use.
 
mantera has an undervolting table here, which is a good starting point: [KERNEL] TheOC v1.6.14 kernel for MT Isaac & TG based CM7 - Android Forums
There's also another thread here that might have some helpful info: Efficacy of undervolting - Android Forums


ya thats the one im talking bout, the first link. on the less aggresive settings, there is no setting for 245 so idk if that means to leave as default or what and there is no 188 on my phone so what does that mean exactly to do lol?
 
Perhaps I'm using the terms incorrectly. After I use wi-fi (and even after I disable it), the mmc0, mmc1 and mmc2 wakelock remain indefinitely on my phone. Via BetterBatteryStats, I see that they all have the same total time, which suggests that they were created simultaneously and never removed.

The only way I can get the phone to go into zombie mode (no deep sleep) is by activating wi-fi, no other app causes it.

As a test, I removed the wakelocks in adb like so
Code:
echo "mmc0" > /sys/power/wake_unlock
echo "mmc1" > /sys/power/wake_unlock
echo "mmc2" > /sys/power/wake_unlock
and then the phone can go back into deep sleep. Until I use wi-fi again, of course!

Since the system uses WPA, I'm thinking of creating a cron script to clear the mmc wakelocks every 15 minutes if the wireless isn't in use.

Hmm, that's an interesting solution. It may be more effective than what I'm trying to do inside the source code to fix it. It could even be used as a general way to unlock any wakelocks periodically. Anyway I definitely don't notice the extra wakelocks after toggling wifi on my phone.

By the way new 01-21 build is up. It just has the changes I mentioned already in the thread earlier with some extra cleanup for the touchscreen driver. If you want to just flash the newer kernel, it's available here.
 
Hmm, that's an interesting solution. It may be more effective than what I'm trying to do inside the source code to fix it. It could even be used as a general way to unlock any wakelocks periodically. Anyway I definitely don't notice the extra wakelocks after toggling wifi on my phone.

By the way new 01-21 build is up. It just has the changes I mentioned already in the thread earlier with some extra cleanup for the touchscreen driver. If you want to just flash the newer kernel, it's available here.

Thanks for the new build Whyzor, I'm going to flash it and continue my experimentation with wakelocks. I'll make a nandroid backup and see if I can reproduce it on an app-less CM7, just to be thorough.
 
I.
Perhaps I'm using the terms incorrectly. After I use wi-fi (and even after I disable it), the mmc0, mmc1 and mmc2 wakelock remain indefinitely on my phone. Via BetterBatteryStats, I see that they all have the same total time, which suggests that they were created simultaneously and never removed.

The only way I can get the phone to go into zombie mode (no deep sleep) is by activating wi-fi, no other app causes it.

As a test, I removed the wakelocks in adb like so
Code:
echo "mmc0" > /sys/power/wake_unlock
echo "mmc1" > /sys/power/wake_unlock
echo "mmc2" > /sys/power/wake_unlock
and then the phone can go back into deep sleep. Until I use wi-fi again, of course!

Since the system uses WPA, I'm thinking of creating a cron script to clear the mmc wakelocks every 15 minutes if the wireless isn't in use.
That's interesting. I'll do some more testing, but I haven't found any correlation between wifi and the MMC wakelock. It just seems to be completely random. But if you do make that script, if you don't mind posting it, I'd appreciate it.

Edit: So this is interesting. I rebooted to clear the wakelocks, and then when I activated wifi, the mmc wakelock started. Then when I disabled wifi, the wakelock stopped. I reproduced this several times. I do know there have been times where the wakelock was running with wifi disabled, so obviously something at some point is causing the wakelock to stick despite disabling wifi. I'll have to look into this some more.
 
Well the problem is though like i lowered all the voltages to 600 which is the lowest i believe and phone stays on and never reboots or seems unstable but it does seem to get warmer even when its cool which i dont like really but if i reset to default voltages the temps seem to be normal. I just dont know whats the right voltages for each setting like 61-1024, if anyone has settings they can share or if u know which are best over all whyzor. like i said i read few links and guides but the ones listed dont match up to whats on the triumph and i think its cuz its for a different type of rom or something but ya.

I did a bunch of undervolt testing and I got the following semi-stable values for my device:

Code:
61440:      750
122880:      750
245760:      875
576000:      925
768000:      925
1024000:     1000
1113000:     1050
1209600:     1100
1305600:     1150
1401600:     1200
I found that 750 was an absolute minimum for voltage at the lower levels. Dropping to 725 or below resulted in a kernel error in the "OS Monitor" app about being unable to set the voltage. I imagine that <750 simply resets to default voltage, which is why everyone can run at 600 without issue (because it's really just the stock voltage).
 
I did a bunch of undervolt testing and I got the following semi-stable values for my device:

Code:
61440:      750
122880:      750
245760:      875
576000:      925
768000:      925
1024000:     1000
1113000:     1050
1209600:     1100
1305600:     1150
1401600:     1200
I found that 750 was an absolute minimum for voltage at the lower levels. Dropping to 725 or below resulted in a kernel error in the "OS Monitor" app about being unable to set the voltage. I imagine that <750 simply resets to default voltage, which is why everyone can run at 600 without issue (because it's really just the stock voltage).

Alright ill give that a try, appreciate the info man ^^ ty
 
New kernal is working great for me I also updated prl 1115 it seems that my speed of increased just a little bit

Sent from my Triumph using Tapatalk
 

Attachments

  • uploadfromtaptalk1327131615446.jpg
    uploadfromtaptalk1327131615446.jpg
    23.4 KB · Views: 104
New kernal is working great for me I also updated prl 1115 it seems that my speed of increased just a little bit

Sent from my Triumph using Tapatalk

Just for kicks, I ran the speedtest also on default VM PRL, got 157 ping, 2 MBbps down, 673 kbps up. and another run gave 144 ping, 1.5 Mbps down, 637 kbps up. Keep in mind this is very late at night when most people are asleep. I think the speed varies throughout the day depending on how loaded VM's network is. I've gotten as low as 30 kbps down during business hours at work. PRL switching doesn't do anything, it's for Sprint roaming, and VM doesn't allow roaming.
 
Back
Top Bottom