Closed fakemanoan closed 5 months ago
I have attempted some fixes in this area
1) I have manually changed the decon qos to request 550MHz from INT clocks 2) whenever decon is preparing a frame, increase memory frequency to ~1100mhz 3) actually define a memory qos in the decon driver 4) stop parts of the gpu sleeping so soon
and (for now) the issue seems to be better. edit: ehh kinda better kinda not. still shooting in the dark
also to note, this is with the dirty memory hack still in place that seemed to help for whatever reason. changing 1 variable at a time to see what is causing/not causing the problem.
Using HWCSevices and HDMI instead of dummyhdmi, the issue is better, but still not perfect.
It could be possible that a clock is running low when it should be high.
Seems like there is some qos in device_throughput and bus_throughput (and some in cluster0 min and max freq) Trying without mfc qos.
If this qos does influence stuff, then in the decon driver look to do what MFC does
removing the qos entries has no effect, the performance is still better with MFC enabled doing a scrcpy.
weird. still looking at stuff
look for exynos7420 bts stuff, try disable that see if that changes anything
disabled all of mfc qos, bts and it still had no adverse effect on anything.
safe to say that it isnt pm_qos or bts related, at least directly. some clock is probably running low when it should be high
All previous tests were conducted on lineage 20
Swapping to lineage 19 for the time being, as the problem is a bit worse over there at times
After merging some kernel commits from 3.14 into 3.10, specifically ARM64 (from v7 compat to v8) and a decon compat merge from 8890, the problem is much reduced. Still laggy notification pulldown in the camera app though, but gesture navigation is now somewhat usable in 19
Seems like some of the issues can be attributed to a bad kernel (maybe)
HWC is now much smoother on a testing kernel by backporting some gpu stuff from 8890, but the memory hack remains for now.
This issue will be addressed in the next version.
Exynos 7420 kernel sources ship with a bad ion memory allocator, which caused this issue to happen. It was not related to any power management issues (as indicated by tests earlier). Discovered via a kmemleak scan and attempting to use a different ION as the logs indicated something regarding ion allocation (blind attempt at a fix)
Copying the ION memory allocator from a 7580 device resolved the issue. This solution can be "backported" to older android 11 and earlier kernels too. We now have fully backported HWC from a stock device that is smooth. This issue is resolved and the fix will be applied in the next ASB
After using the device normally for a while, the UI will begin to chug and lag noticeably, almost to the point where its unusable.
Disabling the hardware overlays fixes the problem, however this is not practical as this reduces performance overall, and decreases battery life.
Reserving a small amount of memory with the /proc/syc/vm/min_free_kbytes setting alleviates the issue somewhat, but it is still noticeable
Another thing that seems to remedy the issue is initiating a scrcpy via ADB. Something about that process smooths out (not perfectly, but close) the UI to the point where its a non-issue. This could be related to PM needs QOS, the specific clocks that are requested or another kernel issue.