NFC setting grayed out and NfcService:mRoutingWakeLock - LG G5 Questions & Answers

I running my H850 on LOS microG version 14.1-10190110-h850 (Android 7.1.2) and have about 2%/h battery drain over night. The stats showed that during that time the phone is active way too much. Effectively, I think my phone doesn't really go to sleep.
So I installed BetterBatteryStats and that showed me that a NfcService:mRoutingWakeLock was active for about 80%. Everything else seems reasonable.
Then I went to the NFC settings to find they are grayed out and sometimes toggled on, some times toggled off. I even watched it switch automatically from off to on all while grayed out so I can't do anything about it.
I searched the forums and found this issue a couple of times but never with a definitive solution and most were more than two years old. Some say its a problem with nougat, some say is an app constantly trying to get NFC readings and one said that maybe some config file is wrong.
I also tried to set the IGNORE_WAKE flag via adb but that didn't help, or I did it wrong.
Does anybody know more about this problem and how to solve it? Or any suggestions how to research more into the root cause?
EDIT: I checked in safe mode and the NFC setting is still grayed out. Does that mean that I have a hardware problem? Is there a log file where I could check for a failed init? I am new to android but not new to programming, linux and embedded systems. I'm totally willing to learn and dig deeper into this.
I read somewhere that cleaning the battery contacts might help. Is that a hoax or is the NFC antenna maybe built into the battery?
EDIT2: I found a solution: Following this, I installed the driver linked there and now my NFC is working. The NFC toggle is enabled, I turn it off and get 2% battery drain total over night (before it was more like 12%). Thank you so much @shunjou.
Now I wonder, should I inform LOS or microG developers about this?

jgeisler said:
Now I wonder, should I inform LOS or microG developers about this?
Click to expand...
Click to collapse
Don't bother. Vulkan is also broken in 14.1, due to a mismatched blob (fix here). The only G5 maintainer that knew what he was doing decided to be rude and take a stance of not merging anything new into the 14.1 branches. His excuse was "cm-14.1 is no longer being actively developed for LG 8996 devices as all development has moved to 15.1", despite lg 8996 builds never being promoted to 15.1 even to this day. That nfc "fix" was also shamelessly picked into 15.1 instead of properly revising the HAL, so there probably isn't an issue from a clean 15.1 flash.

Related

Need expert help about RILJ and other wakelocks

Hello
First of all, sorry of any bad or wrong english, it's not my native language.
I have a very annoying wakelocks problem with my I9100T.
My carrier is Pelephone (Israel), I bought the device about a year and a half ago.
A few months after I got it, I decided to root and to flash a different rom.
I've had many roms since them, mostly stock-based, but I've tried a few AOKPs too.
The problem is basically this:
No matter what rom or what kernel or what modem I install, battery is terrible. With the help of BBS I was able to learn that the cause of this is excessive wakelocks, mostly RILJ, radio-interface, l2_hsic and umts-ipc0. This causes an extreme battery drain, 25%-35% drain in a 7-hour sleep night with wifi/3g/bt/gps/background apps all off and no body touching the device. It is extremely frustrating and makes the phone useless as of the everexisting fear of battery running out.
I've tried tens of different roms, Stock-based (Villain, Neat, Litening, WanamLite, Alliance and a few others I can't remember), AOKP-based (The only one I remember by name is ResurrectionRemix 2.6/2.6.1 and a few JB releases too) across different versions of android.
Tried them with the default kernel, with CF kernel, siyah, phenomenal, dorimanx.
Tried 10+ different modems including 3 extracted from my carrier's official roms (JJKF3, JJKI2 JJLP8).
All of them have the same exact issue.
Only time I remember not having this issue is with old GB roms. CheckROM V4/V6 did not have any battery problems, battery was perfect.
Also Litening rom V6.1 XXKH3, dates as back as aug 11'. Battery was badass there.
I've tried using the phone without restoring anything, tried freezing everything that I don't need, tried even freezing anything that is not necessary for the phone to run (eventually had a phone with no SMS/phone abilities, no play store, no syching, no properly working bluetooth/wifi connections) and still wakelocks occured.
When I first switched to ICS, I also had a 'MediaServer' wakelock, fixed by deleting 'corrupt' files from sd/external. The RILJ, radio-interface, l2_hsic and umts-ipc0 remained and I can't find a conclusive cause/solution.
Fast dormancy is not supported so I always turn it off via *#9900#, or that app for AOKP roms.
I remember a rom in which turning on/off airplane mode would help for a few hours. Then the wakelock returns. Haven't tried it recently, it doesn't quite solve the problem anyway so why bother with it.
I've noticed BBS showing "No or unknown signal" and "No data connection" at 100% time, which is weird.
Recently tried WanamLite/VK based on XXLSJ 4.1.2 leaked stock firmware, same problem.
Finally after some more research here in XDA I've tried to fix RIL/modem mismatch with GetRIL. I have flashed WanamLite 12.8, installed RIL via GetRIL so now it says "RIL/Baseband is matching". A quick look at BBS and battery history still shows RILJ, radio-interface, l2_hsic and umts-ipc0 wakelocks, so I wiped battery history and charged it to a full 100%, currently waiting for BBS to collect data to present here.
I can see that the problem is something about the radio/modem, but since I've tried many of them, I figured it's something that has to do with my device/carrier and not the modem itself. That's why I've tried Pelephone's modems, and recently Wanam's default modem (UHLPH) with matching RIL.
I wanted to try Pelephone's modem with matching RIL but GetRIL tries to install RIL for a different modem since it can't find one for pelephone's, and after a reboot it shows "unknown" baseband and no reception. This isn't important anyway because if it was a 'drainy' modem, it would have been much less drain and would have been better with other modems.
This is clearly something bigger and more persistant, something I'm missing as of my limited knowledge in android modems/system.
I would very much appreciate help with this in any way, ideas of what to try, info about related subjects, perhaps even a cause or a solution.
A friend of mine has the same phone with the same carrier with similar issues (yet a bit different), but the info I'm getting from him is limited and not conclusive. Based on it I can't say it's 100% environmental, nor can I say I'm the only one with the issue.
I'm ready to try anything - ROMs, kernels, modems, apps, tweaks etc.
I will be posting BBS screens and logs here once they'll be more accurate, for now I've attached a 10-min history and BBS screens.
Thank you for any help or assistance.
I have had the exact same issues as you Fast Dormancy, &RILJ on my AOKP Milestone 1 4.1JB. I used the toggle fast dormancy app to fix the first issue. For the RILJ i used the getRIL app, then disabled location services and auto sync for google. Fast dormancy is fixed now. I still get a lot of RILJ wakelocks but the numbers have gone down noticably. Battery performance have significantly improved though. These are the standard fixes i managed to find in the forums. Have you already tried these steps?
DaKiller147 said:
Hello
First of all, sorry of any bad or wrong english, it's not my native language.
I have a very annoying wakelocks problem with my I9100T.
My carrier is Pelephone (Israel), I bought the device about a year and a half ago.
A few months after I got it, I decided to root and to flash a different rom.
I've had many roms since them, mostly stock-based, but I've tried a few AOKPs too.
The problem is basically this:
No matter what rom or what kernel or what modem I install, battery is terrible. With the help of BBS I was able to learn that the cause of this is excessive wakelocks, mostly RILJ, radio-interface, l2_hsic and umts-ipc0. This causes an extreme battery drain, 25%-35% drain in a 7-hour sleep night with wifi/3g/bt/gps/background apps all off and no body touching the device. It is extremely frustrating and makes the phone useless as of the everexisting fear of battery running out.
I've tried tens of different roms, Stock-based (Villain, Neat, Litening, WanamLite, Alliance and a few others I can't remember), AOKP-based (The only one I remember by name is ResurrectionRemix 2.6/2.6.1 and a few JB releases too) across different versions of android.
Tried them with the default kernel, with CF kernel, siyah, phenomenal, dorimanx.
Tried 10+ different modems including 3 extracted from my carrier's official roms (JJKF3, JJKI2 JJLP8).
All of them have the same exact issue.
Only time I remember not having this issue is with old GB roms. CheckROM V4/V6 did not have any battery problems, battery was perfect.
Also Litening rom V6.1 XXKH3, dates as back as aug 11'. Battery was badass there.
I've tried using the phone without restoring anything, tried freezing everything that I don't need, tried even freezing anything that is not necessary for the phone to run (eventually had a phone with no SMS/phone abilities, no play store, no syching, no properly working bluetooth/wifi connections) and still wakelocks occured.
When I first switched to ICS, I also had a 'MediaServer' wakelock, fixed by deleting 'corrupt' files from sd/external. The RILJ, radio-interface, l2_hsic and umts-ipc0 remained and I can't find a conclusive cause/solution.
Fast dormancy is not supported so I always turn it off via *#9900#, or that app for AOKP roms.
I remember a rom in which turning on/off airplane mode would help for a few hours. Then the wakelock returns. Haven't tried it recently, it doesn't quite solve the problem anyway so why bother with it.
I've noticed BBS showing "No or unknown signal" and "No data connection" at 100% time, which is weird.
Recently tried WanamLite/VK based on XXLSJ 4.1.2 leaked stock firmware, same problem.
Finally after some more research here in XDA I've tried to fix RIL/modem mismatch with GetRIL. I have flashed WanamLite 12.8, installed RIL via GetRIL so now it says "RIL/Baseband is matching". A quick look at BBS and battery history still shows RILJ, radio-interface, l2_hsic and umts-ipc0 wakelocks, so I wiped battery history and charged it to a full 100%, currently waiting for BBS to collect data to present here.
I can see that the problem is something about the radio/modem, but since I've tried many of them, I figured it's something that has to do with my device/carrier and not the modem itself. That's why I've tried Pelephone's modems, and recently Wanam's default modem (UHLPH) with matching RIL.
I wanted to try Pelephone's modem with matching RIL but GetRIL tries to install RIL for a different modem since it can't find one for pelephone's, and after a reboot it shows "unknown" baseband and no reception. This isn't important anyway because if it was a 'drainy' modem, it would have been much less drain and would have been better with other modems.
This is clearly something bigger and more persistant, something I'm missing as of my limited knowledge in android modems/system.
I would very much appreciate help with this in any way, ideas of what to try, info about related subjects, perhaps even a cause or a solution.
A friend of mine has the same phone with the same carrier with similar issues (yet a bit different), but the info I'm getting from him is limited and not conclusive. Based on it I can't say it's 100% environmental, nor can I say I'm the only one with the issue.
I'm ready to try anything - ROMs, kernels, modems, apps, tweaks etc.
I will be posting BBS screens and logs here once they'll be more accurate, for now I've attached a 10-min history and BBS screens.
Thank you for any help or assistance.
Click to expand...
Click to collapse
kumaran.tm said:
I have had the exact same issues as you Fast Dormancy, &RILJ on my AOKP Milestone 1 4.1JB. I used the toggle fast dormancy app to fix the first issue. For the RILJ i used the getRIL app, then disabled location services and auto sync for google. Fast dormancy is fixed now. I still get a lot of RILJ wakelocks but the numbers have gone down noticably. Battery performance have significantly improved though. These are the standard fixes i managed to find in the forums. Have you already tried these steps?
Click to expand...
Click to collapse
Thx for the reply
Tried the fast dormancy app, used getRIL as I said, location services are off, sync is sometimes off sometimes on.
Here are the results.
*bump*
Any ideas? I went back to GB for now, battery in ICS/JB is just unbearable.
Instead of providing the screen shots which can only show details, you should attach the BBS log file. It contains much more information, probably even information you do not consider important for the analyzes of your problem
fxrb said:
Instead of providing the screen shots which can only show details, you should attach the BBS log file. It contains much more information, probably even information you do not consider important for the analyzes of your problem
Click to expand...
Click to collapse
Knock yourself out
DaKiller147 said:
Knock yourself out
Click to expand...
Click to collapse
You did quite a lot but did you ever check your APN settings? Some of the wakelocks in your BBS log could be due to bad/wrong APN settings, so check them very carefully, especially the proxy settings (if any).
Sometimes (in my case) it is even better to create a new, "empty" APN. The only values set in my "empty" APN are: Name, APN, MCC, MNC, Authentication type and APN type. All other settings are not set.
fxrb said:
You did quite a lot but did you ever check your APN settings? Some of the wakelocks in your BBS log could be due to bad/wrong APN settings, so check them very carefully, especially the proxy settings (if any).
Sometimes (in my case) it is even better to create a new, "empty" APN. The only values set in my "empty" APN are: Name, APN, MCC, MNC, Authentication type and APN type. All other settings are not set.
Click to expand...
Click to collapse
Forgot to mention it in the original post. I always check my APNs since all roms have the wrong internet APN of my provider (It's been updated for smartphones, for some reason most roms still set the old one by default). Usually it also adds some more APNs of a different provider that uses the same network and the same cell towers, so I have to delete them and modify the existing. Internet always worked just fine with the APN I set. I don't really use MMS so I guess that doesn't matter.
*bump*
CM9.1.0 stable version has a better battery and less l2_hsic wakelocks (wake count is about the same but count and expired count are both 0).
This is the only rom that has any difference in l2_hsic wakelocks except GB roms.

[Q] NFC not working?

Howdy,
I'm having problems with NFC I have not been able to solve with hours of googling and thought someone may have run into the same issues before. I am trying to program an NFC tag, but my phone doesn't detect the tag or my Nexus 7 tablet (which detects the tags just fine). I'm running the latest Venom ROM and also just did a Factory Reset and reflashed the ROM to no avail. I tried taking off my case, cleaning the contacts on the back cover, holding the tag all around the camera where the hardware is supposed to be and I don't get anything. I have one of the special NFC-enabled SIMs as well, not that that should matter as I haven't tried the ISIS app yet. The tags are NTAG203s. Anyone ever run into something like this?
Just chiming in and letting you know that I have had NFC issues with the Verizon version since the KitKat update...
chrisngrod said:
Just chiming in and letting you know that I have had NFC issues with the Verizon version since the KitKat update...
Click to expand...
Click to collapse
Glad I'm not the only one, thanks for your reply... out of curiosity are you running stock? I neglected to mention I'm running a Viper ROM but I'm sure there would be more complaints if there was an issue with the ROM.
Fixed!
Hate to respond so late but I figured I would just in case it helps someone-- turned out to be an 1D10T error. I was able to locate a setting in the Viper ROM settings that I was unaware of (Viper Tweaks App --> Misc --> NFC Restrictions). I switched the option to no restrictions and I can now use my NFC tags. Just a tap and I connect to the guest WiFi at work and launch my VPN
Oops never saw your response. Was all stock. I'm about to sell the device. Resetting and will test one last time.

[Q] Having some issues with aggressive wifi to cellular handover

My issue is that I am constantly stepping outside, out of reach of my modem, and I'll have to turn my Wi-Fi off or my phone will stay connected to the the incredibly weak wifi signal.
So, I tried turning the dev option for "aggressive wifi to cellular handover" on thinking this would help and allow me to just leave wifi turned on while stepping outside and have it switch over to data without my assistance. And it worked, for the most part (it still held on to wifi signals *I* would deem too slow, but not often), BUT whenever I reboot the option in dev settings un-ticks so I have to go back in and turn the setting back on.
My question is, is there a way to prevent the aggressive wifi to handover from turning off on reboots, or is there another option I could try that may even be more aggressive?
Thank you in advance!
Have you tried the setting to automatically disconnect from a poor WiFi signal? It's under WiFi>settings>advanced WiFi>avoid unstable connections
Juggernaut79 said:
Have you tried the setting to automatically disconnect from a poor WiFi signal? It's under WiFi>settings>advanced WiFi>avoid unstable connections
Click to expand...
Click to collapse
That says it'll automatically disconnect from no connection, but I still have an internet connection off the wifi, it's just like slow as all get out
6NomoN6 said:
That says it'll automatically disconnect from no connection, but I still have an internet connection off the wifi, it's just like slow as all get out
Click to expand...
Click to collapse
For me it disconnects from a weak signal.
I'll be back!
6NomoN6 said:
My question is, is there a way to prevent the aggressive wifi to handover from turning off on reboots, or is there another option I could try that may even be more aggressive?
Click to expand...
Click to collapse
I have the same problem, discovered the same solution, and have run into the same issue with no persistence after reboot! I'm googling now for a solution because going into developer options every reboot is incredibly damaging to the smoothness of the user experience I've worked so hard to customize.
Whether I find a solution or not I'll post in this thread again to let you know. If the latter is the result I will personally either write a tasker script, init.d script, or if nesseceary an Xposed module depending on factors I've yet to research. Can you Beta test for me if it comes to that? Maybe it's as simple as editing build.prop, I don't know yet, but I wanted to make this post ASAP so that you know you aren't alone on this and someone capable is working on the issue. For a developer like myself tapping menus every boot is unacceptable! Hopefully there is already a fix out there in the wild and I won't have to do any work.
P.S. Don't forget to also enable cellular radio always active for fast network switching at the price of some battery life. It's a few options below aggressive handover in Developer Options and thank jolly the setting is sticky unlike it's counterpart. Also, sorry for the poor turnout on your thread. I figured there'd be 100 posts by now, but at least you got my attention.
Edit 1: "setprop persist.{i-dont-know-yet}" in terminal emulator may do the trick. Checking for variables for the setting we want now. Hopefully they exist!
Edit 2: :laugh: I FOUND EVERYTHING I NEED FOR A FIX!!! However, an Xposed module will be required. I need some sleep but I should have something by tomorrow night. In case any other developers are reading this, here is the information required to make things work the way Iwe want them to:
http://android.stackexchange.com/qu...-cellular-handover-option-in-developer-settin
https://android.googlesource.com/pl...ndroid/settings/DevelopmentSettings.java#1061
Edit 3: Now that I know how this setting actually works together with wifi_watchdog (see source code WifiWatchdogService.java) I think I may have changed my mind regarding how to go about solving the root problem at hand (network switching) which this setting really does a "hack" job of taking care of. The developer that made it decided on a arbitrary, static number to be used for decreasing the connected WiFi AP's RSSI value (thereby making handover more "aggressive") instead of exposing any kind of grainular control to the user. So yes I could easily make the developer options setting stick but a much better approach would be to hook the method android.net.wifi.WifiManager with an Xposed module and implement additional logic to the network switching. The great thing about this method is there is the possibility for adding additional checks besides just periodically pinging the current primary dns server and monitoring the delay and timeout of the result. I also know for a fact modding the framework persists after reboot which is afterall all we originally wanted to have. The second or alternative route would be to edit the secure settings database using SQLite. The pro of this method is it is guranteed to be compatible with nearly ANY rom, won't break anything after an update, and doesn't use resources like an Xposed module. The con is that you are limited to the variables built into android, can't implement any new logic, and the worst is that I'm not even sure the modified tables would even persist after a reboot (or network state change for that matter) which if true would defeat the original purpose of this expedition. I'll make a fourth edit to this post after I've thought about and considered how to best proceede to reaching the goal of having a solution to our problem. :victory:
FoxysWorkplace said:
I have the same problem, discovered the same solution, and have run into the same issue with no persistence after reboot! (...)
Click to expand...
Click to collapse
First of all, thank you so very much for looking into this!
I'm sorry for not responding sooner, but I had honestly lost hope of finding a solution to this issue mainly because I am not a developer myself and haven't the foggiest how to get started with it on Android
But when I opened my notifications and saw a response to this post (!) I got *extremely* excited, and as I read through your post, my excitement intensified to great happiness!
I can't express my gratitude, but I would be more than happy to help with anything that I can!
Any news on this?
Has anyone found a solution?
Had anyone found a solution that doesn't require root access?
Can we expect that fourth update any time soon? Any solution without xposed?
I'm following this thread in the event that someone finds a non-rooted solution. The Galaxy S7 really cannot be rooted without a serious performance hit (and yes I've gone through the two or three best/popular lag-fix solutions) but it works best in stock :-/

ATFWD-daemon keeps phone awake

See screenshots. This happened for the second time now, a reboot fixes this.
But I want to get rid of this! I haven't found anything in the build.prop.
With a Google search, I've found some vague reference to a Qualcomm radio service, but no details.
Is anybody in the know here?
I'm running 10c, unlocked, rooted and decrypted (850).
Edit: it seems to be the miracast functionality: http://forum.xda-developers.com/moto-g/help/com-qualcomm-atfwd-service-bloatware-t2820010
It's located at /system/app/atfwd
So I cannot deinstall or freeze it. I wonder why the phone was kept awake, though. It happened after charging the phone, before it was OK...

Bad GPS on many ROMs

Hi everyone!
I was using my Poco F1 for a year now. After doing root, install MIUI eu until version 10.3.4, where everything was OK. When updating to 10.3.5, notice after a while that the GPS was not working properly. Sometimes it took too long to take the signal from the satellites, other times I immediately took the signal from the place where I am. The funny thing is that when I move, the GPS signal is almost immediately lost, so it is impossible to use Google Maps in that mode.
- I already tried Waze and the same thing happens
- Try installing 3rd. apps for correct GPS, with almost no result
- the phone has the same old case and has not received any blows
- Updated to MIUI eu 10.3.5 - 10.3.6 - 10.3.7 and the same thing continues
- installed the latest version of Lineage OS and give the same error
- Flash to Stock ROM and the same thing continues ...
what do you think? Will it be hardware failure? I'm about to open and check the antennas but I think it's very strange, since I don't remember hitting it or wetting it...
That looks like hw failure to me. I'd have it checked by service center or local repair shop.
In my case, ever since I updated to MIUI 10.3.5 the gps won't recognize my location correctly, takes longer time to locate. Shows 30-40 meters away from my exact location. Same thing on pixel experience rom. I tried calibrating compass with no success.
Not just Google maps, other apps like Uber and Food delivery apps has same problem.
I would test the reception first. To do this download a program like GPS test from the playstore. Think it is from chartcross or something.
Go outside in an open space and check the SNR values. Normally the values are like between 35 and 40 or some even a bit higher. Also check how many sats it sees and can get a lock on.
Report that first if you can.
if miui's persist file has been updated altered from miui10.3.5 onwards
then redownloading FASTBOOT ROM of miui10.3.4 and unziping then unziping and flashing persist.img in /persist partition will put you back on older persist.img file!
worth trying! but becareful!
persist.img can be flashed using recovery only!
seems to be a very frecuent Hardware failure, it happensa to me exactly the same, sadly I use the gps very much so I had to buy another phone (Mi9 t) lots of folks seem to have the same problem, maybe Pocoafter all made too many sacrifices in order to pack the sd 845 with such a low price, now I´m using the mi9t and the screen is from another world next to poco, also the audio is at least 10x times better, and on my country didn´t have 4g support on poco....now, I´m just waiting for android q to be relized on poco so can use it with desktop mode, but the experience in general with poco was pretty bad
Solved!
Well, it seems that I discovered the error. I was testing the app "GPS test" and note that sometimes it took satellites and sometimes not. I cleared the cache from TWRP and it improved only for a while .... I was missing just doing a downgrade of Miui, before checking the antennas.
What was the real cause? Not long ago I changed from a telephone company to a "virtual" company (outsource the infrastructure) because it was cheaper. The problem arises I think because Constantly performs Roaming. That's all. I placed a SIM with another company (not virtual) and the GPS worked automatically as before ...
My Gosh....you are right....I removed the Sim as it is now on my new phone, and been testing the gps for about an hour and it hasn't lost signal....I didn't change my phone company, so can't understand why it happended, maybe they changed something internally....but yeah....with out sim it's working just fine, I guess changing something on the config may do the trick too
A.c228xda said:
My Gosh....you are right....I removed the Sim as it is now on my new phone, and been testing the gps for about an hour and it hasn't lost signal....I didn't change my phone company, so can't understand why it happended, maybe they changed something internally....but yeah....with out sim it's working just fine, I guess changing something on the config may do the trick too
Click to expand...
Click to collapse
That is precisely the odd thing ... I already tried lots of different configurations, cache cleaning, GPS reset, GPS fix, third-party applications, changing the A-GPS ports and NOTHING really worked for me ...
Until I changed the telephone company.
I don't know how this works to infer so much in GPS operation, but there it is.
nazagato said:
That is precisely the odd thing ... I already tried lots of different configurations, cache cleaning, GPS reset, GPS fix, third-party applications, changing the A-GPS ports and NOTHING really worked for me ...
Until I changed the telephone company.
I don't know how this works to infer so much in GPS operation, but there it is.
Click to expand...
Click to collapse
Is your Google Location Accuracy enabled and your Location Mode set to High Accuracy?
ggezboye said:
Is your Google Location Accuracy enabled and your Location Mode set to High Accuracy?
Click to expand...
Click to collapse
Yes. Even I set up Google tracking permissions to on.
Install GPS optimizer on Magisk

Categories

Resources