1

echo on | sudo tee /sys/bus/usb/devices/*/power/level > /dev/null

The command above is used to keep USB power on (Turns off USB power-saving). I execute the command every time I log in to Ubuntu because I have a USB audio device and it makes an annoying sound every time USB turns on/off.

The question is, how to keep the configurations which this command produce without the need to execute it every time?

  • 1
    you can read here https://askubuntu.com/questions/814/how-to-run-scripts-on-start-up to run script at start-up. hope this works. – ryuffhant Dec 03 '17 at 14:37
  • Running the script at start up wont be a good solution. The configuration this script produces will be rewritten after replugging the USB device. – Manar Zaboub Dec 03 '17 at 22:49
  • https://askubuntu.com/questions/1140925/how-can-i-disable-usb-autosuspend-on-ubuntu-18-04?rq=1 could be a dupe, although it is more specific than this question – Jeremy French Jan 10 '20 at 11:16

0 Answers0