when I change for android Oreo I did a clean installation cache, dalvin, data and internal in the previous update everything worked fine. in this I have no sensors or rotation
Enviado desde mi MI 5 mediante Tapatalk
This problem seems to happen on rare occasions when the persist.img is messed up.
You can try reflashing the ROM you just flashed.
If that doesn't help, either find the persist.img for your device and flash it via TWRP, or fastboot flash an official Xiaomi rom and start from the beginning.
I posted somewhere a link about this persist.img thing, will try to find it.