Reduce network device speed to 10M for WoL

In previous Arch/kernel versions, the network device speed was
automatically set to the lowest possible upon poweroff when WoL was
enabled.

Latest versions do keep the network device to its standard speed (1000M
for example), which consumes some useless power when computer is powered
off and WoL enabled.

Force speed lowering for WoL.
But restore it before continuing boot, when devices are unlocked,
otherwise it remains as-is.

Make it an option, to select the wanted speed, or leave it as-is.
This commit is contained in:
Julien Coloos
2026-07-12 20:20:32 +02:00
parent cdc0b4c427
commit d69f71b561
3 changed files with 25 additions and 1 deletions

View File

@@ -52,6 +52,12 @@ Some options can be set in `/etc/initcpio/sshcs_env` (file is sourced in initram
- default: `g` (MagicPacket™)
- usually WoL is disabled once in initramfs shell
- set empty to not change network device WoL setting
* `sshcs_opt_net_speed`: speed to set on network device
- default: `10`
- full duplex is enabled, and auto-negociation disabled
- latest Arch/kernel tend to keep the speed at 1000M even during WoL
- this only applies to boot phase and persists for WoL: when unlocking devices, the network is reconfigured before the OS is fully ready
- set `0` to not change network device speed
* `sshcs_opt_timeout_ipconfig`: time (in seconds) to configure IP
- default: `10`
* `sshcs_opt_listen`: SSH listening port