Fastboot command stucks and goes to disk sleep I am trying to flash recovery in my Poco F1 but fastboot stucks when running fastboot flash recovery recovery.img. Also while running fastboot oem device-info for a second time gets stuck.
➜  ~ fastboot devices   
c7ca2666    fastboot

➜  ~ fastboot oem device-info
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: false
OKAY [  0.001s]
Finished. Total time: 0.001s
➜  ~ fastboot --version      
fastboot version 30.0.5p1-android-tools
Installed as /usr/bin/fastboot
➜  ~ fastboot oem device-info

this is where fastboot gots stuck when I ran fastboot oem device-info for a second time.
When trying fastboot flash recovery recovery.img gives error [Failed] fastboot flash failed no such device. If I try flashing after using fastboot --version, it stuck as described previously.
I tried with both Linux and Windows (Intel CPU) and the problem persists. I have already unlocked bootloader and previously(few months ago) flashed TWRP.
I finally discovered the source of the problem - another process had apparently claimed the USB device. In my case, fwupd was automatically connecting to the device, attempted some kind of USB transfer and failed. However, it didn't release the device, which is why fastboot was stuck and waiting for it to be released.
Stopping the fwupd daemon, fixed the problem.
I've opened a bug report with fwupd here ( https://github.com/fwupd/fwupd/issues/3187 ). Meanwhile, if you want to be able to use fastboot, make sure no other process is using the device.