Open enriquezmark36 opened 6 years ago
Nah it's not anything but out of memory for modem (seems not related eh?) If kanas support device tree in kernel then I suggest picking this commit: https://github.com/remilia15/android_kernel_samsung_core33g/commit/699735934faf62d996fba08a36e7c561e5f577c4#diff-d6194c68fcc7e79bb57401be603cb1cc
Or else, remove refnotify binary from vendor blobs list. This one is from 4PDA users suggestion
Okay, will try.
@remilia15, wait would this remove about 4 MB of usable ram? 4MB is not that large to be concerned about but just asking. Also, arch/arm/boot/dts/sprd-scx35.dtsi doesn't exist in the kernel tree so this is not applicable. Though, I think I know the code that determines the size of allocation.
Yes it takes more 4MB of physical memory for modem
Welp, there's no dts files anywhere ....
Could you try the second solution I mentioned above?
Do you mean to remove the refnotify from the vendor blobs to let the refnotify binary build from source? Or just simply removing it from the whole rom?
Just simply remove it. Source-built RIL-related thing will never work for us, unless you have assembly knowledge to edit those sources
Ahh wait, I'm currently testing the first idea.
This might take some time. @remilia15 , is there any trigger for this? To test this I usually have wait at least about 3 hours until I see the error.
You'll see when it losts RIL signals I have to wait too, and it took me very long time finding real solution for this
So, I tried removing the refnotify binary and the signal lasted for about 4 hours.
The error is the same but with different assert line:
MODEMD : buf=W Modem Assert in file PS/layer1/wlayer1/wl1c/src/wl1c_xdsp.c at line 1959 exp=PS Assert! info=[]W Modem Assert in file PS/layer1/wlayer1/wl1c/src/wl1c_xdsp.c at line 1959 exp=PS Assert! info=[]
Then, I added the refnotify back and proceeded adding about 5 MB of ram (from 33 MB to 38 MB) for the modem and it lasted for about 10 hours and 26 minutes.
It really seems that this is a memory problem, or a leak on the firmware. I don't have much ideas anymore rather than downgrading the firmware or trying the libs directory from ih24n69's lollipop device tree. I guess time to rebuild the rom or downgrade the firmware or whichever comes first.
EDIT: I didn't timed the ril signals. I just computed it from uptime and the radio logcat timestamps.
@remilia15 , even a modem firmware down/crossgrade still causes the failure. That's it; I have no more significant ideas to try... EDIT: Actually, this is the shortest one. It took about an hour and 24 mins.
Seems you need to dig sprd_cproc source code XD
What's that? Also, about the firmware, newer updates bring no changes to the modem since their md5 checksums did not change.
EDIT: Aww, it allows to interface with the modem located at drivers/misc/sprd_cproc.
I didn't get anything from cproc. The status file in /proc/cpw/ says that it is still running even when it is blocked. Is it possible though to let modemd reset the entire radio hardware when this assertion fails?
EDIT: It IS possible to reset the modem, but it is a hassle (since the downtime can last at most a minute). So, it can only be considered as a workaround. But wow, at least thank you for a workaround.
EDIT3: @remilia15, is these trails in the radio logcat kinda OK? I mean there's a lot of these messages repeated every second? I mean there's no LTE support and there's LTE_SS.signalStrength=99
.
7-03 21:27:31.153 3692 3729 D use-Rlog/RLOG-AT: [w] Channel3: AT< +CSQ: 18,99
07-03 21:27:31.153 3692 3729 D use-Rlog/RLOG-AT: [w] Channel3: AT< +CSQ: 18,99
07-03 21:27:31.153 3692 3729 D use-Rlog/RLOG-AT: [w] Channel3: AT< +SPSCSQ: 18,99,1
07-03 21:27:31.154 3692 3729 D use-Rlog/RLOG-RILC: [w] [UNSL]< UNSOL_SIGNAL_STRENGTH {[signalStrength=14,bitErrorRate=99, CDMA_SS.dbm=-1,CDMA_SSecio=-1, EVDO_SS.dbm=-1,EVDO_SS.ecio=-1, EVDO_SS.signalNoiseRatio=-1, LTE_SS.signalStrength=99,LTE_SS.rsrp=2147483647,LTE_SS.rsrq=2147483647, LTE_SS.rssnr=2147483647,LTE_SS.cqi=2147483647]}
07-03 21:27:31.155 3489 3489 D DefaultPhoneNotifier: notifySignalStrength: mRegistry=com.android.internal.telephony.ITelephonyRegistry$Stub$Proxy@f54c7f3 ss=SignalStrength: 17 99 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 gsm|lte sender=Handler (com.android.internal.telephony.gsm.GSMPhone) {55715fe}
Sorry again but may I ask again what does this: remilia15/android_kernel_samsung_core33g@6997359#diff-d6194c68fcc7e79bb57401be603cb1cc does? I think I've re-done it correctly but it still fails after some 16 hours to 17 hours of operation. I wonder if its doomed to be reset after some period of time.
which line is it? My browser somehow can't navigate to the specified path lol
ay, I've copied the wrong one: https://github.com/remilia15/android_kernel_samsung_core33g/commit/699735934faf62d996fba08a36e7c561e5f577c4#diff-d6194c68fcc7e79bb57401be603cb1cc
The dts file doesn't exist so I tried finding the definitions.
Still the same :x
What still the same? I don't think I got the right image of it. The commit I've made is on this: https://github.com/enriquezmark36/android_kernel_samsung_kanas/commit/7808fe39b38c380ae2dbf3ba42c603ef85b9b629
What happens when you click on the link?
It loads on the head of the page
Normally if there's a #diff-commit-id
then it should navigate to the specified file
Btw update: My users are still experiencing reboots somehow. I'll need to dig this harder
Maybe, just maybe its because the commit only touched a single file?
Sigh Well, thank God this only fails on dsds but not on single sim. The best workaround I've seen and am currently using is to reset the modem every time it fails. Time to go back to single sim, hahahaha.
TBH, I really haven't tested dsds on his lollipop build long enough or at least longer than 17 hours.
Quick question, does this commit https://github.com/remilia15/android_kernel_samsung_core33g/commit/699735934faf62d996fba08a36e7c561e5f577c4#diff-5cfeca591c31a02f16a1650ebea1566fR585 produces a message
failed to alloc smem from gen pool
on early boot up (even before init
starts)?
No, it shouldn't
Thank you, so that explains it... I'm still investigating the assert error on my device, and what's worst is that one test take more than a half of a day :)
Oh yeah, may I ask how different is android 7.1 from android 6?
By different you mean source or something?
Yep, I meant the source. Although I am plenty satisfied with my home built rom of android 6, I think i should try working on android 7.1 and see how far I could go before school starts again.
For kernel, you need to pick binder, seccomp and selinux commits. seccomp is needed for codecs stuff (and you know what binder and selinux do)
For device sources, not much different from MM, except fixing crappy bugs like camera, RIL (I'm sure these are easy if you know C++ and java stuffs). N needs legacy HAL1 impl for camera, as we're using prebuilt camera blobs that use HAL1 impl, so you need to define TARGET_HAS_LEGACY_CAMERA_HAL1
to get it working
Well maybe those are what I could remember. You can check my device trees as reference then XD
Sorry for late reply and also thanks for that. But, isn't sdcardfs needed from the kernel too?
I dunno if I could use your scx35-common repository since that really helped a lot. Though I have to override some flags here and there because the device doesn't use a dt image. And, I have to modify it's Android.mk file to let 'kanas' in. Despite all of that, I was able to run Android 7.1. Thank you very much for that.
Still the problem with dual sim persists but with the workaround it became almost invisible or was it because I reboot my device often. It seems a new problem surfaced although it's not serious.
There's a battery drain problem concerning the RILJ wakelock. Any idea what it could be?
PS. Is it really that hard to swipe unlock the lockscreen in android 7.1?
That wakelock could be caused by the RAF configuration on N, and since, we have to use static RAF for that or wakelocks or couldn't switch preferred network type
And yeah, you can use my repo. It's open-source right? And it's free also xD
About lockscreen, maybe it's the touch driver bug
Thanks, I'll investigate these later.
Also, what I mean about your repo is that this line in Android.mk
ifneq ($(filter grandprimeve3g coreprimeve3g core33g,$(TARGET_DEVICE)),)
I'm currently having an internal debate whether I should be using this or not, or should I just copy everything from your repo instead to avoid the Android.mk file... hmm?
Ay, there's also that issue regarding the sim toolkit that always says "check operator services" despite sending 3 successful requests.
Can I ask you a side question about Bluetooth? Did you experience some failure in nougat that falls along the lines? I can't pair any bluetooth device.
bt_hci : command_timed_out hci layer timeout waiting for response to a command. opcode: 0xc12
No, I haven't
Thanks, sorry to bother you. It was my fault not paying attention on what I am typing in the BoardConfig.mk file. A single character does make a lot of difference, hehehe.
It's working now on Nougat, even the emergency cell broadcasts work. Then I tried Oreo, still using your scx35-common repo, my custom kernel from 2016 (of course with different config file, lol), and did hex-editing libraries in the my device's vendor repo.
But, rild crashes with this line:
CANNOT LINK EXECUTABLE "/vendor/bin/hw/rild": cannot locate symbol "ril_service_name" referenced by "/system/vendor/bin/hw/rild"...'
Wasn't this supposed to be part of the shim lib? Or did Oreo really did an upheaval of the entire ril API? It could be both?
ril_service_name
isn't in our SHIM tho, but you can shim it manually
Weird here, O rild isn't supposed to give that missing symbol. Are you using prebuilt libril?
I am using the prebuilt libril, why though? Maybe, I'll try to use the O's libril after solving the weird TWRP 3.0.2 error:
This package is for device kanas; this is a .
Yep it's just a dot. Guess I'll need to build a newer one...
O ditched RIL sockets, so prebuilt libril and rild is totally useless. You have to build your own libril with fixes for Sammy
I suggest using my latest lineage-15.1 branch of hardware_sprd and device_scx35-common, or build your own using LOS' hardware_samsung repo's ril for required hacks for Samsung RIL
Oh, that's why the frameworks/opt/telephony patch cannot be not used anymore.
Thanks for the advice, but I'm already using your hardware_sprd and device_scx35-common repos since it just works and also to avoid duplicated labor. I'll try to rearrange the Makefiles to use the source-built RIL, tomorrow. Again, much thanks for your repos and to those who've contributed!
Hello again, I'm trying to build cm 13.0 for kanas (core 2, SM-G355H) using this source as a reference.
First of all thank you if you decide to read this.
How do you make the ril work without failing? The ril works on dual sim but later on, the phone will reboot. From the last_kmsg file, it is hinted that modemd is responsible:
Then I tried compiling modemd from source that does not reboot (like the one I'm using) or trigger a kernel panic (like the one from stock). I got these messages from main buffer of logcat.
and radio buffer:
Also I'm curious about these two lines in build.prop/system.prop (which I copied from stock):
No Idea what it is or what it does.
P.S. I tried getting the dmesg log but it is always spammed by PM, cpufreq_scx35, "BUG: using smp_processor_id() in preem", and register dumps. I think I was wrong about RILJ being the culprit but right now I have a weird feeling that it's the NVRAM's fault.