You are not logged in.

#1 2022-05-13 19:05:35

nandi
Member
Registered: 2021-07-16
Posts: 25

disable usb auto suspend

I have 2 usb hard drives
One of them keeps unmount itself and i have to manually remount. After some searching i figured out the usb auto suspend does the unmount.
Tried google most people was talking about disabling auto suspend for 1 specific device.
I want to disable completly.
Do you guys know how to do it
on Debian 10?

Offline

#2 2022-05-13 21:46:41

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 978

Re: disable usb auto suspend

You're probably better off doing it twice for each one specific device to be honest, it's certainly better in terms of overall power usage, but here goes anyway:

sudo nano  /etc/udev/rules.d/50-usb_power_save.rules

Make it as follows:

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on"

The other available value being "auto" instead of "on" which would enable it in all cases.

The other way is to add usbcore.autosuspend=-1 as a kernel in /etc/default/grub by editing GRUB_CMDLINE_LINUX=  & then sudo update-grub

If you merely want to disable it until the next reboot:

echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend

There's probably more ways, but 3 ought to do.

References:
https://www.kernel.org/doc/Documentatio … gement.txt

https://wiki.archlinux.org/title/Power_management


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Online

#3 2022-05-13 22:16:56

nandi
Member
Registered: 2021-07-16
Posts: 25

Re: disable usb auto suspend

I tried two things already
added the following to crontab.
@reboot echo 'on' > '/sys/bus/usb/devices/1-2/power/control';
And did run the following
modprobe usbcore autosuspend=-1
Dont know if it did the trick.
I will try your way as well, it looks more neat.

Offline

Board footer

Powered by FluxBB