yashsingh1/xdaforums huggingface dataset:
[RAZR HD Android Development] StefanGA:
Ok, C - some more feedback here from your guinea pig.. I still was not able to do a logact - not using linux built in adb command nor in the android terminal emulator.. although in the terminal emulator I get a different error: "unepxpected EOF".

Anyway, the RILD2 build seems to consistently prompt for my SIM PIN after reboot now. I get the well described "blank triangle", then "crossed out sim icon", then come the PIN prompt. Enter PIN, get shaded triangle and phone will stay in that state for quite a while. I tried to place a call while in that state and it worked, immediately showed 3 bars, then.. Not sure what the shaded triangle state is, but the phone tends to "fall" into that state quite often for me..

Now comes the weirdness.. Connected to my car bluetooth this morning. No issues, phone/sms/audio all seem to work flawlessly. Drove to work - I cross a border to a foreign country and phone switched to roaming, as expected. However, the Signal triangle now received an Exclamation mark in addition to the "R" indicator.. Not sure what it means - tried to place a call, dialer hung up - black screen. Closed and retried, no go. Rebooted phone, roaming signal connected, dialer works - call placed dialing fine, get the ring tone of receiver other person picks up, phone hangs up. Carkit still shows the call as connected!! Had to shut of the car unit and then it would realize call had been hung up. Since then I received constant notifications that "Music" has stopped.. Diasbled it (figure it might be related to me using rocket player and android is trying to start "Music" on bluetooth connect, but failing..)

I will retry this on my way home again and report back..

I have yet to experience the battery drain, so far when sleeping all seems to be fine, all of a sudden subjectively feels like the screen is sucking the battery dry in seconds.. I have almost a flat horizontal line of battery consumption when screen is off, switches to almost a flat vertical line when screen is on.. Brightness is lowest and auto brightness disabled..

It seems like I should do re-donwload, re-wipe and re-install clean again *sigh*

sorry for the long note, but I promised feedback.
[RAZR HD Android Development] Zeljko1234:
[MENTION=4910373]madmonkey57[/MENTION]

IMO, yellow and red colors means weak radio network signal. Could you check are you on LTE/UMTS/GSM at home? If preferred network type has low signal, phone will constantly try to handover to it instead just keep on the stronger one. That definitely drains battery. Without moving (hangover to another cell) location update (transmitter on) is happening every few hours, depends of the network settings. Of course, if your phone is online (mobile data) than TCP connection must be kept alive with periodical "ping". That's the reason why being online drains battery more than use legacy services like phone call, sms, mms...

You can change preferred network in settings (early LP builds FC if you try to) or in hidden menu (*#*#4636#*#* Phone info)). I just did that and the setting remained with no changes to the signal or network type. Still on UMTS (HSPA).

[MENTION=456453]StefanGA[/MENTION]

If you have set settings, more, cellular networks, data roaming to off then you will get exclamation mark with R for roaming. Exclamation mark means that phone doesn't have mobile data connection anymore and that's is offline from the Internet. Of course, you can still use legacy services. That feature is very welcome for people who spend a lot of time in roaming (like me, you...) and without global mobile data plan.
[RAZR HD Android Development] StefanGA:
That's indeed good to know - I had to date only seen the exclamation mark during boot w/out network and interpreted it as an error :) so this insight is indeed very helpful and a handy feature to have. cheers.
[RAZR HD Android Development] Zeljko1234:
Hmmm, interesting. "PSA: In the next few days moto_msm8960 will be replaced by xt9XX cm-recovery we can no longer allows us to unify hdpi and xhdpi devices."

https://twitter.com/dhacker29/status/554917464388435968
[RAZR HD Android Development] CWGSM3VO:
https://github.com/CyanogenMod/android_device_motorola_msm8960-common/tree/cm-12.0

https://github.com/CyanogenMod/android_device_motorola_moto_msm8960/tree/cm-12.0

http://review.cyanogenmod.org/#/c/85060/

To give everyone an idea of the direction.

I'll be posting a new build later today.

EDIT: Forgot link ;)
[RAZR HD Android Development] madmonkey57:
I will check tonight.

Nevertheless, I suspect "something else".

At work, I'm sitting at the exact same spot as yesterday. Signal was dark green. Today, it's been orang-ish all day long in the battery chart, no signs of "over awakeness" (is that english ? :eek:). Yet, battery usage doesn't feel right.

Cell standby: 10% (details: Time on = 8h, Time without a signal 9%)

.. and as a comparison...

Screen: 4% (details: Time on = 1h16)

That doesn't sound right, does it?
[RAZR HD Android Development] CWGSM3VO:
Can you post a screenshot of the battery page or BetterBatteryStats (XDA version, of course) to get a better overall idea of what's happening?
[RAZR HD Android Development] Zeljko1234:
Again, on what kind of network are you connected to? Could be that Android consider GSM as orange-ish or signal is weak. Check your phone status and dBm.

Of course, could be that C's patch screwed something with radio. Again, what you have under hidden menu as preferred network?

Without more info it's hard to tell what's wrong.
[RAZR HD Android Development] CWGSM3VO:
Yup, that has to be it ;)
[RAZR HD Android Development] madmonkey57:
Got a link for BetterBatteryStats "XDA version"?

I installed Wakelock detector yesterday evening, but I can't seem to pinpoint anything really useful.

Something you might want to look at?
[RAZR HD Android Development] CWGSM3VO:
http://xdaforums.com/showthread.php?t=1179809

Looks like you're suffering poor signal, a lot of the time based on that screenshot.
[RAZR HD Android Development] Zeljko1234:
That's why I've asked him twice to check phone info but he's just ignoring that.

Another interesting info from him would be is that problem really started after flashing your build, is on CM12 only or on CM11 too...

P.S.

Of course is your patch :D
[RAZR HD Android Development] madmonkey57:
That's what it looks like...

But why would I get a strong signal for 8-10 hours straight after flashing a new build, and suddenly get a poor signal... At home or at work... doesn't matter...

EDIT: Just installed BBS, had to reboot, lost all my battery statistics.Too bad...

---------- Post added at 04:34 PM ---------- Previous post was at 04:25 PM ----------

No, I'm not ignoring that.

You asked me to check the preferred network type at home. I'm at work now.
[RAZR HD Android Development] Zeljko1234:
As you have the same problem at work, you can check now. I don't remember that I specifically asked you to check at home only.
[RAZR HD Android Development] madmonkey57:
Some info
[RAZR HD Android Development] CWGSM3VO:
As stated, the patch only holds off reading the SIM until the radio is ready. It doesn't do any other kung fu. It is however, based upon the JBBL RIL code but there's really nothing in there that I can see that affects radio in such a manner (but I'm not a RIL/radio expert by any stretch). Radio logs would be far more useful:

adb logcat -b radio

In my case, I dropped some of the "filtering" that was originally in place for JBBL (as that RIL doesn't support those commands and causes unnecessary wake locks) as it works completely fine on my RIL library (CM12 KKBL default) which is different than JBBL's.

Long story short, poor signal will still be poor signal with or without my hack :) But really need to see radio logs to see what's going on (as they'll contain signal strength among other things).
[RAZR HD Android Development] Zeljko1234:
@ madmonkey57 It's so hard to get info from you. For every single info, new post :mad:

When you have time or in mood, please provide requested info. From the screenshot, signal is pretty low and you're on LTE. Which means that your phone forcing LTE even maybe better UMTS or GSM signal is available.

[MENTION=4418762]CWGSM3VO[/MENTION] I'm just kidding, you should know that already ;)
[RAZR HD Android Development] madmonkey57:
Never mind pal. Just a misunderstanding then.

More info attached
[RAZR HD Android Development] Zeljko1234:
As I suspected, LTE is most preferred. Change that to something else, like GSM auto (PRL). Don't worry, phone will still connect to LTE if signal is strong enough but will not force it if is weak at is in your current area.

For example, my phone is connected to UMTS (HSPA) with -69 dBm, 22 asu. If you know what dBm is and that is in logarithm scale, difference is huge!
[RAZR HD Android Development] CWGSM3VO:
I leave mine configured for "Global" which shows as LTE/GSM/CDMA auto (PRL) on this page for me. I just checked my signal logs too and it's been "weak" and yes, battery has been taking a header as a result.

EDIT: Changing it from the above to GSM auto (PRL) immediately gave me full signal bars (which shows as GSM/WCDMA under Settings>More>Mobile Networks)

EDIT: I'm currently @ 38% battery, I'll leave the radio change in place for an hour or so and see how the signal chart looks and corresponding battery drain.
[RAZR HD Android Development] madmonkey57:
Understand. Will do.

Thanks
[RAZR HD Android Development] Zeljko1234:
Are you now on WCDMA (UMTS), GSM or not likely on LTE? You know that is LTE the fastest, WCDMA very good but GSM (EDGE/GPRS) is really slow for nowadays use. But for IM/emaila should be good enough.

Unfortunately after reboot LP will change it back to LTE/WCDMA/GSM. Previous Android version kept those settings. We can force that with build.prop, I think.
[RAZR HD Android Development] CWGSM3VO:
Shows UMTS (-85dBm 14 asu) in Settings>About. If I set it back to "Global", I get LTE and this page shows the network as LTE. The only real data I use on the radio is when I'm out and about (navigating, etc) but otherwise I'm connected to WiFi somewhere.

It's been over an hour, I still have full signal bars (screenshot notwithstanding) but the battery page shows steady green vs a rainbow :)

EDIT: Charging phone now, but took another screenshot to show better detail.
[RAZR HD Android Development] Zeljko1234:
Steady green is good :) -85 dBm is just fine. Network usually trying to keep all devices about that level. WCDMA is especially sensitive for that, all signals received by base station should have the same level.

Look what I've found in build.prop

telephony.lteOnCdmaDevice=1 - probably for VoLTE if is available

persist.radio.mode_pref_nv10=1 - this should set preferred network, don't know exact value

persist.radio.no_wait_for_card=1 - does it sound familiar to you C? Should be 0 to wait for SIM card. Much easier fix if it works.

persist.radio.dfr_mode_set=1 - have no idea

persist.rmnet.mux=disabled - no idea

persist.radio.eons.enabled=1 - no idea

persist.radio.call_type=1 - network for legacy voice calls

persist.radio.apm_sim_not_pwdn=1 - do not shut down SIM card

Let's experiment with persist.radio.mode_pref_nv10=1, persist.radio.no_wait_for_card=1 and maybe persist.radio.call_type=1
[RAZR HD Android Development] CWGSM3VO:
I messed with all of those, Googled the heck out of all of them and experimented with almost (if not all) of them:

lteOnCdmaDevice=1 (afaik, required for xt926 to operate on gsm network)

mode_pref_nv10=1 (something to do with nv/sim/ruim subscriptions)

no_wait_for_card=1 (tried 0, made no difference on stock)

dfr_mode_set=1 (can't remember)

rmnet.mux=disabled (this was something to do with the modem)

eons_enabled=1 (can't remember)

call_type=1 (didn't touch this)

apm_sim_not_pwdn=1 (yup, from what I understand, a lot of devices require this enabled, not just ours for L)
[RAZR HD Android Development] Zeljko1234:
I've set mode_pref_nv10=3 and WCDMA showed as preferred but didn't have signal, killall... restored signal and preferred back to LTE/GSM/CDMA.
[RAZR HD Android Development] CWGSM3VO:
Yeah, changing anything that I did in build.prop made zero difference. Problem is still (I believe) that the radio isn't ready when the SIM is read (which based on everything I could find, is new in L) and blows the whole thing out of the water.

Power off/boot to recovery seem to reset this all and it will work on first boot in most cases that I tested. I suspect this "reset" brings everything in line to allow the stock RIL to attach properly on boot in the order it expects it to be. This may ultimately be how it's fixed but I can't say for sure.

EDIT: Sorry, just realized I segway'd away from the topic @ hand..
[RAZR HD Android Development] Zeljko1234:
We're on topic, I think :)

You fixed radio problem, hopefully. Now I just wish to change preferred network order.
[RAZR HD Android Development] CWGSM3VO:
It's persistent, check /data/property to see if it's defined there, if so, remove the item and reset it in build.prop.

I *believe* this should allow your change to hold. Changing this in the source is trivial, of course ;)

EDIT: I don't appear to have one in my /data/property directory :( I might be wrong on this (probably am).

EDIT: I suppose you could create /data/property/persist.radio.mode_pref_nv10 and echo 3 into its contents and see if that does anything ;)
[RAZR HD Android Development] Zeljko1234:
Damn it works!!! I've set mode_pref_nv10=2 in build.prop, set preferred network in settings, more, cellular networks, preferred network type to GSM/WCDMA auto, reboot and settings remained. Even after killing rild :) TBH, I don't know which settings actually work.

For you, LTE bastards, include LTE as last preferred.

Edit: I was writing post when you were writing yours :)
[RAZR HD Android Development] CWGSM3VO:
Not sure what value 2 works out to be, but I set my pref network in Settings as GSM/WCDMA/LTE which works out to LTE/GSM auto (PRL) in the phone menu, my phone is currently connected to LTE at a little better than half strength.

EDIT: Back to rainbow signal strength again. I'm in a somewhat rural area (where I live) but when I'm in the city, it's full signal.
[RAZR HD Android Development] CWGSM3VO:
Hey bud, what was the result of this testing? Did you settle on a final set of values? Are the last posted CM12 values still current?
[RAZR HD Android Development] Zeljko1234:
Yes, those settings work very well for me. I've configured 3C to set it after boot. For example, G Pad has the same aggressive values 317, 219... but has 2 GB of RAM and works well. For ours 1 GB of RAM is too aggressive.
[RAZR HD Android Development] KC69:
Been meaning to post up with my results, just been covered up at work. C s last 2 offerings have had no signal, at all. Tried everything with both, no joy. 01/12&01/13 cm 12 have not gone past the moto logo. Kinda been getting a tad frustrated.
[RAZR HD Android Development] Raven2m:
I have tried to clean flash cm12 official a few times and getting stuck at the moto logo. Cwm & kkbl . I was able to install cm12 unofficial last month but rolled back to cm11 due to radio issues.
[RAZR HD Android Development] Zeljko1234:
dhacker twitted not to flash 01/12 or 13. He needs to fix it!!! Flash older build or wait.

https://twitter.com/dhacker29/status/554916615977197569
[RAZR HD Android Development] lcc014:
I have no problem to flash (clean install) and running the CM12 nightly up to 20150111 in my XT925. I have not tried 0112 and beyond yet because I am using C's unofficial build (radio fix). So far so good :good:
[RAZR HD Android Development] CWGSM3VO:
So I dug a little deeper into this, basically here's the stock values on my device (as I've never altered any of this plus, it's a clean install):

/proc/sys/vm/min_free_kbytes: 18432,23040,27648,32256,56250,81250

/sys/module/lowmemorykiller/parameters/adj: 0,58,117,176,529,1000

/sys/module/lowmemorykiller/parameters/cost: 32

/sys/module/lowmemorykiller/parameters/lmk_fast_run: 1

adj + cost need their permissions modified to view (ug+r). If you can, can you tell me what these values are for you after using 3C?
[RAZR HD Android Development] Zeljko1234:
/proc/sys/vm/min_free_kbytes: 3047 (only that value)

/sys/module/lowmemorykiller/parameters/adj: 0,58,117,176,529,100 (the same as yours)

/sys/module/lowmemorykiller/parameters/cost: 32 (the same, interesting permission is 0644 already)

/sys/module/lowmemorykiller/parameters/lmk_fast_run: 1 (again the same and permission too)
[RAZR HD Android Development] CWGSM3VO:
I messed up my pasting sk1ll0rz, lemme re-capture these values:

/proc/sys/vm/min_free_kbytes: 3047

/sys/module/lowmemorykiller/parameters/minfree: 18432,23040,27648,32256,56250,81250

/sys/module/lowmemorykiller/parameters/adj: 0,58,117,176,529,1000

/sys/module/lowmemorykiller/parameters/cost: 32

/sys/module/lowmemorykiller/parameters/lmk_fast_run: 1

And permissions, I added +r for minfree and adj:

root@vanquish_u:/sys/module/lowmemorykiller/parameters # ls -l
ls -l
--w--w---- root system 4096 2015-01-13 14:27 adj
-rw-r--r-- root root 4096 2015-01-13 14:27 cost
-rw-r--r-- root root 4096 2015-01-13 14:27 debug_level
-rw-r--r-- root root 4096 2015-01-13 14:27 lmk_fast_run
--w--w---- root system 4096 2015-01-13 14:27 minfree
[RAZR HD Android Development] KC69:
I'm on 01/11 . Figured out about root also. Its turned off in dev. Options. Still don't know what the deal is with that.
[RAZR HD Android Development] pete355sb:
Hi guys can any of you help me with this, it seems I am not getting a response. I have posted early in this thread also with no response. I am not sure why. If I came across wrong I apologize. I read more than post and I have been around as way back when I rooted my droid incredible. Am I asking in the wrong topic? I will say this I don't understand everything that is going on in this thread but I can say thank you to all involved in making this possible. C thank you for your hard work as I am looking forward to try your build this weekend. Thanks.
[RAZR HD Android Development] KC69:
Try 2.8.3
[RAZR HD Android Development] technoid1964:
Go here and get newest TWRP:

http://www.droidrzr.com/index.php?/topic/51883-[Recovery]TWRP-2.8.3.0-(01-05-15)
[RAZR HD Android Development] CWGSM3VO:
You require a device with a KK bootloader and compatible recovery. If you can flash a recent CM11, you should be able to flash CM12. If not, search this thread for others and what recovery they use. See my sig for the one I use.
[RAZR HD Android Development] pete355sb:
Thank you for the information I really appreciate it. I tried to install 2.8.3.0 also but with no luck. The only recovery that I can get to work is 2.7.1.0 and it works flawlessly. I have used it to flash CM11 M11 and two nightlys. I think I'm just going to stay with the older version of twrp since it works well on my device. Thanks again Pete
[RAZR HD Android Development] madmonkey57:
Results I got yesterday evening made absolutely no sense. I switched to GSM auto (PRL) and still got a weak-orange signal. Switched back to LTE/GSM/CDMA auto (PRL), then I got strong signal BUT device got constantly awakened...

I've changed too many settings I suspected could have an impact (playing with mobile data on/off, roaming on/off, privacy guard privileges, ...) at too many different moments. Impossible to figure out anything. I'm starting all over again, from scratch (i.e flashing) on C's RILD2 build.
[RAZR HD Android Development] Zeljko1234:
/proc/sys/vm/min_free_kbytes: 3047

/sys/module/lowmemorykiller/parameters/minfree: 2048, 4096, 8192, 16384, 24576, 32768 (that's for OOM: 128, 96, 64, 32, 16, 8)

/sys/module/lowmemorykiller/parameters/adj: 0,58,117,176,529

/sys/module/lowmemorykiller/parameters/cost: 32

/sys/module/lowmemorykiller/parameters/lmk_fast_run: 1
[RAZR HD Android Development] StefanGA:
Hey [MENTION=4418762]CWGSM3VO[/MENTION]

Apologize in advance for re-quoting my full feedback, but I can (unfortunately) consistently reproduce the above behavior in full. While I do not think the behavior is directly related to your "fix" I believe RIL is somehow the culprit of a lot of things for our device on L. I am now also back in the draining business, lost about 10% in 20mins - through the power-cycle due to the bluetooth test I could now see that main offender was RILJ which kept my CPU awake at 1.51GHz for full 5mins and the famous google NLP locator service that fired off 7.9 times per minute instead of the usual 1.7 per minute. While I still roll-out NLP as the battery drainer, since it is running in the same fashion when there is no excessive drain, I am tend to believe in certain network scenarios (whatever they may be, presumably bad coverage or low signal, roaming, loss of data connectivity) the RIL seems to go crazy on our phones..

For your info I did set my preferred network type to GSM/WCDMA/LTE in the settings menu and it did survive various reboots and power cycles...

I think next step would be to check if "untouched" CM12 behaves the same way with bluetooth, then we would at least know if your modifications killed that piece, but in terms of core phone functionality someone with good knowledge has to dig into the RIL code.. maybe [MENTION=2218140]kabaldan[/MENTION] finds some time to review what's wrong.. don't want to sound smart-assish, since I have no clue how this works in depth, but my feel is the signal issues we are seeing are just the tip of an iceberg lurking under the surface.. hopefully I am proven wrong.

Thanks all for your energy and time your are investing to keep our old but still great device a valuable treasure to keep, I really appreciate it.
[RAZR HD Android Development] madmonkey57:
WIFI is ON, Mobile Data is OFF, Roaming is OFF, GPS precise / coarse are OFF, NFC OFF, Bluetooth OFF.

Privacy Guard: Google Play services Location request: Ignored

Google Hangouts: "Improve Hangout" (report statistics): disabled (was enabled yesterday)

Preferred network type: LTE/GSM/CDMA auto (PRL)

Gonna remain under these settings and wait if/until battery drain occurs.

Currenlty at work, not roaming.

After 3h15mn, at first glance, looks pretty normal. No battery drain.

Even though network signal is mostly poor (~100db), device seems to be deep sleeping appropriately.
[RAZR HD Android Development] madmonkey57:
Agreed. 100%.
[RAZR HD Android Development] madmonkey57:
Continued from here.

After 6h10mn. Still at work. Phone has been lying on my desk. Picked it up a few times to check battery chart and BBS and other minor stuff.

Everything looks sooooo... normal.

Battery usage has even decreased. Seems that the system has "settled down" now.

Deep sleeping a lot. Poor network signal doesn't seem to matter.
[RAZR HD Android Development] CWGSM3VO:
This looks almost like how my phone behaves. Mine's estimating another 2 days of battery left, even with weaker signal.

I suppose what I could do is produce a build against ril-caf like I was doing at at the beginning (been using "stock" ril) and see if that makes a difference.

Honestly, I'm having no drains here unless I'm in an area with really bad signal. I'm averaging 2 days on battery.

[MENTION=456453]StefanGA[/MENTION]: Without radio logs, I can't even begin to guess what's going on. [MENTION=4910373]madmonkey57[/MENTION] with his BBS reports makes it a lot easier to see what's happening overall in his situation but radio logs would be best. My other vector here is that the majority of us aren't experiencing the issue (or at least, reporting so) which inclines me to believe it's a one-off. Really need those radio logs :)

However, in the interest of making this quick and easy, I'll build tonight with ril-caf AND the filtering JBBL RIL uses and ask for some guinea pigs again.
[RAZR HD Android Development] madmonkey57:
StefanGA and I seem to have one thing in common: roaming.

Attached "logcat -b radio".

EDIT: I'll provide another "logcat -b radio" as soon as the battery drain occurs.
[RAZR HD Android Development] Zeljko1234:
Anyone having problems with BT? Almost every time when I use HRM and headset phone became laggy. If I try to make a call, dialer freeze and only solution is to reboot. Same BT combination was working before.

Also, when BT is used, wifi cannot connect to any apn.