cant do factory reset or hard reset on mi 5x I tried to factory reset my mi 5x phone through settings but after clicking reset device, it just turn off the phone and restart it without changing anything on the phone.

And when I try to do a hard reset, after holding Vol down + power button, this screen shows up:



And after a few seconds the phone turn off again.

How can I fix this problem?
Reading the comments above, I can think  your volume up button may be broken? But remember, you can perform  a factory reset from the Fastboot mode too, simply connect your phone to the computer, install Minimal ADB &amp; Fastboot (Windows), run it then type fastboot -w[press enter] the phone should be reset. 

Also ADB lets you do many things on your phone including factory reset: 


Enable ADB (USB Debugging) from the Developer's menu
Connect the phone to the computer
Run Minimal ADB &amp; Fastboot
Type adb shell [press enter]
Type wipe data [press enter] 


You're done. 

ADB can let you boot in recovery mode and perform factory reset manually: 


Type adb reboot recovery [press enter]


PS: Don't forget to install drivers to let your phone be detected by the computer. 

Not on Windows ? Check this question related to a minimal installation of ADB for all operating systems.

Check also our ADB tag-wiki