To clarify and summarize all the steps what I follow to try to solve the issue, I decided to write everything here one by one.
Every time the rear screen is active, the main screen starts working at 56 - 57Hz. As soon as the rear screen is switched off, the main screen is back at 120 Hz. The same behavior happen when I activate the rear screen in the camera app.
What I did until now to fix this problem and what helped as a temporary solution:
- Clean installation of the xiaomi.eu stable firmware 12.5.10.0. Fully formating the phone (including the data) is not a solution, I did it on weekly as well as on stable and the problem exist.
- As soon as I add my Google account, described problem appear. Deleting and adding again my google account doesn't solve the problem.
- cleaning the data of the rear display app, installing busybox through Magisk and rebooting the phone helped temporarily, but after one day the lag appeared again.
-downgrading the rear display app to the previous versions (the latest available in the moment of writing this post is 1.3.5, I tried 1.3.4, 1.3.3 and 1.1.16) doesn't solve the problem.
- I was also successful once when I did this:
"Tidy up memory; run Cleaner; remove all Recents; boot into Recovery.
Clear cache and Dalvik; delete /data/system/package_cache/ folder;
Re-install ROM; reboot back to System."
It helped temporarily, but after one day the lag appeared again.
- the lag disappeared temporarily when I modified two commands responsible for the dynamic refresh rate: "ro.vendor.smart_dfps.enable" and "ro.vendor.dfps.enable" through the termux app. Doesn't matter if both of them I setup as true or false, the problem disappear for a day and come back at some point.
- bg-dexopt-job doesn't do / help anything with the hz drop.
- cleaning the data of the battery and performance app doesn't solve the problem.
- modifying the following commands by termux or by SetEdit app:
settings put system peak_refresh_rate 120
settings put system min_refresh_rate 120 or 60 or 30
settings put system user_refresh_rate 120
helped for a day, but the problem comes back again.
-in the developer settings, the "logger buffer sizes" as well as "select log level" is switched off.
I kindly ask the developers to take a look at this issue. I am not the only one who experience this problem.
What I also noticed: I have no idea if there is a relation, but I also noticed a specific lag when I choose different notification effect.
Please go to settings - notifications & control center - notification effect.
There are a few options -
None, light up screen, Rhythm, Pulse, Starlight.
When the option rhythm is active, the swiping animation between the other animation options is not smooth. I always use "light up screen" option, it's just that I noticed that the system has a problem to properly show the notification animations when option rhythm is choosed.
The second, maybe not related problem is the animation of the fingerprint unlock. Doesn't matter what animation I choose, the animation of unlocking the phone works in less than 60hz.
Thank you in advance.