You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[0.68.2] systemd user session destroys /mnt/wslg/runtime-dir #8918
Observe that /run/user/1000 has /mnt/wslg/runtime-dir mounted over it.
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 [email protected] not understanding that the user directory is already a mount point.
changed the title [-]systemd user session destroys /mnt/wslg/runtime-dir[/-][+][0.68.2] systemd user session destroys /mnt/wslg/runtime-dir[/+]on Sep 29, 2022
Alistair Young (@cerebrate) Amazing thank you very much. I had a hard time figuring this out (/mnt/wslg/runtime-dir being emptied and wayland stopping working)
For anyone that ran into this issue, I had something similar happen where the wslg bind remount of /run/user/1000 was being done after my systemd-user service started. I fixed this by adding an override with
[Unit]
Requires=run-user-%i.mount
This forced the user service to start after the mount point, which allows systemctl --user to work, and appears to also work with wslg (both the regular files and the wayland socket appear, and all the contents are the same as the /mnt/wslg/run/user/1000.
Hope this helps anyone else, as I struggled with this for several days. Many other suggested fixes failed to work while preserving GUI application support.
Activity
cerebrate commentedon Sep 29, 2022
See also note to #8842.
[-]systemd user session destroys /mnt/wslg/runtime-dir[/-][+][0.68.2] systemd user session destroys /mnt/wslg/runtime-dir[/+]cerebrate commentedon Sep 29, 2022
As a workaround, this can be avoided by creating the following file as /lib/systemd/system/[email protected]/override.conf:
Which will bypass attempting to create a new user runtime directory for any uids which already have one mounted.
aki-k commentedon May 24, 2023
Alistair Young (@cerebrate) Amazing thank you very much. I had a hard time figuring this out (/mnt/wslg/runtime-dir being emptied and wayland stopping working)
jacob-keller commentedon Sep 5, 2025
For anyone that ran into this issue, I had something similar happen where the wslg bind remount of /run/user/1000 was being done after my systemd-user service started. I fixed this by adding an override with
This forced the user service to start after the mount point, which allows systemctl --user to work, and appears to also work with wslg (both the regular files and the wayland socket appear, and all the contents are the same as the /mnt/wslg/run/user/1000.
Hope this helps anyone else, as I struggled with this for several days. Many other suggested fixes failed to work while preserving GUI application support.