Skip to content

Instantly share code, notes, and snippets.

@jakelee8
Last active July 12, 2016 21:29
Show Gist options
  • Save jakelee8/9a1a313026246cf41d120ffe8b6a05cb to your computer and use it in GitHub Desktop.
Save jakelee8/9a1a313026246cf41d120ffe8b6a05cb to your computer and use it in GitHub Desktop.
Linux power management

Linux power management and WoL

apt install at ethtool pm-utils

/etc/network/interfaces

iface eth0 inet dhcp
        ethernet-wol g
wol p|u|m|b|a|g|s|d...
    Sets Wake-on-LAN options.  Not all devices support this.  The argument to this option is a string of characters specifying which options to enable.

    p   Wake on PHY activity
    u   Wake on unicast messages
    m   Wake on multicast messages
    b   Wake on broadcast messages
    a   Wake on ARP
    g   Wake on MagicPacket™
    s   Enable SecureOn™ password for MagicPacket™
    d   Disable (wake on nothing).  This option clears all previous options.

Use pm-suspend, pm-suspend-hybrid, or pm-hybernate to respectively suspend, save hybernation state then suspend, or hybernate.

echo 'pm-suspend' | sudo at now + 1 minutes

To configure swsusp:

Append resume=/dev/your_swap_partition to kernel command line.

/etc/default/grub

GRUB_CMDLINE_LINUX="[...] resume=/dev/your_swap_partition"

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment