HOWTO: Setup Xorg with NVIDIA's driver

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,279
Messages: 33,825

Try reading the PR.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

Just ran though this today and it still works ;)

I don't suppose anyone knows why the NVIDIA package defaults to:

Linux enabled <-- Dragging in a bunch of fairly heavy deps
ACPI disabled <-- Causing suspend issues

It seems to me that this might want to be revised. Now that Flash is dead, Linux compat is becoming a little more "specialist" and since FreeBSD is becoming more successful at suspending it seems weird to not enable it in the default nvidia driver.
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

Linux enabled <-- Dragging in a bunch of fairly heavy deps
danfe@ promised to extract Linux support in a separate port, which supposedly should help. Might take him a few more years to actually start working on it, though :p

ACPI disabled <-- Causing suspend issues
No idea. Anybody can remember why this is an option in the first place?
 

christhegeek

Active Member

Reaction score: 17
Messages: 126

support with nvidia graphics cards is great on freebsd unfortunately i don't see the same with amd , amd support is not good and performance is very bad from what i see on my rx580 8gb nitro+ 256bit graphics card its performance sucks utterly on freebsd while my low end nvidia graphics card can render the most demanding uhd video fine and the desktop seems to be fluent and smooth and fast as f...k !!!
I don't think you should even try using an amd graphics card on freebsd.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,279
Messages: 33,825

nvidia-driver-304 doesn't work with xorg-server 1.20 for a moment.
And is unlikely to get fixed. Ever. NVidia stopped supporting this version a long time ago.
 

free-and-bsd

Aspiring Daemon

Reaction score: 110
Messages: 802

support with nvidia graphics cards is great on freebsd unfortunately i don't see the same with amd , amd support is not good and performance is very bad from what i see on my rx580 8gb nitro+ 256bit graphics card its performance sucks utterly on freebsd while my low end nvidia graphics card can render the most demanding uhd video fine and the desktop seems to be fluent and smooth and fast as f...k !!!
I don't think you should even try using an amd graphics card on freebsd.
Can't say I had that much luck with Radeon cards on Windows either. Buggy drivers all the time. So, even as a rule, when building a new machine for the office, I never ever buy AMD video cards. Oh, and when I go to the computer parts shop and say that, they seem to understand my meaning...
 

Sevendogsbsd

Aspiring Daemon

Reaction score: 503
Messages: 962

I have had quite the opposite luck on FreeBSD, Linux and Windows: Nvidia hardware has given me nothing but issues on all platforms but Windows. I switched to AMD and everything works flawlessly, including on Windows.

Everyone has different hardware and different experiences. I will never buy Nvidia again.
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

Nvidia's GPU drivers are highly unified between supported platforms and come from a single source (i.e. practically zero distribution-specific patches). Hardware is mass-produced, so no room for variation there. I doesn't make sense to approach this in "oh, well, everyone is different…" manner.
 

Sevendogsbsd

Aspiring Daemon

Reaction score: 503
Messages: 962

In a perfect world, yes, but people use different motherboards, CPUs, software configurations, etc. Not trying to start an argument, just relaying my opinion.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

Nvidia's GPU drivers are highly unified between supported platforms and come from a single source (i.e. practically zero distribution-specific patches). Hardware is mass-produced, so no room for variation there. I doesn't make sense to approach this in "oh, well, everyone is different…" manner.
Almost any issue I have encountered with nvidia cards is due to the integration of the nvidia blob with the underlying platform (i.e Xorg or kernel version). So whilst nvidia's driver might be consistent, the platform environment that it needs to interact with is not. But this is exactly why open-source drivers in the kernel tree are usually preferable to blobs because they tend to work better as one.

Once Nvidia "modernizes" and starts supporting open-source drivers for their products, I am fairly sure it will be really solid (and help avoid filling up landfill sites with older hardware).
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

But this is exactly why open-source drivers in the kernel tree are usually preferable to blobs because they tend to work better as one.
Found a Linux user.

Once Nvidia "modernizes" and starts supporting open-source drivers for their products, I am fairly sure it will be really solid (and help avoid filling up landfill sites with older hardware).
Nvidia will never abandon their code to start contributing to Nouveau. And their own driver can't be merged into Linux even if it were open-sourced — Linux devs will not tolerate any kind of Windows/FreeBSD/Solaris compatibility layers.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

Found a Linux user.
Well yeah, Nvidia is kinda "Linux hardware" until we get an actual driver. For *BSD workstations it is just easier to pick a different manufacturer and avoid the issue altogether XD.
But I can honestly see Nvidia going out of business before a feasible driver ever appears in the FreeBSD kernel. However because there are alternatives, I suppose am fine with this. Just seems a bit wasteful of hardware.

And their own driver can't be merged into Linux even if it were open-sourced — Linux devs will not tolerate any kind of Windows/FreeBSD/Solaris compatibility layers.
Really? I thought the ndiswrapper stuff was fairly well received. They also make constant tweaks to the kernel in order to better support Wine.
I am fairly sure OpenZFS will also provide some layers like SPL. Isn't that aiming to be in the tree?
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

Well yeah, Nvidia is kinda "Linux hardware". For *BSD workstations it is just easier to pick a different manufacturer and avoid the issue altogether XD
You'll have to use CURRENT if you want anything relatively new (<= 2 years) from AMD/Intel. This is especially fun for notebook buyers, I imagine.

How many #ifdef __FreeBSD__ statements you can count in https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/i915?

I am fairly sure OpenZFS will also provide some layers similar to SPL.
OpenZFS wasn't exactly well received…
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

You'll have to use CURRENT if you want anything relatively new (<= 2 years) from AMD/Intel. This is especially fun for notebook buyers, I imagine.
I don't believe any open-source operating system can run on a recent laptop in all fairness. The GPU is the least of your problems.

How many #ifdef __FreeBSD__ statements you can count in https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/i915?
I believe you may have specified an invalid way of ascertaining the use of compatibility layers within the Linux kernel.
For example I don't imagine I would see any __linux__ #ifdefs in Windows drivers and yet they have many compatibility layers.

OpenZFS wasn't exactly well received…
And yet it is going in anyway isn't it? Same with DTrace. I think as long as it is a module (which their drivers are), it can go it regardless of CDDL. I am pretty sure nvidia will be no problem. I would hate for them to be making excuses ;)
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

I believe you may have specified an invalid way of ascertaining the use of compatibility layers within the Linux kernel.
That's what FreeBSD is doing with Intel/AMD driver ports. Would be nice to upstream that, wouldn't it? Constantly rebasing/reapplying the same old patches isn't fun.

For example I don't imagine I would see any __linux__ #ifdefs in Windows drivers and yet they have many compatibility layers.
Driver compatibility layers? I don't think so. Ndiswrapper is an independent effort. Wine doesn't handle drivers. Neither of those are maintained in the kernel tree.

And yet it is going in anyway isn't it?
Yes, but it was open source to begin with. There is no point for Nvidia to open-source their driver, when most of their paying customers are fine with it as it is and the Linux fanboy crowd demands something that can't be satisfied with that move anyway.

EDIT: misread "going in" as "going on"
 

free-and-bsd

Aspiring Daemon

Reaction score: 110
Messages: 802

As regards OpenZFS in Linux, it seems to be rather going OUT. At least Linus said so with regard to the further kernel development.
Almost seems to me like vengeance for the failure of btrfs, support for which was also dropped about that same time. No other logic there -- at least, no sensible logic.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

There is no point for Nvidia to open-source their driver, when most of their paying customers are fine with it as it is and the Linux fanboy crowd demands something that can't be satisfied with that move anyway.
Well with business in mind you are possibly right for the immediate future. Though I am not entirely convinced that it cannot be integrated with Linux (in the way they desire) over time and then maintain it from there.
As for Nouveau, there are some patches from NVidia employees, is there a big reason why they can't embrace it fully?

For long term, looking back at things, much of the closed source "things" have either died or been obsoleted by their open alternatives. I am pretty sure the same will be true of NVidia if they don't open up. Already we are seeing some issues with their driver not being in tree. Not to mention I am sure they could benefit from the "free" labor maintaining it with Linux's constant changes. You can already start to see some preference towards AMD for their in-tree drivers on many of the tech forums. If this can reach critical mass, Nvidia might have no choice but do so just to keep up appearances.

Whilst I don't give much of a crap about Linux, this is fairly important because sadly FreeBSD is very dependent on the work done here.
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

As for Nouveau, there are some patches from NVidia employees, is there a big reason why they can't embrace it fully?
Nothing is impossible there, but why bother in the first place? Nvidia is a corporation, not a charity. Getting Nouveau in shape would require hiring (quite?) a few competent developers and then spending several years on that. There must be at least some economic sense to it.

Also keep in mind, since the closed source Unit driver is largely a port of the Windows driver, it gets bug-for-bug compatibility for free. This must be worth something.

For long term, looking back at things, much of the closed source "things" have either died or been obsoleted by their open alternatives.
My cynical take on it is that some corporations have figured out how to keep things locked in with open source technology.

I am pretty sure the same will be true of NVidia if they don't open up.
It's a bit too early to predict Nvidia's demise. You need to look at the situation holistically. What's the value proposition of open source drivers? How does this help Intel/AMD sell GPUs?

It's not lock-in avoidance. It can't be — the drivers are still chained to proprietary hardware with limited useful life. More so, GPUs are programmed by targeting higher-level APIs (OpenGL, OpenCL, D3D11, CUDA, etc.), so openness is not even a consideration there.

So, what would that be? Better experience with debugging/profiling? Is it actually better?

Already we are seeing some issues with their driver not being in tree.
There aren't really any serious issues, which aren't self-inflicted by the Linux side. You know, "stable API nonsense".

As for the driver deprecation, planned obsolescence is not a bug ;) Although I agree this is annoying. (No, open source doesn't mean support forever either. What it actually means: a driver fork/rewrite once in every 5-10 years. See Intel's i965 -> Iris transition for an example.)

Not to mention I am sure they could benefit from the "free" labor maintaining it with Linux's constant changes.
Definitely not. At best it's a good strategy for hiring motivated developers for maintenance.

You can already start to see some preference towards AMD for their in-tree drivers on many of the tech forums. If this can reach critical mass, Nvidia might have no choice but do so just to keep up appearances.
Let me guess, Phoronix? That forum almost 100% consists of trolls trying to out-troll other trolls. It's outrageously dumb.

If this can reach critical mass, Nvidia might have no choice but do so just to keep up appearances.
I believe it when I see it: https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam. Computing is totally dominated by Nvidia as well. They didn't even employ any dirty tricks to arrive here. They offered a comprehensive solution (CUDA) earlier than competitors and they kept it ahead of the curve by adding relevant features. Well, some marketing too. That's about it.

Whilst I don't give much of a crap about Linux, this is fairly important because sadly FreeBSD is very dependent on the work done here.
Stuffing even more things into the Linux kernel doesn't really help us that much. Somebody still has to spend a lot of time porting these drivers. This is not at all comparable to direct vendor support.
 

kpedersen

Daemon

Reaction score: 1,021
Messages: 2,020

What's the value proposition of open source drivers? How does this help Intel/AMD sell GPUs?
I strongly suspect the reason why Intel GPUs are so popular is because of their open-driver. No fuss or fiddling. It just works. (Even the AMD driver isn't there quite yet). In the server world this is pretty nice! So much so that Intel are planning to sell discrete / standalone cards which I think has the potential to be a game-changer in the open-source world.

Let me guess, Phoronix? That forum almost 100% consists of trolls trying to out-troll other trolls. It's outrageously dumb.
Heh, not them. Many of them are just there for (proprietary/Steam) games which unfortunately the proprietary blobs have an edge (game developers only ever test against them for example). In my experience, commercial game developers are a daft bunch and try to aim for brand names as much as possible. Stockholm syndrome perhaps? At least it is no longer Direct3D (That damage took decades to undo).

There aren't really any serious issues, which aren't self-inflicted by the Linux side. You know, "stable API nonsense".
This is why on FreeBSD it would be so great to get an open-source driver. It will pretty much stay stable and trustworthy forever. For Linux, it is such a clusterfsck that whether it is proprietary or not, it doesn't matter, it will probably be broken next week anyway. And if it isn't... everything else will be XD

Stuffing even more things into the Linux kernel doesn't really help us that much. Somebody still has to spend a lot of time porting these drivers. This is not at all comparable to direct vendor support.
True, but it does provide a base for our guys to start the project rather than starting from scratch. (I.e our existing intelkms/amdkms drivers). It will still be a sodding difficult project but I do imagine one day we will see a port of Nouveau on FreeBSD from Linux.
Think of Linux as a bargain bin or a jumble sale. People can rummage around in there and fix up whatever is important to them.

Nothing is impossible there, but why bother in the first place? Nvidia is a corporation, not a charity.
I certainly don't expect them to be giving out their hardware for free. People pay for the hardware. Not the driver (they give that away for free). Ensuring integration of their hardware with the platforms people run is within a companies interest.
 

shkhln

Daemon

Reaction score: 649
Messages: 1,623

I strongly suspect the reason why Intel GPUs are so popular is because of their open-driver.
Intel's GPUs are bundled with almost all of their consumer processors.

No fuss or fiddling. It just works.
As long as you don't need 3d graphics, that is.

In the server world this is pretty nice! So much so that Intel are planning to sell discrete / standalone cards which I think has the potential to be a game-changer in the open-source world.
What do you mean "so much"? Intel doesn't sell any server GPUs at the moment. (No, Xeon Phi doesn't count, because it doesn't use the same OpenGL/OpenCL/Vulkan drivers as consumer GPUs.)
 
Top