Ubuntu 20.04 control USB when powered off

userHead dablitz1 2021-05-22 02:52:17 1482 Views0 Replies
I have a LiPo battery plugged into the battery port underneath my Alpha. to conserve on battery life when not powered on I would like to turn off the USB bus completely

this is normally done within linux with this command:

sudo sh -c "echo 'suspend' > /sys/bus/usb/devices/usb2/power/control"

this would go into a shutdown script but the command itself is not functioning

and then on boot run this

sudo sh -c "echo 'on' > /sys/bus/usb/devices/usb2/power/control"

unfortunately this is not working at all. Can anyone provide me with some insight on how I can get this done?