B--B / xiaomi_msm8996-common

6 stars 5 forks source link

Hint for trees #1

Closed xNombre closed 2 years ago

xNombre commented 2 years ago

I think you missed my updated work on crdroid repos: https://github.com/crdroidandroid/android_device_xiaomi_msm8996-common https://github.com/crdroidandroid/android_device_xiaomi_gemini https://github.com/crdroidandroid/proprietary_vendor_xiaomi/tree/11.0-gemini

Good luck and let gemini live forever!

B--B commented 2 years ago

Hi Andrzej! Thanks, i didn't know that you already ported your work on Android 11, that's why i started from the repos in your account! Yes, the goal is to provide working trees for future devs before my beloved gemini dies! I will keep this open until i merge all the updates i missed, thanks again for your hard work and for pointing me in the right direction :)

xNombre commented 2 years ago

Great, keep it up! :) You may also like changes in this project: https://github.com/lithium-4-4-project

Feel free to ask any questions. Good luck!

B--B commented 2 years ago

Done! Some users reported random reboots, but hopefully are finally fixed after the graphics blobs cleaning. Thanks Andrzej, the final result is impressive for a legacy device!

PS: i will probably bother you for a couple of things related to kernel, but first i must take a look better at the code, unfortunately i had no time yet..

Thanks again for all your work and your help, Gemini will never die! :)

xNombre commented 2 years ago

Good job! Thats awesome you finally fixed these random reboots I hadnt managed to fix :)

B--B commented 2 years ago

I haven't released yet last changes so i'm not 100% sure, but actually i'm at 65 hours without reboots, so hopefully it's fixed! And if it's not fixed i' ve restricted the number of commits that can cause the issue, it's something that has been merged 14/15 of february. If the bug is not fixed then it wasn't caused by graphics blobs, it's definitely caused by the audio HAL or something merged in rootdir, i don't think that the other changes may cause a reboot.. Do you remember when the reboots started in your ROM?

PS: just to be sure that it's the same problem, in my case phone stucks with the screen on for more or less ten seconds, then reboots, it's just like a kernel panic, but the kernel log after the reboot is clean. Is the same behaviour?

xNombre commented 2 years ago

I was unable to find the root cause. I can only tell that the issue persists somewhere in dt or vendor. Also, yes, we are talking about same thing.

B--B commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This https://github.com/B--B/xiaomi_msm8996-common/commit/9bc54f5078461ae7eee8e68a70a4c8ce1c0774dc mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off?

@StarkDroid can you please let me know if you experience this bug in your ROM?

StarkDroid commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off?

@StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

B--B commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off? @StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

Thanks, let me know if something change. About the kernel i've used the same sources for two months with Android 10, 11 and 12 and i never had a single reboot, everything started after the merge i made on february 15 in this repo, that's why i think that the bug is related to something merged in that 2 days in the device tree

xNombre commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off? @StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

That's not a panic, looks more like internal SoC problem - this is why changing blobs may have helped. There is no pstore after the reboot even if warm reboots are forced, this proves my assumption about internal SoC problem (triggers low level reboot).

xNombre commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off? @StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

Thanks, let me know if something change. About the kernel i've used the same sources for two months with Android 10, 11 and 12 and i never had a single reboot, everything started after the merge i made on february 15 in this repo, that's why i think that the bug is related to something merged in that 2 days in the device tree

If you are patient enough do a binary search style test by checkouting my changes in a11 (git bisect) and test these builds for a few days. I can only add that reboots appeared quite early as I remember so you can focus on around-bringup commits right away.

B--B commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off? @StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

That's not a panic, looks more like internal SoC problem - this is why changing blobs may have helped. There is no pstore after the reboot even if warm reboots are forced, this proves my assumption about internal SoC problem (triggers low level reboot).

I was thinking the same thing more or less, that' s why i reverted the graphic blobs cleaning commit and tried to revert this: https://github.com/B--B/xiaomi_msm8996-common/commit/81d3bb6d8a7eef60ebe840117fb8d80ca3729a99 , i'm afraid that our SoC doesn't like something merged with that commit. Also because i'm lucky, and i already know that this story will end with me losing half of my life trying to manually port 1815 lines of good code because a single line it' s breaking everything :)

xNombre commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off? @StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

That's not a panic, looks more like internal SoC problem - this is why changing blobs may have helped. There is no pstore after the reboot even if warm reboots are forced, this proves my assumption about internal SoC problem (triggers low level reboot).

I was thinking the same thing more or less, that' s why i reverted the graphic blobs cleaning commit and tried to revert this: 81d3bb6 , i'm afraid that our SoC doesn't like something merged with that commit. Also because i'm lucky, and i already know that this story will end with me losing half of my life trying to manually port 1815 lines of good code because a single line it' s breaking everything :)

I don't want to be brutal but not much of this file is being actually executed :) (only common memory parts and msm8996 section)

B--B commented 2 years ago

Then even if my device didn't reboot after 80 hours it's not fixed. This 9bc54f5 mitigates a lot the problem, but can't be the fix because it's the same blobs you are using in your Android 11 ROM. Another thing: until now i've seen only reports of reboots when the screen is on, do you remember if someone in your ROM reported the bug with the screen off? @StarkDroid can you please let me know if you experience this bug in your ROM?

To respond to that, I kinda haven't faced such issue yet. I did face the mentioned issue earlier but i believe there's a potential kernel panic that might be causing it. Don't really have any evidence yet unfortunately.

That's not a panic, looks more like internal SoC problem - this is why changing blobs may have helped. There is no pstore after the reboot even if warm reboots are forced, this proves my assumption about internal SoC problem (triggers low level reboot).

I was thinking the same thing more or less, that' s why i reverted the graphic blobs cleaning commit and tried to revert this: 81d3bb6 , i'm afraid that our SoC doesn't like something merged with that commit. Also because i'm lucky, and i already know that this story will end with me losing half of my life trying to manually port 1815 lines of good code because a single line it' s breaking everything :)

I don't want to be brutal but not much of this file is being actually executed :) (only common memory parts and msm8996 section)

No no you are absolutely right, i thought that there were more changes related to our device, but i'm taking a close look now and only a few lines are different, most of them related to zram fixes.. Well, I expect at least a reboot before tomorrow evening :)

B--B commented 2 years ago

Well, after some days of testing here's the result:

I already took a look at ZRAM code and kernel sources are the same of other devices running 4.4 kernels + ZRAM (like oneplus msm8998), same thing for the device trees. I will try to remove ZRAM in my internal builds for a few days just because i'm running out of ideas, but i don't think that the problem is there