Created
October 3, 2023 11:48
-
-
Save felipecustodio/6454386d7d59142d4966981ec91cac8e to your computer and use it in GitHub Desktop.
Fix slow upload speeds when using WSL2 in Windows, due to LSO issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerShell script for WSL (Windows Subsystem for Linux) Configuration | |
Write-Host "===============================================" | |
Write-Host "Windows Subsystem for Linux (WSL) Configuration" | |
Write-Host "===============================================" | |
Write-Host "" | |
# Explanation of script actions | |
Write-Host "This script performs the following actions:" | |
Write-Host "1. Shuts down the WSL (Windows Subsystem for Linux)." | |
Write-Host "2. Disables IPv6 for the WSL virtual Ethernet adapter." | |
Write-Host "3. Disables Large Send Offload (LSO) for the WSL virtual Ethernet adapter." | |
Write-Host "" | |
# Step 1: Shutting down WSL | |
Write-Host "-----------------------------------------------" | |
Write-Host "Step 1: Shutting down WSL" | |
Write-Host "-----------------------------------------------" | |
wsl --shutdown | |
# Step 2: Disabling IPv6 for WSL adapter | |
Write-Host "-----------------------------------------------" | |
Write-Host "Step 2: Disabling IPv6 for WSL adapter" | |
Write-Host "-----------------------------------------------" | |
Disable-NetAdapterBinding -Name "vEthernet (WSL)" -ComponentID ms_tcpip6 -IncludeHidden | |
# Step 3: Disabling LSO for WSL adapter | |
Write-Host "-----------------------------------------------" | |
Write-Host "Step 3: Disabling LSO for WSL adapter" | |
Write-Host "-----------------------------------------------" | |
Disable-NetAdapterLso -Name "vEthernet (WSL)" -IncludeHidden | |
Write-Host "" | |
Write-Host "===============================================" | |
Write-Host "WSL Configuration Complete" | |
Write-Host "===============================================" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment