-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Windows Version
Microsoft Windows [Version 10.0.22631.6199]
WSL Version
2.5.10.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
6.6.87.2 (custom build)
Distro Version
Ubuntu 25.04
Other Software
- NTP daemon inside WSL (
ntpsec/plucky,now 1.2.3+dfsg1-3) - Windows Time service:
w32time(built-in)
Repro Steps
-
Enable WSL2 mirrored networking in
%UserProfile%\.wslconfig:[wsl2] networkingMode=mirrored
Then restart WSL:
wsl --shutdown -
Stop Windows Time service:
net stop w32time -
In the WSL Ubuntu distro, enable and start
ntpsec:sudo systemctl enable --now ntpsec.service -
Start Windows Time service and attempt a resync:
net start w32time w32tm /resync /force w32tm /query /status
-
Workaround: disable
ntpsecinside WSL and retry Windows sync:sudo systemctl disable --now ntpsec.service
Then on Windows:
w32tm /resync /force w32tm /query /status
Expected Behavior
I’d expect the Windows host time sync (w32time) to keep functioning normally. If this host/guest combination (especially with mirrored networking) isn’t intended to work, a note in docs would help since the symptom presents as a host failure with no obvious WSL linkage.
Actual Behavior
With mirrored networking enabled and ntpsec.service running in WSL, Windows Time service fails to sync and the host clock drifts:
C:\Windows\System32>w32tm /resync /force
Sending resync command to local computer
The computer did not resync because no time data was available.I'm assuming it's just ntpsec conflicting with this:
The built-in W32Time NTP client can only use UDP 123 as the source port.
There appears to be a race condition between Windows Time service and ntpsec, and whichever one binds first will cause the other to fail. On my system, ntpsec has been consistently winning for at least a few months.
Diagnostic Logs
No response