msm_hsic_host wakelock and battery life

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
been struggling to get some "normal" battery life on my #nexus4 since 4.2.1 and now I heard from everyone about 4.2.2 gives improved battery life but not to me.

is there anyone that can help me with analyzing how I can improve my battery life?

the current 4.2.2 battery life shows no improvement at all comparing to my 4.2.1 battery life (was on MiNCO and Faux 123 kernel with the same kernel setup during 4.2.1)

Current 4.2.2 setup:
PA 3.0+
Faux 123, 07b1 (for 4.2.2), Intellidemand. Eco Mode off, Max1512 Min384, UV-150 across

battery dropped from 100% to 80%
7h50m (while I sleep) on battery on 3G data connection ONLY (screen cap attached, please ignore the subsequent charging time)
2 minutes screen on time
Deep sleep 86% as shown on CPU Spy (screen cap attached)
Partial wakelocks kind of minor as shown on BetterBatteryStat (screen cap attached)
Kernel wakelocks msm_hsic_host wakelock 42m, improved from 4.2.1 (screen cap attached)
Good signal (screen cap attached)
All Syncs on, Google Locations everything off except Location History

This is mainly a test comparing to previous 4.2.1 setup and battery consumption seems no improvement at all from 4.2.1 to now 4.2.2, as opposed to everyone's comment out there.

Anyone care to comment? Why I can't see any decent battery life as compared to 4.2.1? and as compared to users who have the same setup PA+Faux?

After comparing the CPU Spy screenshot (over 50m not sleeping) and Betterbatterystat (Other) screenshot (awake 59m), it seems like most of these wakelock came from msm_hsic_host (42m). Is it true that this msm_hsic_host wakelock will keep the phone awake independent from any app's wakelock? In other words, even if I have nothing installed, the phone will still wake up if I have this msm_hsic_host wakelock?
 

cyberkid2002

Senior Member
Mar 15, 2008
253
19
0
been struggling to get some "normal" battery life on my #nexus4 since 4.2.1 and now I heard from everyone about 4.2.2 gives improved battery life but not to me.

is there anyone that can help me with analyzing how I can improve my battery life?

the current 4.2.2 battery life shows no improvement at all comparing to my 4.2.1 battery life (was on MiNCO and Faux 123 kernel with the same kernel setup during 4.2.1)

Current 4.2.2 setup:
PA 3.0+
Faux 123, 07b1 (for 4.2.2), Intellidemand. Eco Mode off, Max1512 Min384, UV-150 across

battery dropped from 100% to 80%
7h50m (while I sleep) on battery on 3G data connection ONLY (screen cap attached, please ignore the subsequent charging time)
2 minutes screen on time
Deep sleep 86% as shown on CPU Spy (screen cap attached)
Partial wakelocks kind of minor as shown on BetterBatteryStat (screen cap attached)
Kernel wakelocks msm_hsic_host wakelock 42m, improved from 4.2.1 (screen cap attached)
Good signal (screen cap attached)
All Syncs on, Google Locations everything off except Location History

This is mainly a test comparing to previous 4.2.1 setup and battery consumption seems no improvement at all from 4.2.1 to now 4.2.2, as opposed to everyone's comment out there.

Anyone care to comment? Why I can't see any decent battery life as compared to 4.2.1? and as compared to users who have the same setup PA+Faux?

After comparing the CPU Spy screenshot (over 50m not sleeping) and Betterbatterystat (Other) screenshot (awake 59m), it seems like most of these wakelock came from msm_hsic_host (42m). Is it true that this msm_hsic_host wakelock will keep the phone awake independent from any app's wakelock? In other words, even if I have nothing installed, the phone will still wake up if I have this msm_hsic_host wakelock?
Give Harsh's Kernel a try :)
 
  • Like
Reactions: schizophrenia

zouden

Senior Member
Jan 29, 2011
74
14
0
Is it true that this msm_hsic_host wakelock will keep the phone awake independent from any app's wakelock? In other words, even if I have nothing installed, the phone will still wake up if I have this msm_hsic_host wakelock?
Yes, AFAIK it's a bug in the baseband (even with 4.2.2). That wakelock is much reduced when on wifi. My msm_hsic_host is often 20% when on 3G :/
 
  • Like
Reactions: schizophrenia

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
as I said, after trying different roms and kernels, it's come down to almost a conclusion that my bad battery life comes from the darn msm_hsic_host wakelock which prevent my phone from sleeping.

Wifi battery life has been very reasonable.

thanks everyone.
Conclusion is, even if I uninstall all possible culprit apps, as long as I have such msm_hsic_host wakelock going on my phone won't deep sleep
I still haven't got a clue how to remove such wakelock.
 

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
battery drain investigation
did some testings with [email protected]

Test:
- ran both phones (under different carriers, different roms, same kernel) Nexus 4 on 3G data for a certain window of idle time and we both got around 2.4% an hour battery drain.
- we both got minimal app wakelocks (not 0, but negilgible) but our phones were not deep sleeping the whole time. Why? we both got 1/8 to 1/10 time of msm_hsic_host wakelock

preliminary conclusion:
- even if we install minimal amount of apps which do not cause anyway wakelock, the phone won't go 100% deep sleep as long as we have this signal/radio related kernel wakelock msm_hsic_host wakelock. we also do not know how to get rid of it
- unsolvable atm. seems like a radio/kernel issue that no one can fix (region specific?)
- so it was never about rogue apps that caused my battery drain.
 

thracemerin

Senior Member
Oct 19, 2011
5,458
5,764
0
Toronto
The msm_hsic_host wakelock is because the 3G modem is connected to the phone as an external USB device controlled by the hsic host controller. When the modem wakes up for any reason (apps sync, location, tower ping, etc...) the wakelock is requested. The problem is that the hsic host controller doesn't go back into suspend mode properly, this is a problem with the kernel. The result is that because the hsic host controller isn't asleep the phone wont enter deep sleep while it waits for the hsic host to suspend.

There is the additional issue that if your signal is poor the operations that caused the wakelock in the first place take longer to complete thus lengthening the time the wakelock is held.

The issue is significantly reduced on WiFi for obvious reasons, all the data is transmitted via WiFi so the 3G modem doesn't need to wake up nearly as often, it still wakes up to deal with tower checks and that sort of thing to ensure that it has voice connectivity, but those events are much rarer.

There are kernels available that attempt to solve this problem, Harsh kernel as suggested by another user has fixes in it along with a lot of other changes, the fixed kernel I'm working on is stock with these changes as well, either should help, it's not possible to eliminate this wakelock completely without shutting down the 3G modem which would of course prevent data and voice use of the phone, but they will reduce the wakelock and may help with your battery life.
 

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
The msm_hsic_host wakelock is because the 3G modem is connected to the phone as an external USB device controlled by the hsic host controller. When the modem wakes up for any reason (apps sync, location, tower ping, etc...) the wakelock is requested. The problem is that the hsic host controller doesn't go back into suspend mode properly, this is a problem with the kernel. The result is that because the hsic host controller isn't asleep the phone wont enter deep sleep while it waits for the hsic host to suspend.

There is the additional issue that if your signal is poor the operations that caused the wakelock in the first place take longer to complete thus lengthening the time the wakelock is held.

The issue is significantly reduced on WiFi for obvious reasons, all the data is transmitted via WiFi so the 3G modem doesn't need to wake up nearly as often, it still wakes up to deal with tower checks and that sort of thing to ensure that it has voice connectivity, but those events are much rarer.

There are kernels available that attempt to solve this problem, Harsh kernel as suggested by another user has fixes in it along with a lot of other changes, the fixed kernel I'm working on is stock with these changes as well, either should help, it's not possible to eliminate this wakelock completely without shutting down the 3G modem which would of course prevent data and voice use of the phone, but they will reduce the wakelock and may help with your battery life.
thanks a lot... these are really helpful information.
 

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
The msm_hsic_host wakelock is because the 3G modem is connected to the phone as an external USB device controlled by the hsic host controller. When the modem wakes up for any reason (apps sync, location, tower ping, etc...) the wakelock is requested. The problem is that the hsic host controller doesn't go back into suspend mode properly, this is a problem with the kernel. The result is that because the hsic host controller isn't asleep the phone wont enter deep sleep while it waits for the hsic host to suspend.

There is the additional issue that if your signal is poor the operations that caused the wakelock in the first place take longer to complete thus lengthening the time the wakelock is held.

The issue is significantly reduced on WiFi for obvious reasons, all the data is transmitted via WiFi so the 3G modem doesn't need to wake up nearly as often, it still wakes up to deal with tower checks and that sort of thing to ensure that it has voice connectivity, but those events are much rarer.

There are kernels available that attempt to solve this problem, Harsh kernel as suggested by another user has fixes in it along with a lot of other changes, the fixed kernel I'm working on is stock with these changes as well, either should help, it's not possible to eliminate this wakelock completely without shutting down the 3G modem which would of course prevent data and voice use of the phone, but they will reduce the wakelock and may help with your battery life.
by the way, would you happen to know if franco kernel has such fix?
I use his kernel because i do feel the fluidity and smoothness of the kernel plus I have his app for the customizations (including color controls).

I tried Faux but I just can't get the same speed.

EDIT: trying Harsh kernel at the moment
 
Last edited:

iammudd

Senior Member
Apr 2, 2011
138
57
58
I have tried removing almost all apps except the normal google ones ....
and coinciding with this, another user from US also reported that his hsic wakelocks are a lot higher when he travelled to Taiwan and Hong Kong and his thought is it may be due to the fact of highly congested data traffic
I decided to respond here instead of cluttering franco's kernel thread... because many of the possible culprits are not kernel related.

Unless congestion is causing re-transmissions, other ppl's traffic shouldn't affect your phone -- certainly not waking it up. Even with retransmits, you would think that there would only be one single but longer wakelock. (The phone really shouldn't wake every 12 seconds on average.)

However, you do have a high concentration of towers there. Perhaps there is more handshaking with towers? I use llama to automate tasks based on cell towers, and sometimes I see a -1:-1:-1 tower -- followed 1 second later by a real tower. So I assume that would have been 2 back to back wakelocks for me. (I'm going to try St. Murray Cell Connectivity Tracker to have a look.)

If it helps, I can tell you that I disable notification/checking on apps such as Play Store and I freeze many pre-loaded gapps -- currents, play books/mags etc., google+, network location, talk, news&weather and I don't use FB/xda apps. And I use gmail servers to poll my imap and then have any mail pushed to my phone.

From your prev screen caps, the one app I would freeze as a test is your VoIP / texting app (line.jp?)
 
Last edited:
  • Like
Reactions: schizophrenia

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
I decided to respond here instead of cluttering franco's kernel thread... because many of the possible culprits are not kernel related.

Unless congestion is causing re-transmissions, other ppl's traffic shouldn't affect your phone -- certainly not waking it up. Even with retransmits, you would think that there would only be one single but longer wakelock. (The phone really shouldn't wake every 12 seconds on average.)

However, you do have a high concentration of towers there. Perhaps there is more handshaking with towers? I use llama to automate tasks based on cell towers, and sometimes I see a -1:-1:-1 tower -- followed 1 second later by a real tower. So I assume that would have been 2 back to back wakelocks for me. (I'm going to try St. Murray Cell Connectivity Tracker to have a look.)

If it helps, I can tell you that I disable notification/checking on apps such as Play Store and I freeze many pre-loaded gapps -- currents, play books/mags etc., google+, network location, talk, news&weather and I don't use FB/xda apps. And I use gmail servers to poll my imap and then have any mail pushed to my phone.

From your prev screen caps, the one app I would freeze as a test is your VoIP / texting app (line.jp?)
I did a very simple test about tower handshaking by turning off GPS and go to map and i can see my location, under 3G data, jumps back and forth every 10s to 20s. Does that mean the handshaking is not good?
LINE is one app that I have to live with even though it is one of the drainer because i need this app.
anyway I will revisit this later a bit as it's kind of late now. thanks a lot for your analysis and it's very beneficial to me


hows harsh?
Harsh yields low hsic wakelock
and after franco merged the fix, now r85/r86 yields as few as Harsh.
 

iammudd

Senior Member
Apr 2, 2011
138
57
58
I did a very simple test about tower handshaking by turning off GPS and go to map and i can see my location, under 3G data, jumps back and forth every 10s to 20s. Does that mean the handshaking is not good?
Unlikely that it indicated anything related to your battery.

Llama learned about 12 towers within my cell. I would expect much more in HK so I was only exploring what happens when you have so many towers within range -- whether the phone constantly have to handshake with every tower in range or only react to changes with the current tower. St Murray shows many changes (e.g. signal strength or location changes) but that doesn't cause an usually high wakelock count for me. So maybe there is only a wakelock on a handoff.

LINE is one app that I have to live with even though it is one of the drainer because i need this app.
That's what I assumed... but it's worthwhile freezing it for 20 minutes and decide what to do if it turns out to be the culprit.
 
  • Like
Reactions: schizophrenia

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
Unlikely that it indicated anything related to your battery.

Llama learned about 12 towers within my cell. I would expect much more in HK so I was only exploring what happens when you have so many towers within range -- whether the phone constantly have to handshake with every tower in range or only react to changes with the current tower. St Murray shows many changes (e.g. signal strength or location changes) but that doesn't cause an usually high wakelock count for me. So maybe there is only a wakelock on a handoff.

That's what I assumed... but it's worthwhile freezing it for 20 minutes and decide what to do if it turns out to be the culprit.
i will try freezing a few apps and see
man. thanks a lot for the constant help.. although some of them i do not understand but i can see you are trying to help
appreciate it
 

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
i will try freezing a few apps and see
man. thanks a lot for the constant help.. although some of them i do not understand but i can see you are trying to help
appreciate it
iammudd, check this out

freezed: LINE, Whatsapp, all Sync, Zooper Widget (different time frame as I did not have 7 hours for that)
Yes sure the battery got better a bit
it's quite likely it's LINE which caused the difference
let me try one more time by just freezing LINE maybe tomorrow or something
thoughts?
 

iammudd

Senior Member
Apr 2, 2011
138
57
58
freezed: LINE, Whatsapp, all Sync, Zooper Widget (different time frame as I did not have 7 hours for that)
Yes, those apps had some effect but not as much as I had hope. You're still getting 1357 msm_hsic (1 in 15 sec).

In the kernel wakelock screen, PowerManagerService shows you the total of partial wakelocks. You want to google the top items in partial wakelocks screen and see what's causing them. During sleep, I DON'T have sidekick_trafficintentservce, signalcollector nor rilj

Did a quick search and it seems like sidekick is related GoogleNow (which have been reported as a power hog since it uses gps and then keeps searching for nearby stores, etc.) The other 2 seem to be from location reporting. I don't have any of these 3 enabled if that helps so try disabling gps and location reporting in settings (and freezing gNow, latitude, fb reporting, etc)... You can decide what you want to keep later. (FB has also been reported to be bad for batt. Ppl use the web interface instead.)

You may also want to check out this tutorial on BBS http://www.alliance-rom.com/community/wiki/better-battery-stats-guide/ Also, I was referring to these apps to check cell towers:
https://play.google.com/store/search?q=llama and https://play.google.com/store/apps/details?id=org.stmurray.CellConnectivityTracker
 
Last edited:

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
Yes, those apps had some effect but not as much as I had hope. You're still getting 1357 msm_hsic (1 in 15 sec).

In the kernel wakelock screen, PowerManagerService shows you the total of partial wakelocks. You want to google the top items in partial wakelocks screen and see what's causing them. During sleep, I DON'T have sidekick_trafficintentservce, signalcollector nor rilj

Did a quick search and it seems like sidekick is related GoogleNow (which have been reported as a power hog since it uses gps and then keeps searching for nearby stores, etc.) The other 2 seem to be from location reporting. I don't have any of these 3 enabled if that helps so try disabling gps and location reporting in settings (and freezing gNow, latitude, fb reporting, etc)... You can decide what you want to keep later. (FB has also been reported to be bad for batt. Ppl use the web interface instead.)

You may also want to check out this tutorial on BBS
http://www.alliance-rom.com/community/wiki/better-battery-stats-guide/
thanks for the info

I have freezed FB when screen off already. and I have turned off "all" location reporting/history etc. but I did have Google Now enabled.

Well, with you help at least I know I can achieve close to perfect idle drain IF I disable LINE and Google Now etc. But nevermind as I need these 2 apps to run. Still, as I assumed, my wakelocks would still be somewhat higher than in other countries.

i am undervolting 1 step at this moment. it helps a tiny bit. ha
 

zouden

Senior Member
Jan 29, 2011
74
14
0
Did you see a reduction in idle drain when you switched to Franco r85/86? I saw a reduction in msm_hsic_host wakelock but no reduction in battery drain (still 3%/hour).
 

schizophrenia

Senior Member
May 11, 2009
1,043
134
0
Did you see a reduction in idle drain when you switched to Franco r85/86? I saw a reduction in msm_hsic_host wakelock but no reduction in battery drain (still 3%/hour).
on r85/86, for me personally, the hsic wakelock has been reduced together with battery drain.

but r90 the battery drain came back even though the hsic wakelock is still low