This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Power management/Ethernet

From Gentoo Wiki (test)
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

BIOS

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

Permanent Change

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"

or using a Systemd link file.

FILE /etc/systemd/network/50-wired.link
[Match]
MACAddress=ff:ff:ff:ff:ff:ff
# your lan mac addres ofc, use ifconfig to find out.

[Link]
WakeOnLan=off


Throttle Gigabit-Ethernet

Gigabit-Ethernet needs more power than Fast-Ethernet. If you don't use the greater bandwidth, you can throttle your connection to Fast-Ethernet. For it install sys-apps/ethtool:

root #emerge --ask sys-apps/ethtool

Now you can throttle the connection:

root #ethtool -s eth0 autoneg off speed 100

If you want to always throttle the connection, add command to ethtool_change_INTERFACE string in /etc/conf.d/net file.