You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search for "Ethernet Settings" in windows search bar and click on "Change adapter options" on left
Disable network device that is connected to internet [either ethernet or wifi device, mine is named "Ethernet"]
Enable same network device
Watch "Hyper-V Virtual Ethernet Adapter" for WSL [mine is named "vEthernet (WSL)"] disable and enable itself which causes window containing terminator to automatically close [same behavior should be observed for any other X11 application]
Expected Behavior
The virtual ethernet adapter for WSL should not reset itself?
I don't know if the virtual ethernet adapter for WSL is supposed to reset itself but I do think it is an issue as network devices usually power down after some time when the machine is put in sleep mode.
This behavior is not seen if you physically unplug the ethernet cable and plug it back again [or disconnect and reconnect to wifi], only if the network device is reset [via disabling/enabling or power off/on].
Right now my workaround is to set the advanced properties of the network devices using Powershell via
Set-NetAdapterAdvancedProperty -Name Ethernet -DisplayName 'Energy Efficient Ethernet' -DisplayValue Off
Set-NetAdapterAdvancedProperty -Name Wi-Fi -DisplayName 'MIMO Power Saving Mode' -DisplayValue 'No SMPS'
so that they don't power down when the machine is in sleep mode but I am also not 100% sure that it works all the time
Edit
Yeah the above settings don't work if the machine is left on sleep mode overnight
Actual Behavior
Watch "vEthernet (WSL)" closely and you should see it disable and enable itself
Looks like you're using the host's IP address for $DISPLAY, which explains why the connection gets dropped when the adapter gets reset.
I'd say that the WSL network adapter being reset when the host's network adapter is reset is by design. Given that vcxsrv isn't officially supported, I'd recommend looking at switching to wslg, or, giving that this is a custom solution, keep using the workaround that you found.
Unfortunately, wslg requires Windows 11 and I'm stuck on Windows 10 due to other software requirements (p_-)
Are there any other alternatives to wlsg for Windows 10 that would not be affected by this issue?
Have been using x2go for a while now which does not experience the same problems as a vanilla vcxsrv, only issue is that sometimes WSL2 shuts itself down during sleep which leaves the x2go session hanging and thus, unrecoverable but that's a different issue
Version
Microsoft Windows [Version 10.0.19042.1466]
WSL Version
WSL 2
Kernel Version
Linux version 5.10.60.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220)
Distro Version
Distributor ID: Ubuntu
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Codename: jammy
Other Software
vcxsrv x server version 1.20.9.0
terminator 2.1.1
powershell 7.2.0
Repro Steps
Expected Behavior
The virtual ethernet adapter for WSL should not reset itself?
I don't know if the virtual ethernet adapter for WSL is supposed to reset itself but I do think it is an issue as network devices usually power down after some time when the machine is put in sleep mode.
This behavior is not seen if you physically unplug the ethernet cable and plug it back again [or disconnect and reconnect to wifi], only if the network device is reset [via disabling/enabling or power off/on].
Right now my workaround is to set the advanced properties of the network devices using Powershell via
so that they don't power down when the machine is in sleep mode but I am also not 100% sure that it works all the time
Edit
Yeah the above settings don't work if the machine is left on sleep mode overnight
Actual Behavior
Watch "vEthernet (WSL)" closely and you should see it disable and enable itself
hyper_v_virtual_ethernet_adapter_for_wsl_disables_and_enables_itself.mp4
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: