The default step counting algorithm uses the accelerometer data of your phone to calculate steps. However, on Mi’s customized Android systems, for the purpose of battery saving, the default setting stops providing that data when screen is locked. Follow the instruction below can prevent this issue.
1) Open Settings and choose Battery & performance
Within Battery & performance, choose Manage apps battery usage
Choose apps > Find Pacer > choose “No restrictions”
2) Settings > Permissions > Autostart > Find Pacer and turn it on