# Ethernet keeps deactivating and reactivating randomly

**URL:** <https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851>\
**Category:** General system\
**Created:** [October 18, 2021, 9:55pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851 "2021-10-18T21:55:02Z")\
**Posts on this page:** 1\
**Showing post:** 60

<div class="post-metadata">

**Author:** ![Tiget1998](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/t/22d042/32.png) [@Tiget1998](https://forum.endeavouros.com/u/Tiget1998)\
**Post date:** [October 20, 2021, 6:48pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/60 "2021-10-20T18:48:09Z")

</div>

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:

```auto
#!/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”

```auto
[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:

```auto
#!/bin/sh
sleep 10
echo on > /sys/bus/usb/devices/4-1/power/control 
exit 0

#"$@"

```

---

_[View the full topic](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851)._
