I have that same problem.
Mi6 6/64 - MIUI 12 | 20.6.18 |
The accelerometer works randomly. When i reboot it works. It stops again after a while. I tried flashing persist.img, I tried reinstalling rom, but there was no solution.
The offset values remain constant in the accelerometer calibration option.