-
Notifications
You must be signed in to change notification settings - Fork 821
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 2 VM suspends after too much time in Modern Standby #5673
Comments
Try loading a simple server like |
I could try it tonight, but I don't think it will make a difference, since the server for the Remote WSL extension has always been running anyway. |
I see. If you have Windows 10 Pro try running a hyper-v VM. If it also shutdowns that then it's same problem and it's something the hyper-v team needs to look at. |
Just to add my 2cts here. Since my Dell XPS has problems with Modern Standby, I got used to hybernating overnight instead. After waking from hybernation the next day, WSL2 and all servers running inside Docker are back and working normally. |
From the description sounds like there was a "complicated" server running, namely the VS Code Remote NodeJS service on the WSL side. Possibly. There isn't actually a repro here. |
Well, tonight I just left a window open with the simple Python server, and when I checked again this morning the WSL VM was still running. I will make another test this night that is specific to the Remote NodeJS service. |
Alright, so it seems that while VS Code loses the connection overnight, the WSL 2 VM is indeed still running. Which I suppose would actually make this a VS Code problem, or one with Remote WSL. I'll open an issue there and close this one for now. |
Thanks for the follow up. That's what I sort of suspected from the beginning, but let it play out because the initial report was VM proper going down. Lost connection is variation #4992. I'm not fully convinced that one is entirely actionable. It might be, at least partially. But I suspect (as you surmise) it would take state reestablishment from VS Code. Which is no different than say the web pages you might have up on the screen in Windows when your machine goes into standby (modern or otherwise). |
Environment
Steps to reproduce
Expected behavior
The WSL 2 VM should be running when waking up.
Actual behavior
The WSL 2 VM has shut down. No doubt this is because it is supposed to shut down after a certain time of inactivity. While this may be sensible behavior in general, I'd argue that in this specific case it isn't. After all, all developers need to sleep, and waking up and needing to reload the VS Code session isn't always all that convenient. 😅 I've written about Modern Standby specifically because I don't know if this behavior occurs with normal standby as well, but I imagine it's probably specific to Modern Standby because Windows is still active there, but not during normal standby afaik.
The text was updated successfully, but these errors were encountered: