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

"WSL Service" service changes to disabled within 60 seconds of a reboot #11628

Closed
1 of 2 tasks
SidJnsn66 opened this issue May 28, 2024 · 8 comments
Closed
1 of 2 tasks

Comments

@SidJnsn66
Copy link

Windows Version

Microsoft Windows [Version 10.0.19045.4412]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu-22.04

Other Software

None

Repro Steps

The WSL Service is set to Manual. Reboot the system. Open the Services window and see that it is still set to manual. Refresh the window repeatedly. Within 60 seconds, it will changed to Disabled.

Expected Behavior

The service should remain as manual, and should run when an Ubuntu terminal window is opened.

Actual Behavior

It changes to disabled, and nothing WSL works until it is manually changed back to manual or auto.
Note the following:
Sc.exe config WSLService start= demand makes no difference, nor does changing the start value in the registry directly
LxssManager is auto and running
Avast Antivirus has been completely removed.
Added an exception to Win Defender, and finally turned off Defender A/V. No change.
Docker has been completely removed.
Disabling the Security Health Service makes no difference.
Disabling my VPN service made no difference.
Only started happening within the last couple of weeks
Removing all distros and reinstalling wsl made no difference

Diagnostic Logs

WslLogs-2024-05-27_21-35-17.zip

Copy link

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Diagnostic information
.wslconfig found
Detected appx version: 2.2.4.0
Found no WSL traces in the logs

@SidJnsn66
Copy link
Author

I'm 99% sure I caught the problem with this log. IDK what a wsl trace is; however, I'm wondering if there would be one given that, on power-up, WSL Service is not running until there is a demand. If I quickly open a terminal, WSL Service will start running and there is no problem. The problem occurs if there is no demand within about a minute, at which time WSL Service changes to Disabled. So WSL never runs and cannot be made to run without changing the service back to manual or auto.

If I'm missing something, please let me know. Thx

@OneBlue
Copy link
Collaborator

OneBlue commented May 28, 2024

Thank you for reporting this @SidJnsn66.

This is most likely caused by a third party program (there's no logic to ever disable wslservice), so this is most likely an antivirus / security solution.

Could you share the list of all running process & services right after boot ? That should help scope down where this is coming from.

@SidJnsn66
Copy link
Author

That makes sense. Thanks for hanging with me to get closer to a solution. Here is the output of tasklist right after reboot and before WSL Service switches to Disabled.
As mentioned above, I have uninstalled Avast AV and, at one time or another, have turned off Defender, disabled Secure Health Service, turned of PIA (vpn client) and CCleaner, all with no effect.

list.txt

@OneBlue
Copy link
Collaborator

OneBlue commented May 28, 2024

@SidJnsn66: I see a few processes that could potentially explain this service configuration change:

  • CCleanerPerformanceOptimi
  • MpDefenderCoreService
  • MsMpEng
  • CCleaner64

Could you try disabling those and see if that solves the issue ?

@SidJnsn66
Copy link
Author

Seems the problem is solved before I got your last message. I decided to clean up the registry using CCleaner in case traces of Avast were left and problematic. Apparently something in that did the trick. WSL service was Automatic - Delayed Start when I next rebooted, and never returned to Disabled. WSL runs as expected.
FWIW, the four services you mentioned are still running.
Thank you for your help!!

@OneBlue
Copy link
Collaborator

OneBlue commented May 31, 2024

Good to know, thank you !

@OneBlue OneBlue closed this as completed May 31, 2024
@irowbin
Copy link

irowbin commented Jul 11, 2024

@OneBlue I had the exact issue and it seems this ccleaner performance optimizer who puts services into sleep and if i put sleep to Microsoft Visual Studio Tool For Application 2019, the WSL service becomes disabled and when undo the sleep, it back to automatic

Thanks for the hints above so I could figure it out.

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

3 participants