| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # Prompt for network interface name |
| 4 | read -p "Enter network interface name: " INTERFACE |
| 5 | |
| 6 | echo "Checking if 'ethtool' is installed" |
| 7 | if ! command -v ethtool &> /dev/null; then |
| 8 | echo "Installing ethtool..." |
| 9 | dnf install -y ethtool |
| 10 | fi |
| 11 | |
| 12 | echo "Disabling Energy Efficient Ethernet (EEE)" |
| 13 | ethtool --set-eee $INTERFACE eee off |
| 14 | |
| 15 | echo "Setting Speed & Duplex to Auto-Negotiation" |
| 16 | ethtool -s $INTERFACE speed 1000 duplex full autoneg on |
| 17 | |
| 18 | echo "Disabling Power Saving Mode for PCI" |
| 19 | if [ -d "/sys/class/net/$INTERFACE/device/power/control" ]; then |
| 20 | echo "on" > /sys/class/net/$INTERFACE/device/power/control |
| 21 | fi |
| 22 | |
| 23 | echo "Disabling Wake-on-LAN (WoL)" |
| 24 | ethtool -s $INTERFACE wol d |
| 25 | |
| 26 | echo "Disabling Low Power Mode and Large Send Offload (LSO)" |
| 27 | ethtool -K $INTERFACE gso off gro off tso off |
| 28 | ethtool -K $INTERFACE lro off |
| 29 | |
| 30 | echo "Current settings for interface $INTERFACE" |
| 31 | ethtool $INTERFACE |
| 32 | ethtool -k $INTERFACE |
| 33 | |
| 34 | echo "Configuration completed" |
db / intel_i225_v_ethernet_adapter_on_linux_fix.sh
Last active 3 months ago
Revision 25bfd806a2c519de5c801b21ca2f40a87e67cf69