-
Notifications
You must be signed in to change notification settings - Fork 849
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
Interop is broken when WSL is started prior to user logon #8643
Comments
This may be the same as #4260. This can occur if the 9P server isn't working correctly. If you try to access |
no, it isn't possible to access the path. is this an issue on my end, or is this a bug with wsl? |
@KentoNishi Could be either, honestly. Based on a number of comments in #4260, it may be a permission/ownership issue. In scanning through #4260, it sounds like that particular issue was due to the WSL distribution being "owned" by the Administrator, rather than your regular user. One (but not the only) cause of this could be installation via If it is the permission issue, then a common fix for the Start an Admin prompt (PowerShell or CMD):
If that resolves your |
@KentoNishi what is the output of Sample output:
|
it's |
Update: I think I figured out what was going wrong. I had a task scheduler entry to auto-start my wsl instance on startup without login, and disabling that made it work again. I assume that wsl interop depends on the desktop environment being fully loaded? This error disappeared when I disabled the task scheduler item. |
@KentoNishi Good find. And most likely -- It's been a while since I've done that, so I don't remember the exact details, but I did have issues with WSL instances started via Task Scheduler at Computer Startup. Something has probably changed since then, since I believe my problem was that the instance would self-terminate even if a service was running inside it if it wasn't "associated" with the desktop. But it's clear that WSL behaves differently when started without a desktop/logged-in user. You might want to edit the main issue above to make it clear (without reading the comments) how to reproduce the issue. |
I updated the title and issue content. |
/logs |
Hello! Could you please provide more logs to help us better diagnose your issue? To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. Click here for more info on logging Thank you! |
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! |
Version
Microsoft Windows [Version 10.0.22000.318]
WSL Version
Kernel Version
Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
Create a task scheduler entry with the following settings:
Restart the machine
Log into Windows as usual
Open WSL and execute cmd.exe, observe that interop (both wslg and executing .exe files) do not work
Expected Behavior
WSL should work as intended, regardless of whether it was launched from a command line prior to logon or not.
Actual Behavior
Diagnostic Logs
No response
Requested Change
I would like WSL to have an option to launch at system startup. Without such an option, it is impossible to start WSL automatically without breaking interop.
The text was updated successfully, but these errors were encountered: