]> ### 2026.11.11 - The Plugins page now shows the plugin's name and a description instead of only "usb-sleep". ### 2026.10.27 - Initial release. - Lets drives behind USB-SATA bridges (for example the WD Elements Desktop, USB ID 1058:25a3) spin down. These bridges answer hdparm with sense data 00/1d, so Unraid's sdspin reported "sdspin /dev/sdX down: 1" and emhttpd stopped spinning the drive down and kept polling it. - Installs a wrapper in place of /usr/local/sbin/sdspin (Unraid's script is kept as sdspin.orig). When sdspin.orig reports an error, the wrapper reads the real power state with smartctl -n standby, which does not wake the drive. Drives that already work are not affected. - Drives that already failed a spin-down need a reboot or a re-plug. Removing the plugin restores Unraid's sdspin. rm -f &plugdir;/README.md **USB Sleep** Lets drives behind USB-SATA bridges spin down. Some bridges answer Unraid's spin-down commands in a way Unraid reads as a failure, so it stops spinning those drives down; this plugin reads their real power state instead. &1) case "$2" in down) [[ $POWER =~ "STANDBY mode" ]] && exit 0 ;; up) [[ $POWER =~ "Power mode "(is|was): ]] && exit 0 ;; *) [[ $POWER =~ "Power mode "(is|was): ]] && exit 0 [[ $POWER =~ "STANDBY mode" ]] && exit 2 ;; esac exit 1 ]]> # Keep Unraid's sdspin as sdspin.orig; never wrap our own wrapper. grep -q "usb-sleep" &sbin;/sdspin || mv &sbin;/sdspin &sbin;/sdspin.orig install -m 0755 &plugdir;/sdspin &sbin;/sdspin echo "usb-sleep &version; installed. Drives that already failed a spin-down need a reboot or re-plug." [ -f &sbin;/sdspin.orig ] && mv -f &sbin;/sdspin.orig &sbin;/sdspin rm -rf &plugdir; /boot/config/plugins/&name; echo "usb-sleep removed, Unraid's sdspin restored."