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
The bug is floating. Regularly, but not always, I found all WSL2 apps in the Ubuntu distro have been killed while the PC was asleep. Docker Desktop usually survives. Opened shell windows in the Ubuntu distro exit with an error status.
Expected Behavior
All apps are working when waking from sleep.
Actual Behavior
Sometimes apps are killed.
Diagnostic Logs
How to see logs right when the issue happened, without turning logs on permanently for days?
Reacted by Giovanni Bassi, Cameron Allan, Antonio Gurgel, Olsgaard, Niek van Suchtelen, webian, kpine, Christopher Bare, Jakub Darmach, Ondrej Balaz and 26 more
Unfortunately I don't have any more specific information to contribute either, but I've also noticed this issue in the last two weeks (have been using WSL2 for two years to date).
Sometimes on waking up Windows from sleep, all WSL tabs in Windows Terminal are still open, but WSL has stopped and all tabs are frozen. To get things going again, I have to run wsl --shutdown from PS, then wsl to start it up again. I'll keep a close eye on it to try to get some more details!
This is a separate issue from the linux clock going out of sync when Windows goes to sleep.
Reacted by Roope Hakulinen, Robert Utterback, Danny Staple, Anubhab Majumdar, Jaime González-Arintero and Alireza Taghizadeh
As a non-guaranteed workaround, I've disabled automatic Microsoft Store updates. I suppose they were a reason at least for some of the dies. Since that, I've updated Windows to the latest cumulative update and for a couple of weeks, I don't face this issue.
@argo-wayneb dies during the daytime work can be related to microsoft/wslg#678
I updated Windows (11 Pro) to Version 10.0.22621 (i.e. version 22H2) (Build 22621) a few days ago and it seems to have fixed the problem for me. Interested to hear if it works for others.
I have been having this problem since I updated to "2022-11 Cumulative Update for Windows 11 Version 22H2 for x64-based Systems (KB5020044)" 3 days ago. WSL (and all applications using WSL) crash after my computer wakes from sleep and requires a full reboot.
I face this issue almost every morning with my laptop running the latest stable Windows 11. On my desktop (latest insiders builds) I do not have this issue however...
This command (elevated PS prompt) fixes it for me: taskkill /f /im wslservice.exe. Usually I have to restart apps using WSL as well (Docker, JetBrains IDEs ...).
Reacted by Enrico Markert, JB, Benjamin Leutner, Rupert Quekett, solidsloth, zigzagpig, Dário, Ender Bonnet and Jason Yan
I've been facing this issue, too, more frequently after upgrading to W11,
It requires restarting the whole pc as it does not work trying to kill the service or the process, WSL just freezes.
When trying to stop the service, it returned 1053 the service did not respond to the start or control request in a timely fashion
This also happens overnight or whenever the PC sleeps for more than 30 minutes or so.
I've just downgraded to WSL 1 in hopes it removes the issue, I will let you know if it does.
This started happening to me too last few days and now seems to happen after every night (or longer time away from the laptop). Running on a Dell XPS 17 with Win 11 21H2 22000.1696, WSL2 Ubuntu 22.04.2.
I am using Windows Terminal, have a few tabs open and everything is fine. I leave my laptop so that it sleeps or hibernate it and when logging back in the Terminal window has closed.
VSCode has also lost all connection to QSL and "hangs".
If I open it it just hangs and no prompt comes up. Any wsl command in PS just hangs, the only solution is to restart the laptop (which is extremally annoying as I have a few databases and Docker containers to spin up again before I can resume work...)
Same as Charles Jenkins (@thecharlesjenkins), I have two 2022-11 Cumulative Update for Windows 11 (KB5023698 and KB5022836) and the timing is about right for when this started...
EDIT: I wonder if it has some connection to Docker... If I don't have Docker running it seems as if it is not happening, and I also got a "crash" when starting a few new containers and I got [process exited with code 1 (0x00000001)] in all open tabs as the containers started up...
You can add me to the list of people with this same problem. It started a few weeks ago. While building a Linux application via WSL/Visual Studio, it will randomly hang and I have to reboot, as any powershell wsl commands just hang forever.
Back in February (or maybe earlier) it was working just fine.
It now terminates WSL2 several times a day, also killing Docker desktop and VSCode.
Trying to restart things completely freezes the processes and only a restart will sort it.
Previously this happened after sleep or hibernate, but now it happens in the middle of working with the laptop.
Reacted by Jakub Darmach, Todd Mancini, Dmytro, andrsmllr, Phil, Phil Hasnip and Théo Piacentini
I've been facing this issue, too, more frequently after upgrading to W11, It requires restarting the whole pc as it does not work trying to kill the service or the process, WSL just freezes. When trying to stop the service, it returned 1053 the service did not respond to the start or control request in a timely fashion
This also happens overnight or whenever the PC sleeps for more than 30 minutes or so.
I've just downgraded to WSL 1 in hopes it removes the issue, I will let you know if it does.
After downgrading to WSL 1, at least it shows the prompt when logging back. I might need to restart the service, but it does not hang.
I usually have two instances of ubuntu 22.04 running, one using wsl1, the other wsl2.
After resuming from sleep wsl2 hangs, with vmmem process using all available CPU,
wsl shutdown or teminate hangs.
wsl1 instance is still ok, but have to reboot to get rid of vmmem process.
In my case, all the GUI applications running under WSLg die. However, the initial terminal from which they have been launch still runs. It might not be related with this issue and I should probably open a new issue.
Still, only a few weeks ago, GUI applications survived Sleep mode.
I've bottomed out my issues on Windoze I think.
It needed perusing of the "Event Log" and that revealed somewhat cryptic messages about running out of memory.
Since then I maxed my laptop out at 64GB, and WSL has now been stable, alongside everything else I need to run. Seems it doesn't like being paged in and out.
[I just wonder how one manages to avoid suspending/hibernating on a laptop ..]
By necessity, I occasionally suspend(*), and I hibernate at least twice per day. All goes well for several days, even up to two weeks. But at some point, wsl inevitably locks down hard; I had one instance when even taskkill was not enough (wsl after restart was still unusable). Once this happens, it seems as if the next crash is much more to occur quickly (but this is of course completely subjective).
(*) where I can select, I prefer hibernation over suspend
The 'out of memory' (or I'd guess some 'race condition' for memory) nevertheless makes sense. All in all, by now wsl feels almost as 'stable' as on my older x86_64 laptop, which has more RAM.
Unfortunately, I have no (little) Windows skill, so I don't even know how to monitor/search the 'Event log' in a meaningful way. On (pure) Linux, where I in charge of > 50 machines, I know "enough" so that if I can't resolve a bug myself, I can at least provide a useful and detailed bug report. So if any of the WSL developers/maintainers reads this, if you tell me what to watch for / try on the Windows side, I am glad to help.
Happening with me too. I haven't found any reliable solution yet. Although a simple restart fixes it for me:
wsl -d Ubuntu --shutdown
wsl -d Ubuntu
But it's just a hassle. I created a silent desktop shortcut that restarts WSL Ubuntu on wake/login. Save this as a .vbs file and double-click it (or add it to Task Scheduler on wake events to run automatically after sleep):
' Silent WSL Ubuntu Restart Script (Standalone)' Restarts Ubuntu WSL without showing any windowsSetobjShell=CreateObject("WScript.Shell")' Shutdown Ubuntu WSL silentlyobjShell.Run"wsl -d Ubuntu --shutdown",0,True' Wait 3 seconds for shutdown to completeWScript.Sleep3000' Start Ubuntu WSL silentlyobjShell.Run"wsl -d Ubuntu -e exit",0,True' Optional: Show a brief notification when completeobjShell.Popup"Ubuntu WSL restarted successfully!",2,"WSL Restart",64
Not ideal ofcourse, but at least I don't see errors on my IDEs now. Hoping this is fixed soon.
This has recently started happening to me on my work laptop. I'll leave VSCode with a remote WSL session open when shutting down for the day. VSCode is then unable to connect to the remote Ubuntu instance when waking the laptop up the following morning. It just happened again.
My only recourse has been to issue a shutdown, which seems to hang for a bit before the command finally commits.
Reacted by Nolan Blew, Daniel Ching and Bartosz Pachołek
Experiencing same behavior as Cali LaFollett (@calilafollett-rm). After sleep often WSL2 is dead, VS Code remote debugging disconnected. Turning it off with wsl --shutdown takes some time and after turning it back on VS Code needs to be also restarted to reconnect. Especially annoying when using Github Copilot in VS Code as then it forces you to cancel the chat and often loses context.
Asus Z13, Windows 11 25H2 (26200.7922), all OEM drivers, nothing special on the system apart from WSL2, Docker and basic development tools mostly in WSL2.
I was experiencing this on WSL2 on Windows 11 on ARM (X Elite) as well. See my writing up.
I switched my laptop to x86 where I have more RAM and there I run Linux (legacy CentOS 8) in VirtualBox.
I experienced this same issue on sleep there too. So it is not WSL2 issue only.
But I was able to configure Linux Cento 8 so it does not crash in VirtualBox when host laptop returns from sleep.
If you are interested I may write here what I did.
Dear Microsoft,
just wanted to share that current state is unbearable and breaks any positive experience related to WSL2. I am currently switching my projects to running natively on Windows with Powershell as a terminal as WSL2 is more than annoying with this issue. Next step will be getting out of Windows completely...
acadjsr It's still technically a Windows issue though. Probably in the virtualization underpinnings and power management. Regardless, Bartosz Pachołek (@bpacholek) has a point, I do not have these issues on my personal MacBook. Unfortunately, I need to use a Windows laptop for work.
So you use Linux as a guest Virtual machine in your MacBook host, because that would be apple to apple comparison of you not having these issues on your personal MacBook.
And I fixed this issue by configuring Linux in VirtualBox so now works with sleep.
Bartek Bubacz (@bartekb)
Yes.
I did this for my CentOS 8 VM in VirtualBox in x86-64 laptop.
This is from my documentation I took when I set this.
I haven't tried this in WSL2 but it should be possible to do this (or alternative for your Linux - you can search for).
1. Adjust RCU Stall and Heartbeat (Guest Side)
Because you are virtualized, the "CPU Stall" you see is often just the guest OS waiting for the VirtualBox hypervisor to give it cycles after a long pause.
Add these to your /etc/sysctl.conf to make the kernel more "patient" with the hypervisor
vi /etc/sysctl.conf
kernel.watchdog_thresh = 60
kernel.softlockup_panic = 0
Apply with: sysctl -p
2. Adjust the Time Synchronization Threshold
This is done while VM (named "CentOS 8 64-bit") was shut down, in command prompt:
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage guestproperty set "CentOS 8 64-bit" "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 5000
5000 is 5 sec
3. GRUB changes
vi /etc/default/grub
add:
rcupdate.rcu_cpu_stall_suppress=1 nowatchdog
vi /etc/systemd/system/systemd-logind.service.d/watchdog.conf
vi /etc/systemd/system/systemd-udevd.service.d/disable-watchdog.conf
vi /etc/systemd/system/systemd-journald.service.d/disable-watchdog.conf
Add these lines:
[Service]
WatchdogSec=0
Apply the change:
restart VM.
5. (An alternative for above) If you see other services (like systemd-journald) also timing out, you can adjust the global hardware watchdog settings in the main system configuration.
Edit the system config:
vi /etc/systemd/system.conf
find and set
RuntimeWatchdogSec=0
RebootWatchdogSec=0
ShutdownWatchdogSec=0
FYI, this has been happening to me every single day since last week.
Is it x86-64 or Arm64?
If it is Arm64 is it Snapdragon X1 or Snapdragon X2 or something else?
I run this under Arm64 Snapdragon X2 and it never dies after sleep. I have a custom WSL2 set up for this. I can share it if you are interested.
I also have Arm64 Snapdragon X1 but I was not able to set it up there as with X2. It dies eventually. So there are some differences between X1 and X2.
Activity
tmonczko commentedon Sep 14, 2022
Unfortunately I don't have any more specific information to contribute either, but I've also noticed this issue in the last two weeks (have been using WSL2 for two years to date).
Sometimes on waking up Windows from sleep, all WSL tabs in Windows Terminal are still open, but WSL has stopped and all tabs are frozen. To get things going again, I have to run
wsl --shutdownfrom PS, thenwslto start it up again. I'll keep a close eye on it to try to get some more details!This is a separate issue from the linux clock going out of sync when Windows goes to sleep.
speller commentedon Nov 7, 2022
As a non-guaranteed workaround, I've disabled automatic Microsoft Store updates. I suppose they were a reason at least for some of the dies. Since that, I've updated Windows to the latest cumulative update and for a couple of weeks, I don't face this issue.
@argo-wayneb dies during the daytime work can be related to microsoft/wslg#678
tmonczko commentedon Nov 9, 2022
I updated Windows (11 Pro) to Version 10.0.22621 (i.e. version 22H2) (Build 22621) a few days ago and it seems to have fixed the problem for me. Interested to hear if it works for others.
thecharlesjenkins commentedon Dec 6, 2022
I have been having this problem since I updated to "2022-11 Cumulative Update for Windows 11 Version 22H2 for x64-based Systems (KB5020044)" 3 days ago. WSL (and all applications using WSL) crash after my computer wakes from sleep and requires a full reboot.
BenjaVR commentedon Feb 20, 2023
I face this issue almost every morning with my laptop running the latest stable Windows 11. On my desktop (latest insiders builds) I do not have this issue however...
This command (elevated PS prompt) fixes it for me:
taskkill /f /im wslservice.exe. Usually I have to restart apps using WSL as well (Docker, JetBrains IDEs ...).VOID07 commentedon Mar 11, 2023
I've been facing this issue, too, more frequently after upgrading to W11,
It requires restarting the whole pc as it does not work trying to kill the service or the process, WSL just freezes.
When trying to stop the service, it returned
1053 the service did not respond to the start or control request in a timely fashionThis also happens overnight or whenever the PC sleeps for more than 30 minutes or so.
I've just downgraded to WSL 1 in hopes it removes the issue, I will let you know if it does.
QAnders commentedon Mar 23, 2023
This started happening to me too last few days and now seems to happen after every night (or longer time away from the laptop). Running on a Dell XPS 17 with Win 11 21H2 22000.1696, WSL2 Ubuntu 22.04.2.
I am using Windows Terminal, have a few tabs open and everything is fine. I leave my laptop so that it sleeps or hibernate it and when logging back in the Terminal window has closed.
VSCode has also lost all connection to QSL and "hangs".
If I open it it just hangs and no prompt comes up. Any
wslcommand in PS just hangs, the only solution is to restart the laptop (which is extremally annoying as I have a few databases and Docker containers to spin up again before I can resume work...)Same as Charles Jenkins (@thecharlesjenkins), I have two
2022-11 Cumulative Update for Windows 11(KB5023698 and KB5022836) and the timing is about right for when this started...EDIT: I wonder if it has some connection to Docker... If I don't have Docker running it seems as if it is not happening, and I also got a "crash" when starting a few new containers and I got
[process exited with code 1 (0x00000001)]in all open tabs as the containers started up...Seosaidh commentedon Mar 24, 2023
You can add me to the list of people with this same problem. It started a few weeks ago. While building a Linux application via WSL/Visual Studio, it will randomly hang and I have to reboot, as any powershell wsl commands just hang forever.
Back in February (or maybe earlier) it was working just fine.
This will happen to me multiple times per day.
QAnders commentedon Mar 24, 2023
This has gotten completely out of hand!
It now terminates WSL2 several times a day, also killing Docker desktop and VSCode.
Trying to restart things completely freezes the processes and only a restart will sort it.
Previously this happened after sleep or hibernate, but now it happens in the middle of working with the laptop.
VOID07 commentedon Mar 25, 2023
After downgrading to WSL 1, at least it shows the prompt when logging back. I might need to restart the service, but it does not hang.
2pl commentedon Jul 9, 2023
I have been facing a similar issue for a couple of weeks now.
Most likely linked to a windows patch as i didn't change wsl version for w while:
I usually have two instances of ubuntu 22.04 running, one using wsl1, the other wsl2.
After resuming from sleep wsl2 hangs, with vmmem process using all available CPU,
wsl shutdown or teminate hangs.
wsl1 instance is still ok, but have to reboot to get rid of vmmem process.
2pl commentedon Jul 9, 2023
seems to be a duplicate of #6982
deragon commentedon Nov 27, 2023
In my case, all the GUI applications running under WSLg die. However, the initial terminal from which they have been launch still runs. It might not be related with this issue and I should probably open a new issue.
Still, only a few weeks ago, GUI applications survived Sleep mode.
45 remaining items
enBonnet commentedon Dec 3, 2025
Mine hibernating and restarting once per week is working fine as well
a-bj-q commentedon Dec 3, 2025
I've bottomed out my issues on Windoze I think.
It needed perusing of the "Event Log" and that revealed somewhat cryptic messages about running out of memory.
Since then I maxed my laptop out at 64GB, and WSL has now been stable, alongside everything else I need to run. Seems it doesn't like being paged in and out.
sboresch commentedon Dec 4, 2025
[I just wonder how one manages to avoid suspending/hibernating on a laptop ..]
By necessity, I occasionally suspend(*), and I hibernate at least twice per day. All goes well for several days, even up to two weeks. But at some point, wsl inevitably locks down hard; I had one instance when even taskkill was not enough (wsl after restart was still unusable). Once this happens, it seems as if the next crash is much more to occur quickly (but this is of course completely subjective).
(*) where I can select, I prefer hibernation over suspend
The 'out of memory' (or I'd guess some 'race condition' for memory) nevertheless makes sense. All in all, by now wsl feels almost as 'stable' as on my older x86_64 laptop, which has more RAM.
Unfortunately, I have no (little) Windows skill, so I don't even know how to monitor/search the 'Event log' in a meaningful way. On (pure) Linux, where I in charge of > 50 machines, I know "enough" so that if I can't resolve a bug myself, I can at least provide a useful and detailed bug report. So if any of the WSL developers/maintainers reads this, if you tell me what to watch for / try on the Windows side, I am glad to help.
shivanshthapliyal commentedon Dec 5, 2025
Happening with me too. I haven't found any reliable solution yet. Although a simple restart fixes it for me:
But it's just a hassle. I created a silent desktop shortcut that restarts WSL Ubuntu on wake/login. Save this as a
.vbsfile and double-click it (or add it to Task Scheduler on wake events to run automatically after sleep):Not ideal ofcourse, but at least I don't see errors on my IDEs now. Hoping this is fixed soon.
calilafollett-rm commentedon Feb 10, 2026
This has recently started happening to me on my work laptop. I'll leave VSCode with a remote WSL session open when shutting down for the day. VSCode is then unable to connect to the remote Ubuntu instance when waking the laptop up the following morning. It just happened again.
My only recourse has been to issue a shutdown, which seems to hang for a bit before the command finally commits.
bpacholek commentedon Mar 10, 2026
Experiencing same behavior as Cali LaFollett (@calilafollett-rm). After sleep often WSL2 is dead, VS Code remote debugging disconnected. Turning it off with
wsl --shutdowntakes some time and after turning it back on VS Code needs to be also restarted to reconnect. Especially annoying when using Github Copilot in VS Code as then it forces you to cancel the chat and often loses context.Asus Z13, Windows 11 25H2 (26200.7922), all OEM drivers, nothing special on the system apart from WSL2, Docker and basic development tools mostly in WSL2.
acadjsr commentedon Mar 10, 2026
I was experiencing this on WSL2 on Windows 11 on ARM (X Elite) as well. See my writing up.
I switched my laptop to x86 where I have more RAM and there I run Linux (legacy CentOS 8) in VirtualBox.
I experienced this same issue on sleep there too. So it is not WSL2 issue only.
But I was able to configure Linux Cento 8 so it does not crash in VirtualBox when host laptop returns from sleep.
If you are interested I may write here what I did.
bpacholek commentedon Mar 13, 2026
Dear Microsoft,
just wanted to share that current state is unbearable and breaks any positive experience related to WSL2. I am currently switching my projects to running natively on Windows with Powershell as a terminal as WSL2 is more than annoying with this issue. Next step will be getting out of Windows completely...
acadjsr commentedon Mar 13, 2026
This is not a Windows (WSL2) issue. It is because of Linux. I experience the same with Windows host and Linux guest in VirtualBox.
calilafollett-rm commentedon Mar 13, 2026
acadjsr It's still technically a Windows issue though. Probably in the virtualization underpinnings and power management. Regardless, Bartosz Pachołek (@bpacholek) has a point, I do not have these issues on my personal MacBook. Unfortunately, I need to use a Windows laptop for work.
acadjsr commentedon Mar 13, 2026
So you use Linux as a guest Virtual machine in your MacBook host, because that would be apple to apple comparison of you not having these issues on your personal MacBook.
And I fixed this issue by configuring Linux in VirtualBox so now works with sleep.
bartekb commentedon Mar 14, 2026
acadjsr what did you do to avoid this problem on VBox? Thanks!
acadjsr commentedon Mar 14, 2026
Bartek Bubacz (@bartekb)
Yes.
I did this for my CentOS 8 VM in VirtualBox in x86-64 laptop.
This is from my documentation I took when I set this.
I haven't tried this in WSL2 but it should be possible to do this (or alternative for your Linux - you can search for).
1. Adjust RCU Stall and Heartbeat (Guest Side)
Because you are virtualized, the "CPU Stall" you see is often just the guest OS waiting for the VirtualBox hypervisor to give it cycles after a long pause.
Add these to your /etc/sysctl.conf to make the kernel more "patient" with the hypervisor
vi /etc/sysctl.conf
kernel.watchdog_thresh = 60
kernel.softlockup_panic = 0
Apply with: sysctl -p
2. Adjust the Time Synchronization Threshold
This is done while VM (named "CentOS 8 64-bit") was shut down, in command prompt:
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage guestproperty set "CentOS 8 64-bit" "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold" 5000
5000 is 5 sec
3. GRUB changes
vi /etc/default/grub
add:
rcupdate.rcu_cpu_stall_suppress=1 nowatchdog
to the GRUB_CMDLINE_LINUX line.
grub2-mkconfig -o /boot/grub2/grub.cfg
4. To prevent errors after sleep: systemd[1]: systemd-logind.service: Watchdog timeout (limit 3min)!
mkdir -p /etc/systemd/system/systemd-logind.service.d/
mkdir -p /etc/systemd/system/systemd-udevd.service.d/
mkdir -p /etc/systemd/system/systemd-journald.service.d/
vi /etc/systemd/system/systemd-logind.service.d/watchdog.conf
vi /etc/systemd/system/systemd-udevd.service.d/disable-watchdog.conf
vi /etc/systemd/system/systemd-journald.service.d/disable-watchdog.conf
Add these lines:
[Service]
WatchdogSec=0
Apply the change:
restart VM.
5. (An alternative for above) If you see other services (like systemd-journald) also timing out, you can adjust the global hardware watchdog settings in the main system configuration.
Edit the system config:
vi /etc/systemd/system.conf
find and set
RuntimeWatchdogSec=0
RebootWatchdogSec=0
ShutdownWatchdogSec=0
systemctl daemon-reexec
asiby commentedon Sep 23, 2026
FYI, this has been happening to me every single day since last week.
acadjsr commentedon Sep 23, 2026
Is it x86-64 or Arm64?
If it is Arm64 is it Snapdragon X1 or Snapdragon X2 or something else?
I run this under Arm64 Snapdragon X2 and it never dies after sleep. I have a custom WSL2 set up for this. I can share it if you are interested.
I also have Arm64 Snapdragon X1 but I was not able to set it up there as with X2. It dies eventually. So there are some differences between X1 and X2.