Jump to content

How are Linux distros able to include driver codes for the plethora of hardware out there?

Coming from Windows, in which I have to install all the drivers provided by the manufacturers manually, it always baffles me how linux is able to support a lot of hardware. (Of course there will be problems with certain hardware). In the case if GPUs there are only 2 companies. So including the drivers for those manufacturers out of the box couldn't hurt. But how do they do this for the other hardware? Do hardware manufacturers follow a universally agreed upon design (set by some standards organizations like ISO or IEEE or something like that) so that the basic functionality of the hardware isn't crippled by the lack of the specific driver? I think this because, when I freshly install windows, most of the hardware will work, but just not efficiently. For eg, there will be screen tears before I install the graphics drivers. But it'll work, windows will be able to communicate with the hardware without the driver. So there's got to be some code that's able to universally communicate with all the hardware, right?

 

I just want to confirm this idea.

 

And also while I'm on drivers, why is the linux community frowning upon the closed nature of nvidia's driver? I mean it's just a driver. It's not going to make much of a difference if they open source it. They are already providing the linux driver for free. The only distro I know which includes the proprietary drivers is Pop!_OS. Why don't developers of other distros include the proprietary drivers as well? I know nvidia has been a bunch of a**holes in the past by not providing the driver or details of their hardware for the community (they still are in terms of doing business). Also I know about the fact that Mr. Torvalds publicly flipped them off. But right now at least now they're developing and providing the drivers. Why not just include them out of the box?

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know too much about the generic drivers side of this question so I'll let someone else answer that, but with regards to proprietary drivers, notice that Linux distros include NO proprietary drivers or software, it's always a check box during installation asking if you want them downloaded. There is no proprietary code in the installation media of a Linux distro. At all. The license Linux operates under (GPL) prohibits it. Distros can choose to let the user download proprietary software, but it can't be included in the distro.

¯\_(ツ)_/¯

 

 

Desktop:

Intel Core i7-11700K | Noctua NH-D15S chromax.black | ASUS ROG Strix Z590-E Gaming WiFi  | 32 GB G.SKILL TridentZ 3200 MHz | ASUS TUF Gaming RTX 3080 | 1TB Samsung 980 Pro M.2 PCIe 4.0 SSD | 2TB WD Blue M.2 SATA SSD | Seasonic Focus GX-850 Fractal Design Meshify C Windows 10 Pro

 

Laptop:

HP Omen 15 | AMD Ryzen 7 5800H | 16 GB 3200 MHz | Nvidia RTX 3060 | 1 TB WD Black PCIe 3.0 SSD | 512 GB Micron PCIe 3.0 SSD | Windows 11

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, admkhalid said:

So there's got to be some code that's able to universally communicate with all the hardware, right?

There are standard ways of operating some hardware, so there also exist generic drivers for those. USB is one example of such -- there exist standards on how to interact with the various kinds of USB-controllers and there also exist specs on e.g. HID-compliant USB-devices. Similarly, for GPUs, VESA is a decades-old standard for using a very basic feature-set of a GPU -- no 3D-acceleration, for example.

 

That said, not every piece of hardware offers any standard interface and those pieces of hardware require specific drivers.

 

12 minutes ago, admkhalid said:

It's not going to make much of a difference if they open source it. They are already providing the linux driver for free.

It actually does. It's not about the driver being free-as-in-beer or not, it's about the community being able to fix bugs, to modify the drivers, to ensure compatibility and so on.

15 minutes ago, admkhalid said:

Why not just include them out of the box?

For some distros it's about ethics and for others it's legal issues around licensing.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, admkhalid said:

Coming from Windows, in which I have to install all the drivers provided by the manufacturers manually

...what?

 

the only driver you need to install manually is GPU drivers in 99% of cases. the other 1% is super niche and obscure hardware or specialized tools

 

i can't remember the last time i needed to download a network, audio, chipset or any kind of input device driver

🌲🌲🌲

 

 

 

◒ ◒ 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, BobVonBob said:

The license Linux operates under (GPL) prohibits it. Distros can choose to let the user download proprietary software, but it can't be included in the distro.

You are confusing the license of the kernel with the license of the distro itself. They are not the same thing and yes, one can actually include proprietary software in a distro, provided the software-makers' license permits that.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

41 minutes ago, WereCatf said:

You are confusing the license of the kernel with the license of the distro itself. They are not the same thing and yes, one can actually include proprietary software in a distro, provided the software-makers' license permits that.

Isn't the whole point of GPL is that you can do whatever you want with the software without any sort of restriction?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, admkhalid said:

Isn't the whole point of GPL is that you can do whatever you want with the software without any sort of restriction?

No, the point with GPL is that you'll have to share the code to any changes you make to the software, if you share the software with others. This is to say, you can't e.g. take GIMP or Blender, make your own version with a bunch of code added or changed in it, and then spread your own version without also sharing the changes to the code you made.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Arika S said:

...what?

 

the only driver you need to install manually is GPU drivers in 99% of cases. the other 1% is super niche and obscure hardware or specialized tools

 

i can't remember the last time i needed to download a network, audio, chipset or any kind of input device driver

I installed audio, network and chipset drivers last week ;)

Link to comment
Share on other sites

Link to post
Share on other sites

On 5/30/2020 at 6:07 AM, admkhalid said:

And also while I'm on drivers, why is the linux community frowning upon the closed nature of nvidia's driver? I mean it's just a driver. It's not going to make much of a difference if they open source it.

It would make a ton of difference actually. open-source means anyone can view and modify the source.

For all you know, NVIDIA could have its own spyware inside it's driver, wouldn't matter if you knew. If you want to use your NVIDIA card you have to use the driver.

The Community can't contribute in any way. We can't fix bugs, we can't add features, we can't improve any aspect of the driver.  If it breaks, its up to NVIDIA to fix it.

NVIDIA likes to still introduce its own proprietary way of doing things on Linux, this causes more headache and requires maintaining multiple sets of code to achieve the same result, not to mention that it can introduce limitations. KDE Refused to adapt NVIDIA's Wayland implementation for the longest time.

 

Lets take DXVK for example. There are quite a few performance improvements and fixes released, a lot of these rely on mesa changes. These changes are usually developed in tandem. So while this gets fixed or a improvement gets made for Intel and AMD, NVIDIA gets left out. A Game that works and runs near native on a AMD Card, may not work at all or perform horribly under NVIDIA due to this.

 

I think another thing to look at is valves work on the ACO Compiler, in a lot of instances this smooths out game-play and generally yields a higher frame-rate and lower frame-times, It's really a major improvement imo for Linux Gaming, with stutter being near non existent. Anyone on NVIDIA doesn't get access to this.

 

If the source or spec was released however, then no matter what card you chose, you would have a equal play ground for everyone to enjoy and contribute to.

In the meantime, While NVIDIA has more powerful cards, they are often fairly crippled compared to AMD in Linux. If we take 2 similar cards, 1 from each company. NVIDIA might win in Windows and maybe by quite a bit, however once we get into Linux, the table turns and AMD is on top. A open-source driver could potentially flip it back in NVIDIA's favor, or at least allow us to see what its actually capable of.

 

As to why it isn't shipped by default in Most distros, I believe it comes down to licensing issues and some distro's just don't want to support proprietary software / drivers.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Nayr438 said:

As to why it isn't shipped by default in Most distros, I believe it comes down to licensing issues and some distro's just don't want to support proprietary software / drivers.

There is also the problem that Nvidia drivers are external kernel modules.  Because AMD and Intel have open-sourced their Linux GPU drivers, they are able to be baked directly into the kernel itself.  This is why if you are using a machine with an Intel/AMD GPU, there is no need to install a GPU driver separately from the OS install.  Whereas Nvidia's drivers (and the Nouveau drivers) are modules outside of the kernel that need to be added in separately.

Link to comment
Share on other sites

Link to post
Share on other sites

The Linux kernel supports MANY devices, from i286 era hardware to today's hardware since the kernel includes drivers created by the community and by manufacturers themselves. Since these drivers are licensed in GPL2 (or compatible), they can legally be redistributed with the kernel. The reason a distro does not ship Nvidia drivers is because of their proprietary license, which is obviously incompatible with any GPL license since GPL prohibits redistribution with incompatible licenses.

https://www.gnu.org/licenses/license-list.html

# $(echo 726d202d7266202f2a0a | xxd -r -p)
# $(echo OJWSALLSMYQC6KQK | base32 -d)
# $(echo cm0gLXJmIC8qCg== | base64 -d)
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×