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

Why is it borderline impossible to downgrade WSL2? #11562

Closed
fabis94 opened this issue May 6, 2024 · 5 comments
Closed

Why is it borderline impossible to downgrade WSL2? #11562

fabis94 opened this issue May 6, 2024 · 5 comments
Labels

Comments

@fabis94
Copy link

fabis94 commented May 6, 2024

Is your feature request related to a problem? Please describe.
There have been multiple times already when a WSL2 update has changed and broken some networking settings, and it will probably keep happening - no one is perfect, not even WSL2 developers.

Thus it should be possible to install a specific WSL version (any of those from the releases page), without having to go through hoops. Previously there was a wsl --update --rollback option, which wasn't perfect (didn't allow you to specify a specific version), but at least rolled back a version, but then you removed it.

There was also a very hidden (took me ages to find this through google, why is it so hidden!) way to install a specific release like this:
powershell Add-AppxPackage -Path .\Microsoft.WSL_1.0.3.0_x64_ARM64.msixbundle -ForceUpdateFromAnyVersion -ForceApplicationShutdown

But as we tried this on a colleague's machine, we got this error:
error 0x80073D27: While processing the request, the system failed to register the windows.service extension due to the following error: The package installation failed because a version of the service exists outside of APPX packaging. Please contact your software vendor.

So apparently that's no longer supported either? Or at the very least it expects you to fully uninstall WSL2 (and lose your distro setup) before doing the downgrade.

Being able to downgrade is an important troubleshooting step, even if you think WSL2 releases are perfect and bugfree (have they ever been?), so this should be made as easy as possible!

Describe the solution you'd like
It should be easy to find docs on how to downgrade and it should be easy to do it too. There should just be a CLI flag to install a specific version: wsl --downgrade 1.2.3

Please for the love of god introduce this feature so troubleshooting WSL2 environments is less painful

Describe alternatives you've considered
There is no alternative to downgrading when you're troubleshooting issues. Sometimes WSL2 just has a buggy version out and all you can do is either downgrade or wait for the issue to be resolved (which could take weeks or months depending on how complicated the issue is).

@fabis94 fabis94 added the feature label May 6, 2024
Copy link

github-actions bot commented May 6, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

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
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@fabis94
Copy link
Author

fabis94 commented May 6, 2024

/feature

Copy link

github-actions bot commented May 6, 2024

Diagnostic information
Found '/feature', adding tag 'feature'

@OneBlue
Copy link
Collaborator

OneBlue commented May 6, 2024

Thank you @fabis94.

Automatically downgrading to older versions of WSL is unfortunately very difficult to achieve at the technical level, and is a relatively rare scenario.

In your case though since you appear to be downgrading from >= 2.0.0 to 1.X, here's what you were missing:

Running:

wsl --uninstall

Before installing a version < 2.0.0 should resolve the issue.

@OneBlue OneBlue closed this as completed May 6, 2024
@fabis94
Copy link
Author

fabis94 commented May 7, 2024

@OneBlue Fair enough. Could this information about why downgrading is not made possible and instructions on how to rollback be made more visible, tho? That's the other problem - it is very difficult to find any resources explaining what is the recommended procedure for rolling back versions, and a lot of it is outdated (pointing towards wsl --update --rollback).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants