# USB Sleep

USB Sleep is an Unraid plugin that lets USB drives behind USB-SATA bridges spin down when Unraid's default spin-down falsely reports failure, for users whose external drives would otherwise stay awake. It is open source and self-hosted, installable on Unraid.

Canonical page: https://ourlocalhost.com/app/7634/usb-sleep

## Description

USB Sleep is an Unraid plugin that lets USB drives behind USB-SATA bridges spin down when Unraid's default spin-down falsely reports failure, for users whose external drives would otherwise stay awake. It wraps Unraid's sdspin utility and uses smartctl to read the real power state when the original spin-down command returns a misleading failure, so affected drives can sleep while working drives remain unaffected. Removing the plugin restores Unraid's default sdspin.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

41/100 (Fair), based on 3 of 4 factors.
- Maintained: 75 (last commit 9 days ago)
- Popular: 0 (0 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)

## Links

- Unraid: https://ca.unraid.net/apps/app_75ad8609b9b86750
- GitHub: https://github.com/andrebrait/unraid-usb-sleep

## Common questions

### How do I install USB Sleep on Unraid?

Open the Unraid web UI, go to Plugins → Install Plugin, and paste the USB Sleep plugin file link from the project's installation section.

### What if emhttpd already logged a spin-down error for a drive before installing?

Reboot, or unmount and re-plug the drive so emhttpd detects it again. Otherwise emhttpd will not retry spinning it down.

### How can I verify that a USB bridge drive has actually spun down?

Run sdspin sdX down and check for exit code 0. While spun down, sdspin sdX status should return exit code 2.

### Will it affect drives that already spin down correctly?

No. Any result other than exit code 1 from the original sdspin is passed through unchanged, and the plugin only checks the power state when the original reports an error.

### Why might the drive still wake up after the plugin is installed?

The plugin only fixes the spin-down command. Periodic access, such as the ZFS Master plugin refreshing pool history every 30 seconds while a web UI tab is open, can wake the drive.

---
Source: Our Local Host (https://ourlocalhost.com/app/7634/usb-sleep), the self-hosted and open-source app directory.
