WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Error: 0x80040326 when opening WSL

Open yanghoxom opened this issue 3 years ago • 40 comments

Windows Version

Win 11 22621.1413

WSL Version

1.1.3.0

Are you using WSL 1 or WSL 2?

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.90.1

Distro Version

22.04

Other Software

No response

Repro Steps

Repro steps:

  • Start window
  • Wait few minutes
  • Try to access wsl

I received an "Error: 0x80040326" when attempting to open WSL on Windows 11. This error appears after I have opened several WSL tabs and have been working with them for a while. When I try to open a new tab, the error appears in the Command Prompt or PowerShell, while the old WSL tabs still work normally.

However, when I open a new terminal tab in VSCode, everything works normally. This issue only occurs with WSL tabs opened in the Command Prompt or PowerShell.

Therefore, I am seeking the support of experts to identify the cause of this issue and provide a solution. My Windows 11 version is up-to-date, and I am using WSL2.

Expected Behavior

Can open wsl without error

Actual Behavior

It throw error

Error: 0x80040326
Error code: Wsl/Service/0x80040326
Press any key to continue...

Diagnostic Logs

No response

yanghoxom avatar Mar 30 '23 00:03 yanghoxom

Exact same issue here since this morning.

OS: Windows 10, 10.0.19044 WSL: 1.1.3.0 Kernel: 5.15.90.1 Distribution: Ubuntu VERSION 2

shinjitumala avatar Mar 30 '23 00:03 shinjitumala

Same issue this morning after a system reboot

  • cannot access the CLI via Terminal (prompted with Error code: Wsl/Service/0x80040326)
  • file system still accessible

OS: Windows 11, 10.0.22621 WSL version: 1.1.3.0 Kernel version: 5.15.90.1 Distro: Ubuntu 22.04

ghost avatar Mar 30 '23 00:03 ghost

Same issue here:

Versão do WSL: 1.1.3.0 Versão do kernel: 5.15.90.1 Versão do WSLg: 1.0.49 Versão do MSRDC: 1.2.3770 Versão do Direct3D: 1.608.2-61064218 Versão do DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows versão: 10.0.22621.1413

Boardstroke avatar Mar 30 '23 00:03 Boardstroke

Same issue after powering up this morning. I am using WSL2 on Windows 10.

WSL version: 1.1.3.0 Kernel version: 5.15.90.1 WSLg version: 1.0.49 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2728 Distribution: Debian

Diagnostic log attached. WslLogs-2023-03-30_11-29-34.zip

ghost avatar Mar 30 '23 00:03 ghost

same issue 😢

  • cannot access the CLI via Terminal (prompted with Error code: Wsl/Service/0x80040326)
  • file system still accessible

WSL Version: 1.1.3.0 Kernel Version: 5.15.90.1 WSLg Version: 1.0.49 MSRDC Version: 1.2.3770 Direct3D Version: 1.608.2-61064218 DXCore Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows Version: 10.0.22623.891 Distro: Ubuntu 22.04

limejuny avatar Mar 30 '23 00:03 limejuny

Forced an update check in the Microsoft Store and an update for WSL appeared.

Problem is resolved with this version:

WSL version: 1.1.6.0 Kernel version: 5.15.90.1 WSLg version: 1.0.50 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.2728

ghost avatar Mar 30 '23 00:03 ghost

@Joshua-IRT 's

Forced an update check in the Microsoft Store and an update for WSL appeared.

or

wsl --update

may resolve this issue.

peccu avatar Mar 30 '23 00:03 peccu

@peccu can confirm - I had the same error but updating WSL resolved it.

lukechen526 avatar Mar 30 '23 00:03 lukechen526

btw, after rebooting my laptop today, Hyper-V, WSL related items were toggled off in Turn Windows features on or off. check it and re-activate it please.

limejuny avatar Mar 30 '23 01:03 limejuny

Just in case anyone got error 0x80240438 when running wsl --update, run with admin solves the issue:

$ wsl --update
Checking for updates.
Error: 0x80240438
Error code: Wsl/UpdatePackage/0x80240438
$ gsudo wsl --update
Checking for updates.
Updating Windows Subsystem for Linux...

Vinfall avatar Mar 30 '23 01:03 Vinfall

Restart the computer and immediately execute "wsl--update" on powershell. After that, my problem was solved

tomsn1978 avatar Mar 30 '23 01:03 tomsn1978

  • Open the Windows PowerShell
  • wsl --update

This solves my issue. The same thread here: https://github.com/microsoft/WSL/issues/9867

HeriYantodotDev avatar Mar 30 '23 01:03 HeriYantodotDev

Can confirm wsl --update has fixed this issue atm.

jershbytes avatar Mar 30 '23 02:03 jershbytes

wsl --update is right.

delfws avatar Mar 30 '23 02:03 delfws

wsl --update

altwei avatar Mar 30 '23 02:03 altwei

try downloading from this https://github.com/microsoft/WSL/releases/download/1.1.6/Microsoft.WSL_1.1.6.0_x64_ARM64.msixbundle and update

alenpaulvarghese avatar Mar 30 '23 04:03 alenpaulvarghese

use wsl --update is right

lhxsm avatar Mar 30 '23 06:03 lhxsm

try downloading from this https://github.com/microsoft/WSL/releases/download/1.1.6/Microsoft.WSL_1.1.6.0_x64_ARM64.msixbundle and update

When I trying wsl.exe --update, the update process shows error as well:

Error: 0x80d03805
Error code: Wsl/UpdatePackage/0x80d03805

but manually downloading and installation via this link actually fixed my problem. Thanks!

monologconnor avatar Mar 30 '23 07:03 monologconnor

Any ideas what is causing this? I didn't notice any Windows updates in the past days.

mneiferbag avatar Mar 30 '23 08:03 mneiferbag

btw, after rebooting my laptop today, Hyper-V, WSL related items were toggled off in Turn Windows features on or off. check it and re-activate it please.

After seeing this, I decided to test it out with my second PC. Sure enough, after rebooting I had the same problem with opening WSL. Under "Turn Windows features on or off":

  • "Hyper-V" is not checked
  • "WSL" is checked
  • "Virtual Machine Platform" is checked

As Hyper-V is not required for WSL, this does not appear to be a config change.

Still no idea what caused this issue.

ghost avatar Mar 30 '23 11:03 ghost