Skip to content

[WSL 2] Cannot access \\wsl$ after waking computer from sleep #4311

Closed

Description

@Coridyn
  • Your Windows build number: Microsoft Windows [Version 10.0.18936.1000]
    (This was also happening for me on build 18917)

  • What you're doing and what's happening:

I put computer to sleep overnight.
After waking my computer I cannot access my Linux files via \\wsl$\Ubuntu.
Explorer fails with the message: \\wsl$\Ubuntu is not accessible.

This happens often (but not every time) after waking computer from a long overnight sleep.

I ran dmesg and I got these errors in the log:

[  175.397844] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\..\inc\p9protohelpers.h:122 (Name)

[  175.402700] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\..\inc\p9protohelpers.h:122 (Name)

[  175.409129] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\..\inc\p9protohelpers.h:122 (Name)

[  175.417134] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\..\inc\p9protohelpers.h:122 (Name)

[  175.422563] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\..\inc\p9protohelpers.h:122 (Name)

[26961.870773] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\\p9handler.cpp:853 (EmplaceFid)

[26961.896837] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\\p9handler.cpp:853 (EmplaceFid)

[26961.899632] init: (1) ERROR: LogException:30: FS: (null) Invalid argument @..\\p9handler.cpp:853 (EmplaceFid)

Is there any additional information I can provide to help?


(NOTE: This issue is superficially similar to #4027 and #4260 except accessing \\wsl$\... usually works. It just fails after some amount of time, usually after waking the computer from sleep.)


(hopefully temporary) Workaround for people experiencing this issue:

It's possible to temporarily restore file integration without having to restart your whole machine by restarting the WSL distribution (I'm only running one distribution so I don't know if you have to shutdown and restart all distributions to restart the 9P server).

(just make sure to close all applications that are accessing Linux files (e.g. vscode) before restarting the WSL distribution)

# close all apps accessing linux files (e.g. vscode)

# shutdown WSL distribution
$ wsl --shutdown Ubuntu

# confirm WSL distribution has shut down
$ wsl -l -v

# start the WSL distributuion again
$ wsl -d Ubuntu

Activity

  1. joemaller commented on Sep 23, 2019

    @joemaller

    Maybe the same issue: I have a Windows Explorer window open showing files from my WSL Ubuntu file system. Computer goes to sleep. Wake the computer, I get this error modal from Windows Explorer (one for every window which was viewing WSL files):

    \wsl$\Ubuntu is not accessible. You might not have permission...
    Attempt to access invalid address.

    wsl-sleep-error

    I dismiss the dialog, and everything works correctly after a moment.

  2. benhillis commented on Sep 23, 2019

    @benhillis
    Member

    Sven Groot (@SvenGroot) has a fix for this in review.

  3. Bengrunt commented on Oct 15, 2019

    @Bengrunt

    Hey there, experiencing the same issue.
    Any idea when the fix will be out?

    Thanks!

  4. abuteler commented on Jan 7, 2020

    @abuteler

    Same here. Although it wasn't something that started happening from the get go.
    I could suspend my laptop and resume working without problem two months ago.
    I started having this issue mid December.
    VSCode will tell me it's unable to connect to the WSL server, as if it didn't wake up.
    Yet I am able to access the ubuntu filesystem via a quickaccess I created in Windows Explorer.

  5. Stanzilla commented on Jan 17, 2020

    @Stanzilla

    Yeah same, that is happening for resume from standby and normal restarts when you use the "restore explorer windows" option

  6. whaaaley commented on Mar 21, 2020

    @whaaaley

    I have "Restore previous folder windows at login", disabled and this still happens. It's really frustrating. It seems to work fine if I start WSL immediately after I turn on my PC.

  7. Stanzilla commented on Mar 27, 2020

    @Stanzilla

    Yeah if you are fast enough to call wsl.exe directly which causes the VM to boot then restoring network drives and explorer folders etc does not fail. Ben Hillis (@benhillis) therealkenc can we please remove the fixed flag here? Or will this not get fixed for 2004?

  8. therealkenc commented on Mar 27, 2020

    @therealkenc

    ^--- File under a new issue if there is a well formed repro for remaining or related issues. The OP stated:

    ERROR: LogException:30: FS: (null) Invalid argument @..\..\inc\p9protohelpers.h:122 (Name)
    

    Given the timing of the fixinbound tag (September) it is safe to assume (unless/until someone says otherwise) that whatever fix was applied with respect to the above error, it will ship in 2004.

  9. Stanzilla commented on Mar 27, 2020

    @Stanzilla

    There you go #5021

  10. nidia95 commented on Jan 28, 2023

    @nidia95

    I had this problem, although my wsl hanges and I hasn't been able to shutdown it with wsl --shutdown. after two days I found out I can fix it by killing the wslservice.exe in an admin powershell: taskkill /f /im wslservice.exe.

    as I found here: #8529

  11. fredhaegele commented on Jun 30, 2023

    @fredhaegele

    Why is this closed?

    In this year of 2023, this is still an everyday problem only fixed by shutting down wsl and restarting it, or rebooting the computer.

  12. markrmiller commented on Apr 24, 2025

    @markrmiller

    Why is this closed?

    In this year of 2025, this is still an everyday problem only fixed by shutting down wsl and restarting it, or rebooting the computer.

  13. lesmo commented on Apr 26, 2026

    @lesmo

    Why is this closed?

    In this year of 2026, this is still an everyday problem only fixed by shutting down wsl and restarting it, or rebooting the computer.

    #14193, #14005, #8696

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions