What makes GPUs driver so much more special than other devices drivers?
Posted by Jonrrrs@reddit | linux | View on Reddit | 43 comments
DISCLAIMER: I dont fire against anyone! If i sound like that i blame my bad english. Im realy just curious! Love to anyone that does real work on open source out there!
I tinker with, and reinstall osses constantly on vms and all sorts of different hardware. To reach any acceptable performance in gpu related workloads like rendering static videos or games on windows or unix(...), i first need to install the driver for the gpu in queston. Be it nvidia, amd or intel.
But why is that? Why do i need to install drivers for my gpu, while all other(common) components are handled by the os just fine?
My question is not why i need drivers, but more of why only gpu.
I mean one could argue, that graphics cards are complex, but so are cpu, motherboard and co.
They seem to me not even that different from a top down view. They also have a processing unit, ram and similar. why are they different?
One could also argue, that the company behind designing graphicscards holds back vital information to intentionally hold back kernel maintainers, but amd produces both ends of the spectrum with cpus on the one, and gpus on the other side.
Any explanation or even a hint in the right direction would be very much appreciated!
Coammanderdata@reddit
You don't have to for AMD cards, at least on Linux. Stuff you are using that doesn't require driver installation has modules in the kernel that allows their usage. Now if you are asking for a driver for the cpu, that enables you to run programs on that processor: Well that is the linux kernel itself. So you kind of install the right "driver" by choosing the right image (for example x86 or arm) when you install your os
SEI_JAKU@reddit
You don't need to install drivers for most GPUs. You do need to install drivers for Nvidia GPUs because Nvidia is weird.
The issue is entirely with Nvidia here, nobody else.
FactoryOfShit@reddit
Nothing is special, you need drivers for ALL hardware.
Drivers for a lot of hardware are included in the kernel source tree and are often shipped as part of the kernel package in distros, meaning no installation of anything is required. This includes AMD GPU drivers, not sure why you said they need to be installed.
NVIDIA GPU drivers are special not because they are GPU drivers, but because they are proprietary and cannot be included in the kernel source tree. The kernel source tree does include an unofficial (not made by NVIDIA) open source driver for them (nouveau), and so most distros use that by default, letting you, the user, make the decision to install proprietary software on your machine. This results in the "GPU driver installation" step you mentioned.
al_with_the_hair@reddit
A couple years ago Nvidia announced they were open sourcing and upstreaming the kernel driver, while keeping the userspace code proprietary. Anybody know where they are on that?
tajetaje@reddit
Done, the Nvidia-open kernel driver is now the recommended driver and the proprietary kernel driver is being discontinued. However, there are no plans to upstream the driver, it will be kept out-of-tree. The Nova driver (which has tepid support from Nvidia) is in-tree though and is making steady progress on becoming a viable replacement for nouveau
autodialerbroken116@reddit
Thank you
Business_Reindeer910@reddit
Where did you seen that they were announcing it was going to be upstreamed?
Upstream won't accept a proprietary userspace. That is why it is not, nor ever will be upstreamed. Nova and nouveau will be the only upstreamed drivers.
al_with_the_hair@reddit
I was mistaken. I probably never saw anywhere that nvidia-open was going into the kernel tree.
Business_Reindeer910@reddit
I do think a lot of folks who were talking about it did think it would be, but it wasn't nvidia who said it. They weren't seeing what the actual kernel devs were saying though.
A_Canadian_boi@reddit
One aspect that others haven't touched on yet: GPUs are EXTREMELY COMPLICATED.
They have to work in real time. They have their own different memory space. They have a variety of different internal components including a RISC-V or ARM controller that manages the entire subsystem. They have separate internal schedulers and operating systems that have to work with the host system. GPUs require incredibly advanced compilers (often LLVM based) to generate efficient shaders. GPUs have to work with legacy applications all the way back to ancient versions of OpenGL. Each generation of GPUs is usually a significantly different and incompatible instruction set, unlike CPUs. They must pass through information about all connected screens (and all potential connections). They have to have DACs and ADCs to run speakers and microphones over those connections. Did I mention that HDMI/DP can easily exceed 80Gb/s of uncompressed video data? They have multiple changing internal clock speeds that must be predicted and chosen. They have to be resistant from attack, especially because they have kernel-like access to RAM. Video encoders are usually implemented as drivers that run onboard the GPU's OS, which use dedicated logic for some* parts of de/encoding, while they also use the shaders for other parts. Even worse, HDMI ports and some video codecs are legally required to be licensed separately.
Nouveau has, in particular, struggled with reverse-engineering the RISC-V controller for modern Nvidia GPUs. I understand that's also the main problem with the effort to reverse-engineer the Apple M2.
*Nvidia use RISC-V, AMD uses ARM, Intel uses... I don't know what.
Just-Hedgehog-Days@reddit
A huge part of it is just that GPUs keep changing. You never talk about keyboard and mouse drivers, because those have *completely* settled down and have effectively perfectly engineered solutions. There isn't a a lot of "mouse innovation" or people trying to "squeeze a little more performance out of there mouse" so the drivers keep working just fine. Some blessed devs maintain them and keep them working in modern contexts, but it's not a lot of work. GPUs themselves change a lot, and have new hardware features that need to be supported, and new low level highly optimized CPU frame works that need to talk to the GPU i very specific and evolving ways. GPUs are really "huge parallel processors" and we haven't "solved computing in parallel".
And then like everyone else is pointing out. NVidia and AMD aren't part of the open source community, but we need there software to support there software and that makes all kinds of large boring issues.
bobj33@reddit
I've got a bunch of machines with AMD and Intel GPUs. I don't have to install drivers for any of them. The distribution has compiled the kernel with support and the modules / drivers for these automatically load. Nvidia does not open source their drivers and distribute them separately so that is why you have to install them. Avoid Nvidia and then you can avoid having to install the drivers manually.
Mister_Magister@reddit
nothing, maybe just that gpu driver drives the display and all the rendering technologies behind it, while like audio device driver just allows audio subsystem to use that device
mmmboppe@reddit
quite often the answer is proprietardery
andymaclean19@reddit
GPU drivers do a lot more than just driving hardware. Most device drivers just tell hardware what to do and co-ordinate with the CPU, whereas GPU drivers are implementing whole complex APIs. The driver is hard to make and harder to make efficient. It is part of the huge lead NVIDIA has over basically anyone else and releasing the source code would help others catch up.
There are free equivalents of the NVIDIA driver which attempt to do the same thing, but they have nowhere near the performance and feature set of the closed source ones despite having taken many years to create.
79215185-1feb-44c6@reddit
What is the point of this thread? You lack the basic understanding of how software works so you can't even formulate a proper question.
There is no difference. a GPU driver is no different than a device driver. GPU drivers are proprietary for the exact reason you mentioned - for market segmentation. You are not experienced enough to understand why, but companies like to make money by selling certain technologies, and even AMD sells a proprietary driver to cloud providers and people interested in VDI. The only company that doesn't do this is Intel because they don't have the market share to make that play.
ironykarl@reddit
This is /r/linux, dude... not a niche dev forum
79215185-1feb-44c6@reddit
Those don't exist anymore because reddit killed them over a decade ago.
ironykarl@reddit
OK, well if this subreddit were dev related and not user related, you could maybe ask people to have some baseline experience or do some baseline research before asking questions...
As it is, this is a casual forum, and this person didn't do anything wrong
Jonrrrs@reddit (OP)
Thank you
LordAnchemis@reddit
ALL device drivers in linux exist as a 'stack' - which consists of (from the top):
These are 'supported' in various degrees of freedom
For Intel/AMD, they have chosen to use the open source Mesa (for userspace), include their kernel drivers into the linux kernel and supply the firmware (non-free) blobs freely for distros to repo
Nvidia, have decided to keep most things non-free
That is the issue
LetReasonRing@reddit
To clarify to those who aren't familiar with open source terminology, non-free blobs that are freely distributed means that the compiled firmware is free to use, but you get no access to seeing or modifying the source code
LordAnchemis@reddit
Yes thanks for the clarification
The firmware is non-free - as in proprietary - but the companies have made the binaries available for distros to include in their repo
Pretty much most firmware is non-free these days
sidusnare@reddit
Mostly there is a lot of differently licensed IP in the GPU, specifically things like Microsoft's DirectX, Khronos Group's OpenGL and Vulkan, MPEGLA's H.264/5, etc... It's difficult for corporations to give away, gratis or open source, the IP they've licensed from 3rd parties. Even when that IP is available to the FOSS community directly from those 3rd parties, because IP law is complicated, but improvements in lawyers understanding the FOSS community and the benefits being made apparent are making it easier these days.
Also, NVIDIA especially, as top dog in the GPU space, stands to loos a lot of knock offs start to flood the market because the source made it too easy to reverse engineer, or at least that's their fear. Corporate espionage would be more likely.
alexforencich@reddit
I would say there are multiple differences. First thing naturally is Nvidia likes to keep all of the internal magic sauce protected, so they prefer binary blobs for their driver which is harder to reverse-engineer, and these blobs are not distributed as part of the kernel itself. But, GPUs are quite complex and also have also been evolving quite rapidly so the GPU driver has to be updated regularly to keep up with bug fixes, new features, new models, etc. So even if it was fully open source, it might still need to be distributed as an out of tree module that has to be installed and updated separately. Also, I know at least on Windows, the driver stack contains a lot of game-specific code that has to be continuously updated, but I'm not sure if this is part of the kernel driver itself or part of the user space stack.
AFAIK Nvidia is pushing stuff out of the kernel driver and into the user space stack and/or firmware so that newer cards can use an actual open source kernel driver. Which tbh makes a lot of sense, at least in terms of being able to update the user space portion separately from the kernel driver. But from an open source perspective, it doesn't really change much as the firmware and user space portions are still proprietary.
ICantBelieveItsNotEC@reddit
Linux is a monolithic kernel, which means that drivers are supposed to be built in to the kernel itself. There isn't anything special about GPUs, the vast majority of them have drivers in the kernel just like everything else.
NVIDIA think that their code is too special to be in the kernel like everybody else's code, so they force you to download a binary blob and essentially monkey patch it into the kernel. There isn't any technical reason for doing so, they're just assholes.
Kevin_Kofler@reddit
Because NVidia is good at making all the new users believe that they need NVidia's proprietary GPU drivers to be able to use their computers. That is a lie.
Your GPU will be recognized out of the box with the Nouveau driver your distribution installs by default. Otherwise, you would not even get as far as being able to bring up a dialog that asks you to install the proprietary driver, because, guess what, that dialog and the whole desktop environment it runs under are displayed using Nouveau, or you would not see any darn thing.
Time_Way_6670@reddit
The nouveau driver does work but it’s not going to yield the best performance in either GPU heavy software OR your desktop environment.
The reality is you need the proprietary NVIDIA drivers to get the full performance from your GPU. You shouldn’t have to, but NVIDIA sucks, so you do.
Kevin_Kofler@reddit
Never claimed it will.
In the end, you have to decide what is more important to you: a small gain in performance that you are unlikely to even notice, or your freedom (and also convenience such as not having to recompile the kernel driver parts of the proprietary driver for every new kernel update).
Heck, for most users, if their CPU also has an IGP, they might actually be best off disabling the NVidia GPU entirely and rely on the IGP instead, saving a lot of power.
Time_Way_6670@reddit
Proprietary NVIDIA drivers don’t give you a “small bump”, they make the GPUs work as intended. Nouveau performs really badly for the majority of things that people want to use their graphics cards for.
Sure— if you just need to have a usable Desktop, then Nouveau works. But does video acceleration work? Nope. Will you have 3D performance? Nope. I use my system for gaming, OBS, Davinci Resolve, Blender; none of those things work correctly with Nouveau.
I’d argue most of the people who are switching to Linux right now are people who have gaming systems. Saying to them, “oh nouveau is fine” is going to sour them on the Linux experience. Having to deal with NVIDIAs non-free drivers is the price you have to pay if you want a fully working Linux desktop (with an NVIDIA card)
That being said though, I’m 100% switching to AMD next go around. I do not like NVIDIA’s behavior towards the Linux community and how they overprice their GPUs. But to say that Nouveau works when it does not is crazy.
And also, I’m not trying to disparage the nouveau project. Having open source drivers is good! But they don’t work well and unfortunately they just don’t work well enough to daily drive.
dddurd@reddit
you didn't struggle from broadcom/realtek wireless drivers. linux drivers are actually shittier compared to windows because by design api for drivers aren't stable and vendors have hard time keeping up with it.
danGL3@reddit
The only GPU that explicitly requires the installation of drivers on Linux to tap into their full performance are Nvidia cards.
Proprietary AMD drivers are only required for certain workloads, I also don't think proprietary Intel drivers even exist on Linux (correct me if I'm wrong)
79215185-1feb-44c6@reddit
AMD's GIM drivers would like to say hi.
TheOneTrueTrench@reddit
https://github.com/amd/MxGPU-Virtualization/ It looks like GIM is MIT, or am I missing something?
79215185-1feb-44c6@reddit
The open source MxGPU driver only supports like 3 GPUs where as the closed source one supports 6, including the V710.
The V710 in particular is an interesting card because cloud providers have been dumping them en masse for the past year but nobody should buy them because the driver they depend on cannot be obtained by end users and was apparently only available to specific cloud providers.
BlightWyrm@reddit
I have some Realtek WiFi adapter driver issues.
UntouchedWagons@reddit
There is proprietary stuff for intel gpus if you want access to all the transcoding capabilities but I don't think that's explicitly gpu driver stuff.
FriedHoen2@reddit
Yes, it's a firmware, enabling it you can encode vp9 video.
helgaardr@reddit
The issue lies in how the driver is licensed. Missing drivers are usually closed binary blob (partially also due to patents I guess), so no code availability and redistribution rules usually prevents distros to include them. This does not apply only to video cards though, my company uses cards that only have out of kernel binary drivers.
An open source drivers could be included directly in the kernel provided they have a kernel-compatible license, but even of the aren't included on the kernel distro can add them (eg. ZFS).
On the video card subject, most of the cards have a open driver available, just not with the same performance and features (due to lack of specs, NDAs and such).
fellipec@reddit
Some WiFi also dont ship in the kernel because proprietary firmware. Most distros include it for convenience, none notable exception was Debian, but they decided to include that too
DoubleOwl7777@reddit
thats an nvidia problem. amd and also intel (afaik) drivers are shipped in the kernel with pretty much every distro.
trowgundam@reddit
You shouldn't need any special driver for Intel or AMD. The normal drive included with the kernel and/or mesa should be more than enough. Now depending on your Distro you might need to install the userland portion of Vulkan (like vulkan-radeon on Arch), but that's it for the most part. Nvidia is because of the license on the driver. It can't be included directly in the kernel like AMD and Intel, so has to be downloaded separately.
Careful-Major3059@reddit
what this guy said 👆