Skip to content

feat(wsl-conf): add boot.initTimeout option - #1078

Merged
nzbr merged 1 commit into
nix-community:mainfrom
karaolidis:boot-init-timeout
Jul 12, 2026
Merged

feat(wsl-conf): add boot.initTimeout option#1078
nzbr merged 1 commit into
nix-community:mainfrom
karaolidis:boot-init-timeout

Conversation

@karaolidis

Copy link
Copy Markdown
Contributor

Adds a wsl.wslConf.boot.initTimeout option, mapping to the [boot] initTimeout key in wsl.conf.

WSL parses this key in src/linux/init/WslDistributionConfig.cpp (ConfigKey("boot.initTimeout", BootInitTimeout), default 10 * 1000 ms), but is undocumented.

It bounds how long WSL waits for init to become ready at boot and, since microsoft/WSL#13552, how long systemctl poweroff is given to run the shutdown sequence before WSL forces reboot(RB_POWER_OFF) (see also microsoft/WSL#13493).

Raising it lets services with longer ExecStop handlers shut down cleanly.

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
@github-actions github-actions Bot added the enhancement New feature or request label Jun 23, 2026
@karaolidis
karaolidis marked this pull request as ready for review June 25, 2026 16:13
@nzbr

nzbr commented Jul 12, 2026

Copy link
Copy Markdown
Member

Oh neat! Good find!
This should be helpful against user-sessions not working if init takes too long

@nzbr
nzbr merged commit b70fe05 into nix-community:main Jul 12, 2026
35 checks passed
@karaolidis
karaolidis deleted the boot-init-timeout branch July 12, 2026 22:24
nzbr pushed a commit that referenced this pull request Jul 12, 2026
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
nzbr pushed a commit that referenced this pull request Jul 12, 2026
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants