Skip to content

Instantly share code, notes, and snippets.

@czuger
Last active August 24, 2025 14:38
Show Gist options
  • Select an option

  • Save czuger/d9bfc9fdf8a12ad475381dca078c2b4e to your computer and use it in GitHub Desktop.

Select an option

Save czuger/d9bfc9fdf8a12ad475381dca078c2b4e to your computer and use it in GitHub Desktop.
Turn off deep sleep for an external USB HDD on raspberry pi
sudo vim /boot/firmware/cmdline.txt
# At the end of the command add
usbcore.autosuspend=-1 usb-storage.quirks=174c:55aa:u
# reboot
# Test with
cat /sys/module/usbcore/parameters/autosuspend
# Should show: -1
dmesg | grep -i "174c\|55aa\|uas\|quirk"
# Should see UAS is ignored for this device, using usb-storage instead
# Edit the hdparm configuration file:
sudo vim /etc/hdparm.conf
# Add these lines at the end of the file:
/dev/sda {
spindown_time = 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment