# 11.3R "no linux support in kernel"? (nvidia driver installs fail)



## MMacD (Jul 28, 2019)

I have an old nvidia graphics card that needs the v340 driver.  But it won't install, nor will the 304 driver, because they claim that the 11.3R kernel has no linux support.  What's the deal with that?


----------



## rigoletto@ (Jul 28, 2019)

Disable the Linux OPTION of the nvidia port.


----------



## T-Daemon (Jul 28, 2019)

Or before attempting to install the NVIDIA driver execute `kldload linux`.

I'm running a NVIDIA driver myself and prefere build from port, without linux support. If linux support is not needed, building the port without has the advantage there will be no unnecessary linux dependecies installed.


----------



## MMacD (Jul 28, 2019)

The installer utility really needs work to meet the needs of non-hobbyists, especially those who are, like me, old enough that the links to organic memories fade away unless constantly refreshed.

I'd guess that most people for whom FreeBSD is a tool rather than a pastime prefer a stable system and upgrade as infrequently as possible. But being able to do that is undermined by gratuitous changes between releases when the install utility doesn't fill in the blanks.

For example, the nvidia driver shouldn't expect linux compat.  Ideally, the installer should ask whether linux compat is wanted and perhaps supply a list of apps that require it, asking whether the person installing expects to use any of them or needs linux compat for some other reason --- and then do whatever editing is necessary to implement the person's choice.

And then there's the Intel gigabit driver.  I'm pretty sure I didn't have to install it by hand under 11.1R, but it appears that I'll have to under 11.3R because, though the card still appears to work correctly at the hardware level, neither `ping` nor `traceroute` do anything now.


----------



## aht0 (Jul 29, 2019)

You mean the em driver? 3 cards in use (Pro1000PT & i217), seem to function just fine by default.. I am using more recent FreeBSD tho (12-STABLE/13-CURRENT).


----------



## SirDice (Jul 29, 2019)

MMacD said:


> Ideally, the installer should ask whether linux compat is wanted and perhaps supply a list of apps that require it


This isn't possible with packages. Package dependencies are "set in stone" once the package has been created.


----------



## Phishfry (Jul 29, 2019)

aht0 said:


> You mean the em driver? 3 cards in use (Pro1000PT & i217), seem to function just fine by default.. I am using more recent FreeBSD tho (12-STABLE/13-CURRENT).


I don't feel this is giving the issue justice.
When the iflib conversion happened they also merged em and igb interfaces.
Many custom tweaks made over the years were lost on both interfaces.
They have not been restored and the quality of Intel gigabit driver has defiantly taken a hit.
I don't like to hash out bad news but this is a real issue.
Go look at all the recent Intel interface bugs on bugtracker.




__





						em performs worse than igb (latency wise) in 12?
					





					lists.freebsd.org


----------



## aht0 (Aug 10, 2019)

Phishfry said:


> I don't feel this is giving the issue justice.
> When the iflib conversion happened they also merged em and igb interfaces.
> Many custom tweaks made over the years were lost on both interfaces.
> They have not been restored and the quality of Intel gigabit driver has defiantly taken a hit.
> ...


If you say so. But I am not using any custom tweaks or anything either. Just OTB FreeBSD in a home server and firewall. Not pfSense or OPNSense or FreeNAS or anything. For me `em` seems to work. I haven't tested it, haven't felt the need or reason. Just have to take your word about the changes in code and possible problems. Thanks for pointing it out for me.


----------



## Phishfry (Aug 10, 2019)

These are not isolated corner cases.




__





						Regression in IXGBE(4) on 12.0-RELEASE?
					





					lists.freebsd.org
				








__





						239704 – ixgbe(4): Only one queue (of eight) enabled on 12.0-RELEASE (ProLiant DL380 Gen10)
					






					bugs.freebsd.org
				





> The driver that is in 12.0 uses the iflib framework, which makes it impossible to port 3.3.6 into BASE.


----------



## Phishfry (Aug 10, 2019)

To the OP of this thread. Everyone is leading you astray.
You need 64 bit Linix module on FreeBSD 64 bit versions.
`kldload linux64`
Then install your nvidia package.


----------



## MMacD (Aug 10, 2019)

SirDice said:


> This isn't possible with packages. Package dependencies are "set in stone" once the package has been created.


Ah, sorry, SirD, I didn't really express myself at all well.  What I was (incoherently) complaining about is the inclusion in the package of an enormous amount of code, including linux, that has _nothing at all_ to do with driver functionality.  

What's worse is that (iirc) it's also in the port by default.  I'd have to do my own porting to get rid of it.   (it's interesting, but very obnoxious, that configuration almost never allows the configurer to include or exclude functional blocks; generally the limits are whether to include docs and similarly peripheral material.)


----------



## T-Daemon (Aug 11, 2019)

Since I recommanded loading linux.ko:


Phishfry said:


> To the OP of this thread. Everyone is leading you astray.
> You need 64 bit Linix module on FreeBSD 64 bit versions.
> `kldload linux64`
> Then install your nvidia package.


You are mistaken. There is no rule linux64.ko for 64 bit FreeBSD. We are talking about running Linux binaries on FreeBSD with the help of a Linux binary compatibility layer( handbook, linux(4)). 

If those Linux binaries are 32 bit, module linux.ko is needed, if they are 64 bit, module linux64.ko, nothing to do with the 64 bit version of FreeBSD.

In case of x11/nvidia-driver, if you inspect the *pkg-plist* closely you will notice the NVIDIA driver provides 32 and 64 bit Linux libraries, i.e:

/compat/linux/usr/*lib*/libEGL_nvidia.so.0
/compat/linux/usr/*lib64*/libEGL_nvidia.so.0

Loading exclusively linux64.ko is not required to satisfy the driver installation, nor is it the only viable Linux compatibility on 64 bit FreeBSD to run OpenGL programs. In fact till nvidia-driver version 390.87_1 only 32 bit libraries were availaible to run Linux OpenGL programs. See commit history.

Furthermore, if linux_enable="YES" is set in rc.conf, you may notice both linux kernel modules are loaded.


----------



## aht0 (Aug 12, 2019)

You could just build x11/nvidia-driver from ports, without "Linux" knob turned on (it is by default). I've made relevant changes to my own /etc/make.conf.
You need to have FreeBSD sources in /usr/src for building the driver from ports tho.


----------

