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

Add troubleshooting tip for if systemd doesn't start with WSL #538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RossSmyth
Copy link

@RossSmyth RossSmyth commented Sep 6, 2024

I was having this problem, and this was suggest to me and it worked.
https://matrix.to/#/!apXxbtexmNGJaAryzM:nixos.org/$MR4egL2Tz6dIcnSLk-zRY14fRoj1NN2-7qc5sgJiW9A?via=nixos.org&via=matrix.org&via=beeper.com

I don't know the details of why it works, but it would be good to have this written down.

#527
microsoft/WSL#10050 (comment)

@antoineco
Copy link
Contributor

antoineco commented Sep 17, 2024

Is this only happening on nixos-unstable? Do we have the slightest idea why? Is this because of a newer systemd version that requires cgroups v2?

Potentially related upstream change:

(I can only assume because NixOS 24.05 currently ships with systemd 255.9, which isn't causing issues with the default WSL2 config as far as I can tell.)

@RossSmyth
Copy link
Author

@K900 might know?

@K900
Copy link
Contributor

K900 commented Sep 20, 2024

Yes, systemd 256 requires cgv2. Also, I tried making a dynamic warning for this, but could not find any way to log things to the console during early boot :(

@antoineco
Copy link
Contributor

@K900 thanks!

For whoever is interested in knowing the background for this change, I stumbled upon this:

(Linked from Arch's wiki)

If a warning was to be added to the README, it would be useful to mention:

  • the condition in which the problem occurs (systemd 256, nixpkgs-unstable)
  • the reason for the occurrence (WSL2 has cgroup v1 enabled by default)

@nzbr nzbr added the documentation Improvements or additions to documentation label Oct 13, 2024
@nzbr
Copy link
Member

nzbr commented Oct 13, 2024

Giving a reason in the docs and maybe a link here or to the upstream issue would be nice I think. Also this should maybe have its own heading instead of being mixed in with the general troubleshooting tips (it can stay on the same page though)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants