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
{{ message }}
Repository navigation
WSL2: Ubuntu 18.04 Serial devices are no longer mounted properlyย #4322
Your Windows build number: Microsoft Windows [Version 10.0.18932.1000]
What you're doing and what's happening:
run WSL2 Ubuntu 18.04
plugin USB to serial device
watch it mount under COM devices in device manager
attempt to open the device in WSL2
cat /dev/ttyS[X]
What's wrong / what should be happening instead:
This works under WSL1 flawlessy, it no longer works in WSL2
in WSL2 we can clearly see it is not connected or configured
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
Reacted by Christopher McClellan, cwmoriarty, Christian Sirolli, Jean-Bernard DAMIANO, Rob Light, Gal Aharoni, Jari Pennanen, Tianjiao Huang, Cassiano Aquino, Timo Meijer and 190 more
I commonly use Docker for creating tool-chain images, but this falls apart when youโre working with embedded devices, where you need to connect to a USB device or serial port in order to flash/debug on device. If I can run a docker container natively and access USB ports with WSL2, I can make an extremely strong argument for switching from Mac to Windows.
Reacted by Craig Loewen, cwmoriarty, Vincent Claes, Adam Perlman, Cameron, Calum Johnston, Frank Honore, Thomas Kuhn, Tobias Lolax, Christian Sirolli and 259 more
Reacted by Param Siddharth, ztluo, Ogden Mills, Sourabh, jepperaskdk, jerryc05, Sukesh Ashok Kumar, Alberto Cavalcante and Katarzyna Giฤ dลa
Reacted by ac, Ridder90, LQ, Alexander Hirner, pianocomposer321, Jay Allison, Diego , Haxy, Albin Winkelmann, JaeHeung Han and 14 more
what a pity! i gotta roll back to wsl 1. Hopefully, usb support comes up soom for wsl2
Reacted by ac, Joar Andreas Gjersund, Ridder90, Shambo, jtbarrett, Emanuel Lindstrรถm, DInne Bosman, Jay Allison, Frederik Juul, Fabiano Riccardi and 14 more
We need to run Windows Build 16215 or later to install WSL 1.
WSL 2 is only available in Windows Builds 18917 or higher.
You can install both version if your build is higher than 18917.
So in my case I am running a 17134 build, I should only have WSL1 available, correct ?
In my case I still have troubles accessing serial USB device from my linux terminal under /dev/. They don't show up but are dettected in Windows Device Manager.
tleroy-dev If your system supports WSL2, you can choose WSL1 or WSL2 per distro.
VERSION from wsl --list --verbose shows if you're using WSL1 or WSL 2:
> wsl --list --verbose
NAME STATE VERSION
* docker-desktop-data Stopped 2
docker-desktop Stopped 2
Ubuntu-18.04 Stopped 2
Fedora-32 Stopped 2
Ubuntu Stopped 1
The normal recommendation is to use WSL2 for installation of all new WSL distros. Note, this doesn't affect your current installed WSL distros, if you have any already they will stay on WSL1.
wsl --set-default-version 2
If you want to manually upgrade a distro to WSL2 or "downgrade" it to WSL1, you can use --set-version. I keep a WSL1 distro around to have functioning /dev/ttyS* devices.
wsl --set-version Ubuntu 1
Reacted by tleroy-dev, hmhka, Emanuel Lindstrรถm, caowent, Fabiano Riccardi, Jimbolino, wisemoth, p-roman, Iain Buchanan, Torsten Maehne and 2 more
From that documentation, it looks like the wsl.exe command works only on build higher than 1903, older version use wslconfig.exe. Result of equivalent :
PS C:\Users\user> wslconfig.exe /list /all
Distributions du sous-systรจme Windows pour Linuxย :
Ubuntu (par dรฉfaut)
It's in french in my case (system default), it does not output the version specifically, I guess from what I have described earlier, being on a pre-WSL2 build (17134) , only WSL 1 is enabled in my case.
I've now installed VMWare, and it works perfectly well for my needs (Docker and access to USB devices)
EVEN BETTER, it uses NAT and DHCP to get a SENSIBLE IP address!
Sadly, it appears WSL1 and WSL2 are a waste of time for different reasons.
I contributed to this thread with one of the earliest complaints. I think
it was nearly two years ago. It's sad to see that Microsoft cares so
little about this issue and it's confusing to me why they would
de-prioritize it. Back then, I came to the same conclusion as you and just
installed linux on VirtualBox.
On Thu, Jul 6, 2023 at 3:54โฏAM bwims ***@***.***> wrote:
I've now installed VMWare, and it works perfectly well for my needs
(Docker and access to USB devices)
EVEN BETTER, it uses NAT and DHCP to get a SENSIBLE IP address!
Sadly, it appears WSL1 and WSL2 are a waste of time for different reasons.
โ
Reply to this email directly, view it on GitHub
<#4322 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AETCO5RJFRV25ZLLWWYWPPDXO2KNXANCNFSM4IFGB36Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
I was enjoying WSL but I gave up and moved to Linux completely. I still have Windows installed on another partition since some tools are Windows only, but most Windows applications that use serial port are so simple that run fine under Wine on Linux.
This guide will walk through the steps necessary to connect a USB device to a Linux distribution running on WSL 2 using the USB/IP open-source project, usbipd-win.
I also gave up on windows and just use linux full time. https://www.codeweavers.com/crossover has been helpful in running any last software that regular wine didn't work with.
I actually followed the steps here https://learn.microsoft.com/en-us/windows/wsl/connect-usb and I had it working for both windows 10 and 11 from what I can remember. I haven't needed to connect my FTDI serial to USB converter to WSL2 for a while and I just followed my notes and it's no longer working. I can attach the device to WSL2, but it no longer shows up in /dev/ttyUSB0 anymore. How do I fix that?
Note that there are a number of issues with some specific serial chips, like this one, many of which stem from the default kernel not containing certain drivers - you may need to compile one yourself.
Stephen A. Imhoff (@Clockwork-Muse) so it was working in July 2023 with my FTDI to USB, and I didn't change anything about my WSL2 setup so why would it just stop working?
Stephen A. Imhoff (@Clockwork-Muse) no worries, I'll try your suggestion all the same. Are there any FTDI to USB devices that you know work? If so I wouldn't mind getting one of those as a quick solution.
Your Windows build number: Microsoft Windows [Version 10.0.18932.1000]
What you're doing and what's happening:
run WSL2 Ubuntu 18.04
plugin USB to serial device
watch it mount under COM devices in device manager
attempt to open the device in WSL2
cat /dev/ttyS[X]
What's wrong / what should be happening instead:
This works under WSL1 flawlessy, it no longer works in WSL2
in WSL2 we can clearly see it is not connected or configured
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
Activity
rubberduck203 commentedon Jul 28, 2019
Itโs clearly called out in the FAQ that there is currently no support for USB in WSL2.
Iโd like to toss my voice in here that this should be a priority feature for WSL2.
One of the big benefits of WSL2 is the opportunity to run Docker natively instead of on Docker for Windows. It is notoriously hard to get access to USB devices in Docker on non-Linux systems.
I commonly use Docker for creating tool-chain images, but this falls apart when youโre working with embedded devices, where you need to connect to a USB device or serial port in order to flash/debug on device. If I can run a docker container natively and access USB ports with WSL2, I can make an extremely strong argument for switching from Mac to Windows.
linweifu commentedon Nov 20, 2019
up
zawawimanja commentedon Nov 28, 2019
so that why I cannot see my usb device in ubuntu.hurmmm
rubberduck203 commentedon Nov 28, 2019
It would be really nice if someone could chime in letting us know if this is even technically feasible.
sebbean commentedon Dec 3, 2019
would love to know
chenhu66 commentedon Apr 4, 2020
what a pity! i gotta roll back to wsl 1. Hopefully, usb support comes up soom for wsl2
tleroy-dev commentedon May 11, 2020
Can I have the detailed step to roll back from WSL2 to WSL1 ?
I found under https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-18917 that WSL2 was introduced at build version 18917. Now, how can I re-install WSL from a specific build number ? Thank you.
EDIT my current build number is below 18917 and should be WSL1, right ? But the USB COM PORT is not recognized in WSL env.
My current os version:
rubberduck203 commentedon May 11, 2020
I thought you could have WSL1 and WSL2 installed side by side?
tleroy-dev commentedon May 11, 2020
Christopher McClellan (@rubberduck203) it's not clear to me how to check which WSL version we are running. It is not described in the app store. From online information I have found:
You can install both version if your build is higher than 18917.
So in my case I am running a 17134 build, I should only have WSL1 available, correct ?
In my case I still have troubles accessing serial USB device from my linux terminal under /dev/. They don't show up but are dettected in Windows Device Manager.
bburky commentedon May 11, 2020
tleroy-dev If your system supports WSL2, you can choose WSL1 or WSL2 per distro.
VERSIONfromwsl --list --verboseshows if you're using WSL1 or WSL 2:The normal recommendation is to use WSL2 for installation of all new WSL distros. Note, this doesn't affect your current installed WSL distros, if you have any already they will stay on WSL1.
If you want to manually upgrade a distro to WSL2 or "downgrade" it to WSL1, you can use
--set-version. I keep a WSL1 distro around to have functioning/dev/ttyS*devices.tleroy-dev commentedon May 11, 2020
Blake Burkhart (@bburky) Thanks for your response.
From that documentation, it looks like the wsl.exe command works only on build higher than 1903, older version use wslconfig.exe. Result of equivalent :
It's in french in my case (system default), it does not output the version specifically, I guess from what I have described earlier, being on a pre-WSL2 build (17134) , only WSL 1 is enabled in my case.
bburky commentedon May 11, 2020
tleroy-dev Yes, sounds like you're definitely on WSL1 then.
tleroy-dev commentedon May 11, 2020
I have opened a new ticket for my problem under WSL 1 (#5203)
AsciiWolf commentedon May 22, 2020
Any news regarding USB devices support in WSL2?
164 remaining items
bwims commentedon Jul 6, 2023
I've now installed VMWare, and it works perfectly well for my needs (Docker and access to USB devices)
EVEN BETTER, it uses NAT and DHCP to get a SENSIBLE IP address!
Sadly, it appears WSL1 and WSL2 are a waste of time for different reasons.
jjclose commentedon Jul 6, 2023
adalava commentedon Jul 6, 2023
I was enjoying WSL but I gave up and moved to Linux completely. I still have Windows installed on another partition since some tools are Windows only, but most Windows applications that use serial port are so simple that run fine under Wine on Linux.
shadrqen commentedon Mar 14, 2024
This guide will walk through the steps necessary to connect a USB device to a Linux distribution running on WSL 2 using the USB/IP open-source project, usbipd-win.
jviskari commentedon Mar 15, 2024
Still workaround. This feature should be built in WSL.
compnski commentedon Mar 15, 2024
I also gave up on windows and just use linux full time. https://www.codeweavers.com/crossover has been helpful in running any last software that regular wine didn't work with.
crose72 commentedon May 3, 2024
I actually followed the steps here https://learn.microsoft.com/en-us/windows/wsl/connect-usb and I had it working for both windows 10 and 11 from what I can remember. I haven't needed to connect my FTDI serial to USB converter to WSL2 for a while and I just followed my notes and it's no longer working. I can attach the device to WSL2, but it no longer shows up in /dev/ttyUSB0 anymore. How do I fix that?
Clockwork-Muse commentedon May 3, 2024
Cameron Rose (@crose72) - You'll want/need to check the usbipd repo, likely.
Note that there are a number of issues with some specific serial chips, like this one, many of which stem from the default kernel not containing certain drivers - you may need to compile one yourself.
crose72 commentedon May 11, 2024
Stephen A. Imhoff (@Clockwork-Muse) so it was working in July 2023 with my FTDI to USB, and I didn't change anything about my WSL2 setup so why would it just stop working?
Clockwork-Muse commentedon May 11, 2024
I'm the wrong person to ask, unfortunately.
crose72 commentedon May 11, 2024
Stephen A. Imhoff (@Clockwork-Muse) no worries, I'll try your suggestion all the same. Are there any FTDI to USB devices that you know work? If so I wouldn't mind getting one of those as a quick solution.
mrv96 commentedon May 29, 2024
It seems that we have a solution for the issue of Cameron Rose (@crose72) (and mine): dorssel/usbipd-win#948 (comment)
OsamaAtef2025 commentedon Mar 1, 2025
Osama
h8920981945 commentedon Mar 1, 2026
chri873 commentedon Apr 11, 2026