Sensor is another problem. it happened to me. Someone showed me the way. You can follow my messages.
https://xiaomi.eu/community/threads/9-12-26-27.53994/page-15#post-523149
Q: Camera and/or sensors are not working!
A: You wiped "Persist" partition using an unofficial TWRP build. You shouldn't...
Twrp> advanced> file manager find persist.img but Twrp >install menu does not show persist.img. I can't understood but i find another solution yeah its work. You are write persist fix my problem.
Thank for helping. I so glad. Happy new year.
adb shell "dd if=/sdcard/persist.img...
Thank you yes my device cepheus. I download rom and find my persist.img but i cant flash. Do you know any solution.
My bootloader unlocked. TWRP installed.
fastboot flash persist persist.img
Sending 'persist' (65536 KB) OKAY [ 1.405s]
Writing 'persist'...
Screen rotate, Compass, Maps not working because has a sensor problem. My sensor is ok i m sure no problem in older version i check it. Problem version based 11.0.3.0QFAMIXM and 9.12.26/27 ROM my device is MI 9