# 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:** 6\
**Page:** 4

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [October 20, 2021, 7:02pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/61 "2021-10-20T19:02:08Z")

</div>

Try this and see if it works:

```auto
[Unit]
Description=ethernetpower

[Service]
Type=simple
ExecStart=/usr/bin/usbpower/power.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

```

`sudo systemctl enable power-usb.service`

---

<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, 7:08pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/62 "2021-10-20T19:08:14Z")

</div>

I fixed it by adding some sleep to the script as it takes 5ms to run the script and it runs it too early on boot.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [October 20, 2021, 8:00pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/63 "2021-10-20T20:00:30Z")

</div>

I was pretty sure it had something to do with power management on usb.

Edit: Glad it is resolved for you.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [October 20, 2021, 8:12pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/64 "2021-10-20T20:12:11Z")

</div>

You could have also added it here for startup? “This line can be added to /etc/rc.local to have it executed at startup.” But if the script works then you’re good.

---

<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, 8:17pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/65 "2021-10-20T20:17:09Z")

</div>

Script works fine, problem now is that whenever I disconnect my usb hub, the power setting resets again so I’m trying to set a rule where it runs the script every time it detects my usb hub connects.

So far I’m making limited progress, I added this to a /etc/udev/rules.d/99-usbc-connect.rules

```auto
KERNEL=="sd*", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="8153", RUN+="/usr/bin/usbpower/poweron.sh"

```

But so far it won’t work just yet

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [October 22, 2021, 8:18pm UTC](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851/66 "2021-10-22T20:18:11Z")

</div>

Closed on October 22, 2021, 8:18pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

[Previous page](https://forum.endeavouros.com/t/ethernet-keeps-deactivating-and-reactivating-randomly/18851.md?page=3)
