I would appreciate it guys if you help me with disabling auto suspend of USB devices in Ubuntu 16.04 on laptop.

The USB is an external audio device, in order to keep the USB device always on I usually do:

echo "on" | sudo tee /sys/bus/usb/devices/1-1/power/control

It appeared that a permanent fix would be using udev to set the USB device power/control attribute. I made a new rule and indicated that its working through writing to a file:

ACTION=="add", SUBSYSTEM=="usb", RUN+="/bin/sh -c '/bin/echo auto > /home/manar/textfile'" ,ATTR{idProduct}=="0xAAAA", ATTR{idVendor}=="0xBBBB"

Then I rewrote the rule below to set the power/control attribute:

ACTION=="add", SUBSYSTEM=="usb" ,ATTR{idProduct}=="0xAAAA", ATTR{idVendor}=="0xBBBB", TEST=="power/control" ATTR{power/control}="on"

Unfortunately the rule doesn't appear to be doing its job because the value in /sys/bus/usb/devices/1-1/power/control is auto, and the device actually turns off when idle.

Can somebody please tell me what have I been missing?

Thank you very much.


udev test indicated a permission problem while setting the corresponding attribute, I assume now that udev usage is rather different in arch than in Ubuntu.

Finally I have found a work-around to keep USB on from this guy https://askubuntu.com/a/748864/310166

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.