Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有个wsl的问题想请教一下 #1

Closed
Jekinnnnnn opened this issue Nov 27, 2024 · 5 comments
Closed

有个wsl的问题想请教一下 #1

Jekinnnnnn opened this issue Nov 27, 2024 · 5 comments

Comments

@Jekinnnnnn
Copy link

不好意思,我在主页上没找到你的邮箱,只能开个不相关的issue。
我留意到你提了下面这个issue:microsoft/WSL#11318
我现在也有一样的问题,但是我尝试了在.wslconfig中[wsl2]下配置了hv_utils.timesync_implicit=0,没有起作用。
不知道你当时是怎么解决这个问题的,现在还能用吗?
我的是Debian
WSL 版本: 2.3.26.0
内核版本: 5.15.167.4-1
WSLg 版本: 1.0.65
MSRDC 版本: 1.2.5620
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.26100.1-240331-1435.ge-release
Windows 版本: 10.0.22631.4460

@abtswath
Copy link
Owner

刚试了下,我是可以生效的

我的 WSL 版本:
WSL 版本: 2.3.26.0
内核版本: 5.15.167.4-1
WSLg 版本: 1.0.65
MSRDC 版本: 1.2.5620
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.26100.1-240331-1435.ge-release
Windows 版本: 10.0.22631.4460

你可以 cat /proc/cmdline 检查下启动参数中是否包含 hv_utils.timesync_implicit=0

root@abtswath:~# cat /proc/cmdline
initrd=\initrd.img WSL_ROOT_INIT=1 panic=-1 nr_cpus=20 hv_utils.timesync_implicit=1 console=hvc0 debug pty.legacy_count=0 WSL_ENABLE_CRASH_DUMP=1 hv_utils.timesync_implicit=0

或者排查下是不是有 ntpsystemd-timesyncd 服务同步了时间

@Jekinnnnnn
Copy link
Author

我的是

initrd=\initrd.img WSL_ROOT_INIT=1 panic=-1 nr_cpus=2 hv_utils.timesync_implicit=1 cgroup_no_v1=all console=hvc0 debug pty.legacy_count=0 WSL_ENABLE_CRASH_DUMP=1

我的是这样的,我看你有两个hv_utils.timesync_implicit,而我只有1个,那个应该是默认参数,难道是我wslconfig配置的问题?
贴一下我的config

[wsl2]
processors=2
memory=4GB
swap=8GB
networkingMode=mirrored
swapFile=D:\\server\\WslSwap.vhdx
firewall=false
vmIdleTimeout=-1
hv_utils.timesync_implicit=0

@abtswath
Copy link
Owner

内核启动参数是写在 kernelCommandLine 配置里的

https://learn.microsoft.com/zh-cn/windows/wsl/wsl-config#main-wsl-settings

@abtswath
Copy link
Owner

内核启动参数是写在 kernelCommandLine 配置里的

https://learn.microsoft.com/zh-cn/windows/wsl/wsl-config#main-wsl-settings

[wsl2]
kernelCommandLine="hv_utils.timesync_implicit=0"

@Jekinnnnnn
Copy link
Author

可以了感谢。

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

No branches or pull requests

2 participants