Live data from Hacker News

Maybe it’s time to talk about a new Linux Display Driver Model

yosoygames.com.ar

41–50 of 69 posts

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#41

Yea, that's cute, except that DRM can handle pretty much all of it. You can split hairs and complain about GPU scheduling which is inherently rather difficult because scheduling at the command queue level is problem very much alike the halting problem. The real issue isn't that we don't have the pieces we need but rather that we can't get all the players to agree on using the same ones. On Windows you have one entity…

I am sorry, sir. What is DRM? I only have Digital Rights Management flashing in into my memory, but I have no idea what you could mean with DRM. Apparently I've been able to ignore and live behind the moon, not knowing what DRM is, while using Linux mainly since 2003-2004. I'm sad that there is no alternative to X that works with `legacy` graphic cards like mine (Radeon HD 4500). But to be honest I'm personally just…

A quick Google search found "Direct Rendering Manager": https://en.wikipedia.org/wiki/Direct_Rendering_Manager

Doesn't look like something you'd necessarily need to know about unless you were developing for the GPU on Linux.

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#42

Earlier quoted context omitted.

Calling it a political problem and not a technical problem doesn't make it less of a problem. Nor does dismissing it as "cute" offer much in the way of a solution.

Yes, except that I didn't do either one of those things. I was responding to the original article which is calling for a new driver model, which, as pointed out, is neither the problem or the solution.

Sorry, it was somewhat unclear what you were calling cute.

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#43
post #8
post #2

I am currently using 2 displays connected to my graphics card and one connected to my igpu on my Linux desktop at home, and it's really not that hard to set up. Unfortunately the GPU does all the rendering and passes images to the iGPU, but I believe this is the case too with Windows. Also there are a few bugs when using this setup to do with monitor positioning.

You misread OPs point. He is saying Windows can do both. And vsync across cards. That is quite a feat. If using separate outputs, this is probably achievable on Linux with a bit of work. Also vsync with a compositor shouldn't be impossible. However, if the processing is done on on two graphics cards and we output only on one of them then we need cooperation from the device manufacturers to provide us drivers or imple…

Initially at least, I don't think Windows did anything of the sort - laptop vendors were shipping carefully-vetted and tweaked versons of the Intel and $OTHERVENDOR drivers that knew how to talk to each other and couldn't be upgraded in the normal way. Naturally, they didn't bother doing this for Linux.

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#44

Earlier quoted context omitted.

I am sorry, sir. What is DRM? I only have Digital Rights Management flashing in into my memory, but I have no idea what you could mean with DRM. Apparently I've been able to ignore and live behind the moon, not knowing what DRM is, while using Linux mainly since 2003-2004. I'm sad that there is no alternative to X that works with `legacy` graphic cards like mine (Radeon HD 4500). But to be honest I'm personally just…

A quick Google search found "Direct Rendering Manager": https://en.wikipedia.org/wiki/Direct_Rendering_Manager Doesn't look like something you'd necessarily need to know about unless you were developing for the GPU on Linux.

Right, exactly. DRM is responsible for memory management, mode-setting, command submission and is capable of basically everything the original article asks for.

Unfortunately only the Free Software drivers fully support it, AMD is planning to switch its proprietary drivers to it (using their new amdgpu drm driver), and Nvidia doesn't use it on desktop at all but will likely at least implement the prime buffer sharing for optimus at some point.

There are various reasons for the current situation, e.g. Nvidia's OpenGL drivers are simply the best (on both Windows and GNU/Linux) so they had little reason to play nice with others, especially given that their mode-setting code was a bit better than what DRM used to do which is not the case anymore and hasn't been for a while, but companies need financial incentives to rewrite parts of their working codebases.

And even if you get all of the desktop GPUs on top of DRM then you'll still have Android and mobile GPUs. Certain mobile GPUs do work with DRM but that level of support is usually embarrassing and mostly done to be able to say "we did" rather than actually support any useful features in it which, is not completely unreasonable, because DRM doesn't buy you almost anything on Android right now so why bother.

Now, having said that, WDDM, particularly 2.0, does do some things that DRM can not. But DRM is not far behind (and capable of certain things wddm can not) and the real travesty is that not all GPU drivers on Linux (both GNU/Linux and Android) use it.

The perfect Linux (again, both GNU/Linux and Android) graphics stack will be: DRM kernel driver (not only command submission but memory management and mode-setting), Vulkan user-space driver (Vulkan will become basically what Gallium is right now which is a common layer on top of which we'll implement other, more friendly graphics apis) and Wayland.

DRM solves the multi-gpu sharing, synching, recovery, memory management, gives us a central place to manage security (although with GPUs that's a sort of an "interesting" topic which is a long discussion in itself) and do some rudimentary scheduling (which is, as mentioned previously, also "interesting"), Vulkan, as a side-effect of the fact that it's so tight and will come with a conformance framework, will make drivers a lot more predictable and stable and the Wayland faq explains why it's a neater choice than X11.

Unfortunately, while Google will adopt Vulkan, I doubt they'll have enough good will and reason to drop SurfaceFlinger and Gralloc in favor of DRM and Wayland. So we won't likely get to that stack anytime soon.

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#45
post #16

Be grateful that graphics cards work on Linux at all. For over a decade, they barely did.

How about instead of settling for slighty better than it used to be we continue to push for making it better and better over time?

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#46
This is a good example of one of the dangers and failure points of open source. When hardware integration matters, you're going to have sub-par results if you don't have a strong relationship with the hardware manufacturers. The best firmware is from companies that control both the software and the hardware. Linux fundamentally cannot have this relationship. Some things need to be very specifically controlled and designed, with business interests driving progress. Open source doesn't help much with this. Trying to build a system that works fluidly with the larger audience, when the audience is independent corporations, is for better or worse a nightmare.

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#47
post #37
post #22

Earlier quoted context omitted.

Depends on what you mean. I've been running Linux for 20+ years and have never had a graphics card that I couldn't get to work. If you're talking about acceleration, there have obviously been issues getting manufacturer support, but as a non-gamer, that mattered little to me.

So no endless hours trying to get a config file that wouldn't set the monitor in flames? Because I did spent such hours back with Slackware 2.0.

I started with SLS linux which pre-dated Slackware and I certainly remember the scary warnings. But with a plain-vanilla graphics card and using ordinary settings, it wasn't an issue.

Re: Maybe it’s time to talk about a new Linux Display Driver Model

#50

Earlier quoted context omitted.

WebGL works if you enable it? On Linux I've never seen anything other than error messages from WebGL.

WebGL exercises some new corners of the OpenGL interface that many drivers weren't prepared for when WebGL arrived, so browsers tend to have an extensive blacklist: if you have a driver on the list, you won't get WebGL. On a rolling release like Debian Testing, with well-supported hardware like the Intel Ivy Bridge integrated GPU, WebGL has always worked beautifully.

You can try overriding the blacklist in Chrome, that worked well for me when I needed to for a Debian/Nvidia system a couple years ago.
Post reply on HN