# Script to disable USB autosleep

**URL:** <https://mangoh.discourse.group/t/script-to-disable-usb-autosleep/238>\
**Category:** mangOH Green\
**Created:** [October 11, 2016, 12:48am UTC](https://mangoh.discourse.group/t/script-to-disable-usb-autosleep/238 "2016-10-11T00:48:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://mangoh.discourse.group/u/davidc)\
**Post date:** [October 11, 2016, 12:48am UTC](https://mangoh.discourse.group/t/script-to-disable-usb-autosleep/238/1 "2016-10-11T00:48:39Z")

</div>

I got pretty sick of this when it was first installed as a default **feature** , so I manually edited the init script to turn it off.  
However, I rapidly got tired of this, and wrote a little script to run once on a WP85 install to disable the **feature**.

Script is attached.

# Install instructions:

1. unpack the script using `gunzip` on linux, or `7zip` on windows.
2. Copy the script to your WP85 device (`scp` on linux, `WinSCP` on windows)
3. run the script:

```auto
./DisableUsbSleep.sh

```

This modifies `/etc/init.d/enable_autosleep.sh` to disable the auto-sleep feature.

# To uninstall:

edit `/etc/init.d/enable_autosleep.sh` and follow the instructions in the comment lines starting with `## modified by DisableUsbSleep.sh (c)Renfell Engineering P/L 2016`

I hope that this is useful to someone.

[DisableUsbSleep.sh](https://mangoh.discourse.group/uploads/short-url/LnQeFnFIbq24tlPLWKDMHe6zwu.sh) (1.3 KB)

ciao, Dave
