@Keneda
It turned out to be kind of port specific, but yes it can occur on other devices with a bit older kernel as miatoll was. The fix is quite easy.
The Xperia port had the same issue as miatoll and it turned out to be the same kernel problem even that both devices use different kernel versions.
https://gitlab.com/ubports/porting/community-ports/android10/xiaomi-redmi-note-9-pro/kernel-xiaomi-sm6250/-/commit/c45ed3b1cdf7d8e485bb4b50dfd1ec9842b4bd64
This is the source of the issue. If in the kernel the
oom_adj
oom_score_adj
Files are with read only permissions 400 the problem will most probably occur. Because lomiri-app-launch spawns SUID helper when it cannot set the scores in this files by it self and the spawn is done by forking so the freezes occured because of the forking.
The problem with lomiri-app-launch is that it spawns a process for each thread to adjust the score which is not very good and in some applications as chrome this is a lot of processes and forks which copy pages and that's slow, but by making lomiri-app-launch able to set the scores by it self then it does not need to spawn SUID helper so no forks no freezes.
Hope I managed to explain it clearly enought.
If you need more information you can contact me in telegram.