Ding ding ding, we have a winner, thank you so much!!.
sudo echo on | sudo tee /sys/bus/usb/devices/4-1/power/control
Does the trick… Now I only need to get it running on boot, but the script and service I made just won’t run. I made the following script:
poweron.sh:
#!/bin/sh
echo on > /sys/bus/usb/devices/4-1/power/control
exit 0
#"$@"
I did a sudo chmod +x poweron.sh to make it executable.
The service that goes along with it “power-usb.service”
[Unit]
Description=ethernetpower
[Service]
ExecStart=/usr/bin/usbpower/power.sh
[Install]
WantedBy=multi-user.target
And I enabled and started the service with systemctl. But it still won’t run on startup.
Edit: The script was run to early in boot, all I needed to do was add a little sleep to the script:
#!/bin/sh
sleep 10
echo on > /sys/bus/usb/devices/4-1/power/control
exit 0
#"$@"