I've download cpu Z, in the sensors menu magnetometer is not present, also in the service menu (tap on the kernel version, you can see all sensors present, but on my mi5 there no magnetometer) it is impossible to see magnetometer, it seem like magnetormeter is not present in my MI5, for me is just a software problem, but i've try with a fastboot flash all but nothing change.