Power management/Ethernet

From Gentoo Wiki
Jump to:navigation Jump to:search

This article describes the setup of power management of Ethernet devices.

Disable Wake-on-LAN

With Wake-on-LAN (WOL) the computer's network card will remain powered to monitor for a 'magic' packet that will instruct it to wake the computer. To save some power WOL can be disabled.

ethtool is needed in order to perform this action if it's not already installed:

root #emerge --ask sys-apps/ethtool

The current WOL setting can be checked with:

root #ethtool eth0 | grep -i wake
        Supports Wake-on: pumbg
        Wake-on: g

Disable WOL via:

root #ethtool -s eth0 wol d


Motherboards with on-board Ethernet devices usually have an option to disable WOL (if it's supported at all) in the BIOS.

Permanent Change

OpenRC users should add the following string to the /etc/conf.d/net configuration file to disable WOL for a specific network interface using ethtool:

FILE /etc/conf.d/net
ethtool_change_eth0="wol d"

systemd users should edit the /etc/systemd/network/50-wired.link file instead:

FILE /etc/systemd/network/50-wired.link
# your lan mac addres ofc, use 'ip link' to find out.


Throttle Gigabit-Ethernet

Gigabit-Ethernet needs more power than Fast-Ethernet. Users that don't use the greater bandwidth can throttle their connection to Fast-Ethernet. First, they should install sys-apps/ethtool:

root #emerge --ask sys-apps/ethtool

Now they can throttle their connection:

root #ethtool -s eth0 autoneg off speed 100

OpenRC users can always throttle their connection at boot by adding the previous command to the ethtool_change_eth0 variable in the /etc/conf.d/net configuration file:

FILE /etc/conf.d/net
ethtool_change_eth0="autoneg off speed 100"