0

Facing an issue with wsl2 when starting aosp emulator. It was working before and now after some updates it does not work.

I'm on WSL2 with

uname -a : 5.15.57.1-microsoft-standard-WSL2

I'm starting emulator with command line :

emulator -writable-system -allow-host-audio

wsl 2 crash dmesg

wsl --status

wsl --status

Any help would be welcome :)

Thanks for your help

1
  • What does "Does Not Work" mean ? And it's better to copy/paste the text rather than using images. Commented Aug 6, 2022 at 23:15

1 Answer 1

1

Short answer:

Try downgrading WSL and or the kernel. If that works, please file a new issue on the WSL2 Github repo. Include the information on your Windows build as well as wsl --status results.

More detail:

now after some updates it does not work.

5.15.57.1-microsoft-standard-WSL2

You don't mention your Windows version in your question, but that would indicate that you are probably using a Windows 11 Insider build. Last week was the first time in a long while that the WSL team:

  • Updated the Linux kernel (from 5.10.102.1 to 5.15.57.1)
  • Pushed a WSL "Pre-release" (0.65.1) to Insiders. I don't think they've done that since Windows 10. Typically all releases have been considered "Preview" since they moved to the Microsoft Store delivery model. The "pre-release", to me, indicates some additional concern that the team had that it might need additional testing on Insider builds before being made available to Preview opt-in via the Store.

And there was at least one serious regression (issue 8679, but it doesn't appear to be related to the issue you are seeing. And regardless, from reading that issue, you should have received the subsequent (still pre-release) update that fixes that particular issue.

Since the emulator issue started after an upgrade, though, I would definitely try rolling back to the previous release(s).

Start with the WSL package itself:

  • Download the 0.64.0 release package from the repo

  • Exit WSL and wsl --shutdown

  • From an administrative PowerShell:

    Add-AppxPackage -Path .\Microsoft.WSL_0.64.0.0_x64_ARM64.msixbundle -ForceUpdateFromAnyVersion -ForceApplicationShutdown
    
  • Confirm installation via wsl --status.

  • Start WSL and try again.

If it is still not fixed, you may need to try rolling back the kernel release separately.

  • Download the GA kernel (5.10.102.1) from the link in the Manual Installation steps.

  • Create a directory for the kernel (something like C:\WSL\kernel\5.10.102.1).

  • From a CMD shell:

    cd <download_directory>
    
    msiexec /a wsl_update_x64.msi TARGETDIR=C:\WSL
    
  • You should now have C:\WSL\System32\lxss\tools\kernel. Move this to the C:\WSL\kernel\5.10.102.1 directory.

  • Create or edit %userprofile%\.wslconfig (that's your Windows user profile, not WSL):

    [wsl2]
    kernel = C:\\WSL\\kernel\\5.10.102.1\\kernel
    
  • wsl --shutdown

  • Restart and check uname -a.

4
  • Hello thanks for your detailled answer, I just followed your instructions and result is the same. check my edited answer Commented Aug 7, 2022 at 21:08
  • @X6Entrepreneur Ugh - Sorry that didn't work. Well, could be something else in the Insider update, but it could be unrelated, of course. Is there a website or something where I can read through the AOSP emulator installation instructions? If it's not too time consuming, I can test it out on my installation. What distribution are you using? Apologies if it's in the question, but I'm not seeing it at first glance. Thanks! Commented Aug 8, 2022 at 11:52
  • 1
    @X6Entrepreneur Nevermind - I see the instructions in your Github issue. I'll see if I can give it a shot. You should mention in your Github issue that you've also tried it on 5.10.102.1 -- Otherwise the first assumption of the Microsoft team is probably going to be the same as mine - A regression in 5.15.57.1, which we now know it's not. Commented Aug 8, 2022 at 12:21
  • I updated the Github issue too. Thanks a lot if you can try on your side and let me know if it occurs. :) Commented Aug 8, 2022 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .