Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
admkhalid

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

Recommended Posts

Posted · Original PosterOP

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 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-3820 | Corsair H100i | ASUS P9X79-LE | 16GB Patriot Viper 3 1866MHz DDR3 | MSI GTX 970 Gaming 4G | 2TB WD Blue M.2 SATA SSD | 2TB Hitachi Deskstar HDD | 1TB WD Black HDD | Corsair CX750M Fractal Design Define R5 Windows 10 Pro / Linux Mint 19 Cinnamon

 

Laptop:

Dell XPS 15 9560 4K Touch | Intel Core i5-7300HQ | 12GB Generic (Crucial?) 2133MHz DDR4 | Nvidia GTX 1050 | 256GB Toshiba M.2 NVMe SSD | Windows 10

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 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


Judge the product by it's own merits, not by the Company that created it.

 

 

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 post
Share on other sites
Posted · Original PosterOP
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 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 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 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.


My System - OS: Arch Linux CPU: Ryzen 3600 @ 4.1 Ghz 1.33v Motherboard: Asus Strix X470-I Gaming RAM: 2x16GB Corsair Vengeance RGB Pro @ 3200 CL16 GPU: MSI Radeon 5700XT Mech OC

Wifes System - OS: Manjaro Linux CPU: Ryzen 3600 @ 4.1 Ghz 1.32v Motherboard: Asus Crosshair VI Hero X370 RAM: 2x8GB Corsair Vengeance RGB Pro @ 3200 CL16 GPU: AMD 5700XT Reference Card

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 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 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


×