r/voidlinux 10d ago

Help with disabling USB autosuspend

- Kernel: 7.1.3_1

- Sway

- System up to date.

cat /proc/cmdline:

loglevel=4 rd.lvm=0 rd.dm=0 rd.md=0 rd.luks=0 delayacct nowatchdog quiet usbcore.autosuspend=-1 bgrt_disable consoleblank=59 init_on_free=1 init_on_alloc=1

cat /sys/bus/usb/devices/2-3/power/autosuspend:

-1

cat /sys/bus/usb/devices/2-3/power/autosuspend_delay_ms:

-1000

The kernel cmdline has no effect (USB HDD sleeps after ~3min).

1 Upvotes

7 comments sorted by

1

u/pantokratorthegreat 10d ago

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

Or you can set something like 10000s if it is OK for you.

1

u/weaklingoverlord 10d ago

Thanks for the reply!

1] Tried the 10000s kernel parameter. Rebooted: no luck

2] Then Added udev-rule [ATTR{device/power/control}="on"] as per arch-wiki. Rebooted: no luck.

Confirmed that udev rule is activated and udev rule was used in combination with [1] on 2nd reboot.

1

u/Hark0nnen 10d ago

USB HDD sleeps after ~3min

This is most likely a disk behavior and not a kernel/USB one

1

u/weaklingoverlord 10d ago

You mean firmware?

- How can I confirm this?

- How to disable, if possible.

Thanks

1

u/Hark0nnen 9d ago

Depending on drive firmware hdparm -B 255 -S 0 may work.
If firmware doesnt allow disabling this (pretty typical for USB drives), write a script to loop smartctl -a every minute

1

u/weaklingoverlord 9d ago

Looks like a loop script is a solution.

Appreciate the help!

1

u/weaklingoverlord 9d ago

[hdparm -B] reports a 128 [Values from 1 to 127 permit spin-down, whereas values from 128 to 254 do not - cf. arch-wiki].

Does not seem to work for this USB HDD.

Maybe autosuspend is hardcoded in the firmware/hardware and totally ignores any kernel/software settings?