Live data from Hacker News

DirectX is coming to the Windows Subsystem for Linux

devblogs.microsoft.com

141–150 of 548 posts

Re: DirectX is coming to the Windows Subsystem for Linux

#141

FYI: This is the first draft of the Microsoft Virtual GPU (vGPU) driver. The driver exposes a paravirtualized GPU to user mode applications running in a virtual machine on a Windows host. This enables hardware acceleration in environment such as WSL (Windows Subsystem for Linux) where the Linux virtual machine is able to share the GPU with the Windows host. So this isn't actual "DirectX on Linux", just a driver for a…

This sounds like an attempt to win back ML segment from Linux to Windows. There are three letters back in my mind that sound like screaming, but too early to tell unfortunately.

The thing with WSL is that it doesn't win back the ML segment from Linux to Windows for production workloads. This is just a developer workstation friendly move that explicitly doesn't tie you to Windows itself.

It seems like Microsoft is continuing to see Linux as a production server target while positioning Windows to remain relevant as a workstation OS.

Ostensibly, this is a move to compete with Mac OS and not Linux.

Re: DirectX is coming to the Windows Subsystem for Linux

#142
post #47

Earlier quoted context omitted.

This sounds like an attempt to win back ML segment from Linux to Windows. There are three letters back in my mind that sound like screaming, but too early to tell unfortunately.

How is it too early to tell? It is an extension of the capability of WSL, giving you that sweet convenience of the DirectX API with your existing ML project. Of course, this extension makes your project incompatible with desktop Linux once adopted.

Except your ML project is accessing the DirectX API through another cross-platform API layer (CUDA). And the purpose of running WSL is that you ultimately hope to deploy to Linux servers (which Microsoft hopes will be on Azure).

Re: DirectX is coming to the Windows Subsystem for Linux

#143
post #72

Earlier quoted context omitted.

> but it opens the door to code that runs on WSL2 that doesn't run on regular Linux. Which is exactly what I was expecting since day one when WSL was announced. WSL is going to slowly kill Linux, or to be more accurate, it will kill any Linux (be it on servers or desktops) not Microsoft branded and distributed. Forks on smaller embedded systems will resist for a while, until one day MS decides to port some killer tec…

Yeah, but right now it solves the problem of not being able to run code on WSL that does run fine in Linux. What really stops me from using Linux on the Desktop is compatibility issues with my laptop(s), reliable sleep/wake and rendering issues with High DPI display. Microsoft released an MS Teams client for Linux which astonished me. So, I am giving them the benefit of the doubt for the time being.

Microsoft hasn't given up on Windows but having lost the mobile space I think they've decided to go back to their roots of developing software for many operating systems. It doesn't matter if you run Windows, Mac OS, Android, or iOS if they can sell you an Office 365 subscription.

The Windows protectionism that dominated the 2000's doesn't help Microsoft sell more product anymore.

It's not so much that Microsoft has changed but that the world has changed and Microsoft is changing with it.

Re: DirectX is coming to the Windows Subsystem for Linux

#144
I was a beta user of WSL1. It was interesting, but the very slow file system performance from Windows to Linux and vice versa was a deal breaker for development use.

I haven't even bothered to use WSL2 because I hardly use Windows anymore, and I was forced to use VMWare with Linux on Windows for a few years of development work. It was always a pain, too, and once I switched to MacBook, I never looked back.

Since then, I assumed WSL2 wasn't going to be used much by 'real developers' as it also had many of the same problems that plague VMWare and VirtualBox, which haven't been adopted by enough developers to pose a threat Linux native and Mac users.

But I really feel MS is throwing a lot of resources into this. It's not just a quick fix for those users who need a command line but wouldn't ever consider Linux or Mac anyway, as I initially thought.

And if this gets 'good enough' then imagine even more trouble for Linux and especially Mac's grip on engineers and scientists.

Ubuntu, Redhat, and the rest have utterly failed to work with Dell or Lenovo or HP to concentrate on just one or two very well supported laptops - everything including suspend, battery life, ACPI, fonts, etc. It's a chicken and egg problem - workstations aren't profitable because most users won't put up with the hardware and driver problems. And without paying users, the distros ignore potential pro users to concentrate on enterprise.

As for Mac, while I'm happy they've finally fixed the keyboard and allowed 32GB+ ram, that configuration looks absurdly expensive at $3500 compared to a similarly configured $1700 Dell Precision or Thinkpad. And MacOs has gotten worse over the years, not better. There is nothing really compelling me to stay except for it's Unix compatibility.

WSL2 may eventually be the final nail in the coffin for a viable Linux Desktop, and Apple should be worried too, though they appear to have forgotten about pro users years ago anyway.

Re: DirectX is coming to the Windows Subsystem for Linux

#145
post #96

Earlier quoted context omitted.

If you read the replies by Dave Airlie and Daniel Vetter, it seems somewhat likely that upstream won't accept it. Perhaps that's just initial skepticism that will evaporate after more discussion, but perhaps not. Frankly this does just seem like MS wanting to reduce their maintenance burden on what they expect will be a very important part of their WSL offering on Windows. There's nothing inherently wrong with that d…

>>>There's also the question of whether or not you believe WSL as a whole is good or bad for Linux. IMO it's a good thing. Given that windows accounts for 90%+ of the desktop OS share, Windows might very well become the world's most used Linux distro.

It is, of course, decidedly not a Linux distro though. If it was, it wouldn't be an issue. I think there are positives, but it looks a lot like "Extend" to me.

I can't even say I wouldn't use it - it might be nice! But I will not use any WSL-only capability, that's for sure.

Re: DirectX is coming to the Windows Subsystem for Linux

#146
post #2

> This also enables third party APIs, such as the popular NVIDIA Cuda compute API, to be hardware accelerated within a WSL environment. Dollars to donuts this is why Microsoft is implementing this. GPU acceleration is becoming a critical feature for many users (but especially developers) and this will continue. If WSL is to be a serious competitor, this is necessary and I'm glad to see it showing up. This is true of…

Yup, from one of the MS staff replies further in the thread[1] > There is a single usecase for this: WSL2 developer who wants to run machine learning on his GPU. The developer is working on his laptop, which is running Windows and that laptop has a single GPU that Windows is using. Can't say I can get behind MS trying to shift maintenance for a Windows only "feature" onto the Linux devs here. 1. https://lkml.org/lkml…

To be honest I don't quite understand what stopped those developers from running machine learning on their GPUs under Windows itself. Most frameworks work just fine. I've been doing quite a lot of TensorFlow with both Python and .NET.

The only time I faced the need for Linux box is trying a demo project from OpenAI, which did not use the features it required Linux for on a single machine anyway.

Re: DirectX is coming to the Windows Subsystem for Linux

#147
post #7

Earlier quoted context omitted.

Do ML people actually care about DirectX? I thought everyone is using CUDA? Anyway in my university building I have not seen anyone that does machine learning on Windows.

They typically don't - the team published both a special build of Tensorflow that uses DirectX, as well as working with nVidia to get CUDA running against their DX Linux kernel implementation

> special build of Tensorflow that uses DirectX

Huh? Are you sure about that? Regular TensorFlow on Windows uses CUDA, not DirectX-flavored compute.

Re: DirectX is coming to the Windows Subsystem for Linux

#148

Ohhh, such a smart move. If there was any momentum of gaining developers on Linux for gaming this will crush it. Microsoft is eating Linux with a "loving" embrace.

I'm curious why you think this would make any difference to Linux gaming? If you want games to only run on Windows, they can just develop them for Windows. There's no need to put Linux in the middle.

Re: DirectX is coming to the Windows Subsystem for Linux

#149
post #2

> This also enables third party APIs, such as the popular NVIDIA Cuda compute API, to be hardware accelerated within a WSL environment. Dollars to donuts this is why Microsoft is implementing this. GPU acceleration is becoming a critical feature for many users (but especially developers) and this will continue. If WSL is to be a serious competitor, this is necessary and I'm glad to see it showing up. This is true of…

> AF_PACKET Just run a Linux hyper-v vm. That's what WSL2 is doing under the hood anyway. I run it this way and it's great. I have windows terminal auto ssh into it. Performance is great. And using the X server x410 on the windows side gui performance is fantastic (though no hardware acceleration) because instead of ssh tunneling x410 suports AF_VSOCK for the x socket, which hyper-v supports for performance as good a…

I've had trouble researching if WSL2 is in fact a hyper-v managed VM. I've seen some documentation referring to WSL2 as a tightly integrated Krypton (scaled down hyper-V) VM. It seems to imply the host overhead isn't as high as a guest on hyper-V
Post reply on HN