Live data from Hacker News

DirectX is coming to the Windows Subsystem for Linux

devblogs.microsoft.com

231–240 of 548 posts

Re: DirectX is coming to the Windows Subsystem for Linux

#231

Earlier quoted context omitted.

Actually, the year of Linux on the desktop will never come also thanks to this. Developers will find more comfortable writing Linux software on Windows (some already do); desktop users will have both worlds at hand without being forced to dual boot; Linux gamers won't have any reasons to keep using native Linux. Etc. I foresee in a not so distant future Microsoft integrating Windows UI elements and events hooks right…

I disagree, i do not think that anyone would want to start running windows just to run the same software they already run while losing a chunk of control and support. However for the real argument, ask yourself: am I switching to using windows because of this?

I think it's the other way round: Do I still need to dual-boot or switch to Linux if this works? Or can I stick with Windows and have the best of both worlds?

Re: DirectX is coming to the Windows Subsystem for Linux

#232

Earlier quoted context omitted.

> I think if that really matters you should be against anything in the kernel to make it work well as a VM under Windows or MacOS or BSD, and in VMware or VirtualBox too. Why? I would guess that a very large share of linux kernels run under a hypervisor in some data center, in a public cloud or some OpenStack cluster. Won't those mostly be the same features?

Because WSL doesn't compete with people who would otherwise run a Linux box, it competes with people who would otherwise shove Ubuntu into a VirtualBox and run it on their Windows box in seamless mode. So the idea that it drives people away from Linux proper is nonsense (BTW., WSL is Linux proper), unless you also believe that installing a Linux in a VM on a proprietary system is also driving people away.

I agree with you completely. I think that the comment I was replying to thinks otherwise.

Re: DirectX is coming to the Windows Subsystem for Linux

#233
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…

[deleted]

Re: DirectX is coming to the Windows Subsystem for Linux

#234
post #29
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…

They are also adding an wayland server. https://devblogs.microsoft.com/commandline/the-windows-subsy...

That would be great news - something I asked for since the presentation of WSL - I just hope it uses the new graphics driver infrastructure, as the first implementation mentioned in your link seems to be using RDP, which is less efficient. But if it does, that would be excellent news.

Re: DirectX is coming to the Windows Subsystem for Linux

#235

It appears that Microsoft has now initiated the "Extend" phase of their classic Embrace, Extend, Extinguish playbook. The key is that the proprietary Microsoft specific API added by this patch is only usable in a WSL environment as it relies on many pieces of proprietary closed source software that Microsoft is unwilling to open source. This patch does nothing but fragment the Linux ecosystem and encourage people to…

I find this a cynical take as far as EEE goes. But even with Microsofts mostly solid efforts into open source I find myself a bit skeptical as well.

Most recently with the Live Share extension for VS Code. From skimming the licensing it is only to be used with the Visual Studio family of products. Which is an incredibly disappointing approach.

I think this is simply about ML and GPU compute for WSL. And I think Microsoft is genuine in that it sees business value in doing open source work, integrating well with Linux, etc. But at the end of the day the business interests are there and different parts of the company can be motivated quite differently.

Some skepticism remains warranted.

Re: DirectX is coming to the Windows Subsystem for Linux

#236

Earlier quoted context omitted.

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.

But Windows is a painful OS to use for anything other than gaming. Ideally, I'd like to see the exact opposite of this: run Linux with a Windows subsystem just for gaming.

Re: DirectX is coming to the Windows Subsystem for Linux

#237

I found this reply to be especially interesting: https://lkml.org/lkml/2020/5/19/1309 > I also have another concern from a legal standpoint I'd rather not review the ioctl part of this. I'd probably request other DRI developers abstain as well. > This is a Windows kernel API being smashed into a Linux driver. I don't want to be tainted by knowledge of an API that I've no idea of the legal status of derived works. (it…

With looking at source, you have to distinguish between copyright (the license) and possible patent status. You should indeed be careful when looking at code with an unclear license, as this opens you up to claims of copyright violations.

However with patents, the situation is different (which makes them so problematic). Patent violation is solely based on whether your code violates a patent or not. Having looked at other sources or not doesn't change anything about the possible violation. This is, what makes patents so nasty.

Re: DirectX is coming to the Windows Subsystem for Linux

#238

I really wish Microsoft would just tell NVidia (and AMD) to support SR-IOV on all their GPUs. Then we wouldn't need any major software changes to enable CUDA acceleration within VMs, just a configuration change to pass through a virtual function of the GPU to make it available to existing drivers.

AFAIK that's up to motherboard manufacturers. SR-IOV often doesn't work on desktops, I doubt there mass produced notbooks support it at all. MS can work with manufacturers, but they have their own incentives and it is unlikely to expect that all of them suddenly start doing a good job on this front.

Meanwhile MS wants to cast widest possible net, so it needs to enable more and more workflows on WSL2 today, not tomorrow.

Re: DirectX is coming to the Windows Subsystem for Linux

#239
post #58

Earlier quoted context omitted.

What I mean is imagine an app that supports "Linux" but it only runs on WSL2; it doesn't run on real Linux. That would be bad IMO.

This emulates a GPU driver. If I understand it correctly, it just means that GPU-accelerated code that previously only ran on "proper" Linux now can run on WSL too, being powered by DirectX behind the scenes. What's bad about that?

You don't understand it correctly. Nobody is complaining or even talking about the gpu driver.

> DxCore & D3D12 on Linux

Projecting a WDDM compatible abstraction for the GPU inside of Linux allowed us to recompile and bring our premiere graphics API to Linux when running in WSL.

This is the real and full D3D12 API, no imitations, pretender or reimplementation here… this is the real deal. l

> libd3d12.so and libdxcore.so are closed source, pre-compiled user mode binaries that ship as part of Windows. These binaries are compatible with glibc based distros and are automatically mounted under /usr/lib/wsl/lib and made visible to the loader. In other words, these APIs work right out of the box without the need to install additional packages or tweak the distro’s configuration. Support is currently limited to glibc based distros such as Ubuntu, Debian, Fedora, Centos, SUSE, etc…

So you can use it with MS blessed distros and only when running under WSL2. You can't use it without WSL2.

Re: DirectX is coming to the Windows Subsystem for Linux

#240

It appears that Microsoft has now initiated the "Extend" phase of their classic Embrace, Extend, Extinguish playbook. The key is that the proprietary Microsoft specific API added by this patch is only usable in a WSL environment as it relies on many pieces of proprietary closed source software that Microsoft is unwilling to open source. This patch does nothing but fragment the Linux ecosystem and encourage people to…

While this was my initial thought as well, on a second thought that doesn't make too much sense. Well depending on whether you're wearing your tinfoil hat properly, you could say this is for testing the waters, but who the fsck would target their game at this? Write against naive Linux but use DirectX for the graphics? Just why? Sounds like the most stupid thing ever.

The CUDA support thing from other comments below seems the only sane use case so far, and in that case I don't really see the EEE either, but just good old "make shit work".

Post reply on HN