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

[0.68.2] systemd user session destroys /mnt/wslg/runtime-dir #8918

Closed
1 of 2 tasks
cerebrate opened this issue Sep 29, 2022 · 4 comments
Closed
1 of 2 tasks

[0.68.2] systemd user session destroys /mnt/wslg/runtime-dir #8918

cerebrate opened this issue Sep 29, 2022 · 4 comments

Comments

@cerebrate
Copy link

Version

Microsoft Windows [Version 10.0.22000.978]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.62.1-20220921-1-microsoft-custom-WSL2+

Distro Version

Debian bookworm/sid

Other Software

No response

Repro Steps

  1. Start WSL with systemd enabled.
  2. Observe that /run/user/1000 has /mnt/wslg/runtime-dir mounted over it.
  3. Start a systemd user session; for example, with systemd-machined installed, run sudo machinectl shell avatar@host

Expected Behavior

The /run/user/1000 and /mnt/wslg/runtime-dir directories should have identical contents, consisting of both user session-related and WSLg-related files and sockets.

Actual Behavior

  • The /run/user/1000 directory now has only contents belonging to the user session, and none of those pertaining to WSLg.
  • The /mnt/wslg/runtime-dir directory is now empty.

This appears to be the result of user-runtime-dir@.service not understanding that the user directory is already a mount point.

Diagnostic Logs

No response

@cerebrate
Copy link
Author

See also note to #8842.

@cerebrate cerebrate changed the title systemd user session destroys /mnt/wslg/runtime-dir [0.68.2] systemd user session destroys /mnt/wslg/runtime-dir Sep 29, 2022
@cerebrate
Copy link
Author

As a workaround, this can be avoided by creating the following file as /lib/systemd/system/user-runtime-dir@.service.d/override.conf:

[Unit]
ConditionPathIsMountPoint=!/run/user/%i

Which will bypass attempting to create a new user runtime directory for any uids which already have one mounted.

@aki-k
Copy link

aki-k commented May 24, 2023

@cerebrate Amazing thank you very much. I had a hard time figuring this out (/mnt/wslg/runtime-dir being emptied and wayland stopping working)

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

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