Hacker News new | ask | show | jobs
by Bedon292 2095 days ago
WSL is actually really good. To me, it gives you the best of both worlds. Linux for dev stuff, Windows for GUI and games. And its actual Linux, so I am dev'ing a little closer to prod than those on Macs. But that's less of a factor now everything is in Docker and we are all using the same containers. I also feel I have a superior Docker (runs on WSL2) experience to them, better interface and much better battery life. Its of course all personal opinion, but I have no desire or need to move off Windows.
3 comments

That's really over-selling it. WSL is okay. It's better than the previous monstrosities, but that's not saying much. You can't run VS Code in WSL, it literally has code to prevent you from doing that, even if you have a functioning X Server (which is a jolly pain to set up).
(Disclosure: I work at Microsoft but not on WSL2. I’m just a huge fan and I say that as a dedicated/devout Mac user)

Two things:

First, GUI support is coming [1] and the team is working to support both X11 and Wayland [2].

Second, the Remote Development Extension for VS Code [3] lets you do this seamlessly. It auto-configs to work with WSL or WSL2 and can also connect to a container or remote machine or GitHub Codespaces codespace. It’s awesome and all of your files, your terminal, everything is mapped to WSL2, with all the GUI parts from Windows. It’s one of my favorite things.

I’m not trying to convince people that WSL2 is the end-all be-all, even though I’m an unabashed fan, but I just want to correct the record a bit (regarding VS Code) and share that X11/Wayland GUI support is coming

[1]: https://devblogs.microsoft.com/commandline/whats-new-in-the-... [2]: https://youtu.be/b2mnbyRgXkY [3]: https://code.visualstudio.com/docs/remote/remote-overview

Why do you want to run VSCode from inside WSL?

The Windows version can be fully integrated with WSL. Windows handles the GUI, Linux handles the CLI and all that. [1]

I have not found any need that it does not meet this way, but as I mentioned in another comment, I have a very narrow focus. So would not be surprised if I was missing something.

[1] https://marketplace.visualstudio.com/items?itemName=ms-vscod...

One reason to move off of Windows would be running graphical Linux apps. But that'll change soon.
Yeah, I do have a narrow focus though and don't use any Linux GUI apps. Its been a while, but if you run an X11 Server on Windows you can make many things work, though definitely not all of them. And I know its getting better. I tend to live in VSCode though, and that natively works with WSL under the hood.

Probably going to check out this for GUI stuff again soon: https://github.com/cascadium/wsl-windows-toolbar-launcher

If you are playing games on Linux, WSL doesn't help anything for sure, it only adds overhead.
Why would you ever play games on WSL when you already are on the superior platform for playing games...
Which was exactly my point - I play them directly on Linux.
But legit question, why would you want to play a game in Linux and not in Windows?

I’m not even being rhetorical, I’m genuinely curious if there are games with significantly better performance under Linux (and I’m assuming we would have to be talking about using an AMD card so I’m also curious if that performance under Linux is better than an Nvidia card under either OS), because maybe there are and I’m just totally unaware.

Because Linux is my OS of preference in general, so I play games on it as well.

But it's good to clarify a few things to avoid confusion:

1. You can use Nvidia on Linux, including for gaming. Nvidia's problems are related to lack of support for modern features (Wayland use cases and so on) caused by the fact that their blob driver in not upstreamed. But it's usable otherwise.

2. AMD drivers are open source and upstreamed, that's why it's a common preference for Linux gamers. Performance of AMD is very good on Linux (amdgpu, radeonsi, radv/aco and etc. all provide very good performance). That stereotype that "Nvidia drivers are faster" has been false for quite a while already. When comparing same classes of cards, AMD is totally on par with Nvidia if not better.

3. Besides native games, you can play many Windows only games using Wine + dxvk / vkd3d, Proton and etc. Performance in such cases usually is slightly lower than on Windows, but not significantly. The only problems now remain mostly with intrusive, rootkit styled "anti-cheats" that don't work in Wine, but I personally wouldn't even touch such games, so that doesn't bother me.

To sum up - using Linux for gaming is totally doable, as long as you want to use Linux in the first place and don't want to use Windows.

To clarify, I’m aware you can use Nvidia on Linux. This was a phrased this way because the driver issues you mention impact performance games under Linux.

And again, I understand Linux is your chosen OS — I’m happy you’re so happy. My question was why a person who is using WSL2 would want to run a game in Linux instead of inside Windows. I understand you can game in Linux. That’s not the question. The question is why would a person run a game inside Linux, which is running side-by-side Windows, run the game in that subsystem instead of just using Linux.

I didn’t know if there was a place where a game would get better performance in Linux, making that a better target.

I just don’t understand the criticism of doing something inside a subsystem that could be done just as well/better outside the subsystem. If you don’t want to use WSL2 or Windows or macOS or anything else, that’s fine. But for people who DO choose to use it, I don’t understand why “games inside Linux are slower inside of it” makes much sense.

The argument before was "WSL2 will become good for graphical applications" (which also means games). So I answered, that if you want to run games on Linux, you can as well do it straight on Linux running on your hardware without intermediaries. I.e. it wasn't about running games on Windows.
Personally I don't see any benefit that WSL can offer that regular Linux can't. But I don't have any interest in Windows, so your case might differ.
Yeah, I have a few things that keep me in Windows. The primary users of the apps I work on are all on Windows, so having a Windows box around tends to be useful to check everything is good.

ArcGIS - Windows only, has enough issues as it is, virtualizing it doesn't tend to go well. Though you can do something like VMWare Fusion mostly successfully.

MS Office - Yes there are alternatives, but we sill operate primarily in Office, and the alternatives are not perfectly compatible. Especially when collaborating with other companies its important. Teams / O365 are certainly getting better, but still not there yet.

Steam - Although that is certainly getting better on Linux as well. And my gaming time is pretty limited these days.

If they can't work in Wine, you can always run the outliers in Windows VM on Linux, instead of doing the reverse :)
WSL2 is by far superior to running Windows in a VM, mostly because it's not "just" Linux in VM.

And anyway, just the way it lets me manage multiple instances of Linux is far superior to anything I experienced on Mac or Linux itself. By the current standards, Wine is just _painful_ to use. Meanwhile Windows window management and the terminal app have made great strides in last couple years.

WSL2 still can't be superior to Linux proper even if it's not just Linux in VM (which it mostly is, just with specific integration with Windows). There is still hypervisor involved no matter how you slice it.

So if you do need to run something that's Windows only but can work in Wine, I'd totally recommend running using Wine ditch Windows for good. For me it's a benefit, not a hindrance.

And you can run multiple VMs on Linux too if you need actual Windows still (KVM, virt-manager and etc. are quite handy).