This project provides a script and systemd services for automatic monitoring and recovery of Ethernet adapters in case of PCIe link issues. It is designed for Arch Linux and compatible distributions.
- Automatically resets the Ethernet adapter upon detecting a failure.
- Checks network availability using
ping. - Logs all actions for easy debugging.
- Uses a systemd timer for periodic checks.
-
Clone the repository:
git clone https://github.com/Memoraike/ethernet-reset.git cd ethernet-reset -
Build and install the package:
makepkg -si
After installation, activate the timer:
sudo systemctl enable check_ethernet.timer
sudo systemctl start check_ethernet.timerethernet-reset/
├── PKGBUILD # Build script for the package
├── README.md # Documentation
├── check_and_reset_ethernet.sh # Main script
├── check_ethernet.service # systemd service
├── check_ethernet.timer # systemd timer
To uninstall the package, use pacman:
sudo pacman -Rns ethernet-resetThe script logs its actions to /var/log/reset_ethernet.log.
To check the status of the timer and service, use:
journalctl -u check_ethernet.timer
journalctl -u check_ethernet.serviceIf you have suggestions for improvement or encounter a bug, feel free to open an issue in the repository or submit a pull request.