Skip to content

Conversation

@OneBlue
Copy link
Collaborator

@OneBlue OneBlue commented Oct 17, 2025

Summary of the Pull Request

This change adds logic to mask systemd-networkd-wait-online.service during boot. That unit will always time out since WSL's interfaces are unmanaged by systemd and causes various issues during boot.

PR Checklist

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@OneBlue OneBlue requested a review from a team as a code owner October 17, 2025 19:41
@OneBlue OneBlue requested review from benhillis, Copilot, craigloewen-msft and justus-camp-microsoft and removed request for Copilot October 17, 2025 19:41
@dhtzs
Copy link

dhtzs commented Oct 18, 2025

@OneBlue Nice improvement! Just wondering - since this masks systemd-networkd-wait-online.service to avoid boot delays, would it maybe make sense to also mask NetworkManager-wait-online.service for setups where NetworkManager is used instead?

@OneBlue
Copy link
Collaborator Author

OneBlue commented Nov 20, 2025

@OneBlue Nice improvement! Just wondering - since this masks systemd-networkd-wait-online.service to avoid boot delays, would it maybe make sense to also mask NetworkManager-wait-online.service for setups where NetworkManager is used instead?

@dhtzs: Potentially ! I haven't seen that specific unit causing issues in WSL so far. If you hit boot delays because of that unit, feel free to create an issue with repro instructions so we can look into it

@OneBlue OneBlue merged commit f759971 into master Nov 20, 2025
5 checks passed
@dhtzs
Copy link

dhtzs commented Nov 20, 2025

@OneBlue Nice improvement! Just wondering - since this masks systemd-networkd-wait-online.service to avoid boot delays, would it maybe make sense to also mask NetworkManager-wait-online.service for setups where NetworkManager is used instead?

@dhtzs: Potentially ! I haven't seen that specific unit causing issues in WSL so far. If you hit boot delays because of that unit, feel free to create an issue with repro instructions so we can look into it

Hi @OneBlue,

I am indeed encountering boot issues specifically related to NetworkManager-wait-online.service.

When starting WSL, I receive the error: wsl: Failed to start the systemd user session for 'dhtzs'. See journalctl for more details.. Investigating with sudo systemctl status --failed shows that the NetworkManager service is timing out (exiting with status 1 after 60s):

× NetworkManager-wait-online.service - Network Manager Wait Online
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Thu 2025-11-20 19:44:37 EET; 3min 34s ago
    Process: 922 ExecStart=/usr/bin/nm-online -s -q (code=exited, status=1/FAILURE)
...
Nov 20 19:43:37 Dimitris systemd[1]: Starting NetworkManager-wait-online.service - Network Manager Wait Online...
Nov 20 19:44:37 Dimitris systemd[1]: NetworkManager-wait-online.service: Main process exited, code=exited, status=1/FAI>

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

[keyfile]
unmanaged-devices=*

Since this mirrors the issue with systemd-networkd-wait-online.service, it might be worth masking NetworkManager-wait-online.service by default as well.

Let me know if you'd prefer I open a new issue with this detail or if this comment is sufficient!

@OneBlue
Copy link
Collaborator Author

OneBlue commented Nov 22, 2025

Let me know if you'd prefer I open a new issue with this detail or if this comment is sufficient!

Thank you for doing this ! Yes please open an issue so we can track it. I'll make a PR for this when I get a minute

benhillis added a commit that referenced this pull request Nov 26, 2025
* wslsettings: allow OOBE window to close with escape key (#13686)

* wslsettings: allow OOBE windows to close with escape key

* fix memory leak

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Localization change from build: 133610492 (#13704)

Co-authored-by: WSL localization <noreply@microsoft.com>

* wslsettings: fix OOBE text truncation at 200% text scaling (#13693)

* wslsettings: fix OOBE text truncation at 200% text scaling

Add text scaling factor to window resize calculation and make hero image height responsive to text scaling. Increase minimum window size for better accessibility. Fix MAS 1.4.4 compliance for OOBE dialog.

* pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* wslsettings: add underlines to links in about page (#13703)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* .clang-format: add InsertBraces: true and minor fix to FormatSource.ps1 (#13712)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Localization change from build: 134015316 (#13731)

Co-authored-by: WSL localization <noreply@microsoft.com>

* wslsettings: ensure selected setting is auto-expanded and selected (#13689)

* wslsettings: ensure selected setting is auto-selected

Implement keyboard focus management for SettingsExpander controls across settings pages. This resolves an accessibility issue reported internally.

* add asserts

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* build: fix minor compiler errors when building with VS2026 (#13744)

* build: fix minor compiler errors when building with VS2026

* s

* use VS2022 for clang format and cross compiling

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* chore(distributions): Almalinux auto-update - 20251119 12:04:35 (#13743)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Mask systemd-networkd-wait-online.service during boot (#13611)

* deps: update a number of NuGet packages to the latest available versions (#13728)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* Notice change from build: 134267142 (#13751)

Co-authored-by: WSL notice <noreply@microsoft.com>

* Add *.slnx to .gitignore (#13754)

* Fix service crash when collecting a linux crash dump when maxCrashDumpCount is set to 0 (#13755)

* Fix service crash when collecting a linux crash dump when maxCrashDumpCount is set to 0

* Move the check inside the function

* cleanup: VirtioNetworking refactoring (#13760)

* cleanup: update VirtioNetworking class to not rely on the WslCoreConfig struct

* cleanup: simplify VirtioNetworking construction

* remove old constructor and other cleanup

* more minor cleanup

* string cleanup in HandleVirtioModifyOpenPorts

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* cleanup: switch from Microsoft::WRL::ComPtr to wil::com_ptr (#13767)

* cleanup: switch from Microsoft::WRL::ComPtr to wil::com_ptr

* reformat

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

* chore(distributions): Almalinux auto-update - 20251124 17:13:02 (#13780)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Notice change from build: 134527933 (#13782)

Co-authored-by: WSL notice <noreply@microsoft.com>

* cleanup: VirtioNetworking refactoring to be more portable (#13783)

* cleanup: VirtioNetworking refactoring to be more portable

* more refactoring

* make m_guestDeviceManager private

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Blue <OneBlue@users.noreply.github.com>
Co-authored-by: WSL localization <noreply@microsoft.com>
Co-authored-by: AlmaLinux Autobot <107999298+almalinuxautobot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants