Skip to content

Mask NetworkManager-wait-online.service during boot to prevent timeouts #13772

Closed

Description

Windows Version

Microsoft Windows [Version 10.0.26200.7171]

WSL Version

2.6.2.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2

Distro Version

Ubuntu 25.10

Other Software

No response

Repro Steps

  1. Enable systemd in WSL.
  2. Install/use a distro that uses NetworkManager.
  3. Boot WSL.

Expected Behavior

WSL boots without delay or error.

Actual Behavior

WSL boot is delayed, and the following error eventually appears:
wsl: Failed to start the systemd user session for 'username'. See journalctl for more details.

Diagnostic Logs

This issue is similar to the one addressed in PR #13611 regarding systemd-networkd-wait-online.service.

Since WSL interfaces are unmanaged by systemd/NetworkManager, this service waits for an event that never happens, causing a 60-second timeout during boot.

I was able to workaround this by configuring NetworkManager to stop managing devices via /etc/NetworkManager/conf.d/exclude.conf:

[keyfile]
unmanaged-devices=*

Per the discussion in PR #13611, it is suggested to mask NetworkManager-wait-online.service by default in WSL to avoid this delay.

Activity

  1. github-actions commented on Nov 22, 2025

    @github-actions
    Contributor

    Logs are required for review from WSL team

    If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
    Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

    How to collect WSL logs

    Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

    Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
    Set-ExecutionPolicy Bypass -Scope Process -Force
    .\collect-wsl-logs.ps1
    

    The script will output the path of the log file once done.

    If this is a networking issue, please use collect-networking-logs.ps1, following the instructions in Collect WSL logs for networking issues

    Once completed please upload the output files to this GitHub issue.

    See Collect WSL logs (recommended method).

    If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

  2. added 2 commits that reference this issue on Feb 25, 2026
    459efc6
    22d70a0
  3. added a commit that references this issue on Feb 26, 2026
    cb35b51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions