# NVidia fails on 11.2-Prerelease



## tankist02 (May 7, 2018)

I know this is not a real release, I hoped that release 11.2 is pretty close and (almost) everything should work.

OS:

```
root@clinton:usr# uname -a
FreeBSD clinton 11.2-PRERELEASE FreeBSD 11.2-PRERELEASE #0 r333226: Fri May  4 05:48:18 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
```

Video card:

```
vgapci0@pci0:1:0:0:    class=0x030000 card=0x094e103c chip=0x107d10de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GF119 [NVS 310]'
    class      = display
    subclass   = VGA
```

Driver:

```
root@clinton:usr# pkg info nvidia-driver
nvidia-driver-390.48
Name           : nvidia-driver
Version        : 390.48
Installed on   : Fri May  4 20:42:23 2018 PDT
Origin         : x11/nvidia-driver
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : x11 kld
Licenses       : NVIDIA
Maintainer     : danfe@FreeBSD.org
WWW            : http://www.nvidia.com/object/unix.html
Comment        : NVidia graphics card binary drivers for hardware OpenGL rendering
Options        :
    ACPI_PM        : off
    DOCS           : on
    LINUX          : on
    WBINVD         : off
Shared Libs required:
    libXext.so.6
    libX11.so.6
Shared Libs provided:
    libnvidia-ml.so.1
    libnvidia-eglcore.so.1
    libGL.so.1
    libvdpau_nvidia.so.1
    libnvidia-glsi.so.1
    libnvidia-cfg.so.1
    libGLESv1_CM.so.1
    libEGL.so.1
    libGLESv2.so.2
    libnvidia-glcore.so.1
    libnvidia-tls.so.1
Annotations    :
    FreeBSD_version: 1101001
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 167MiB
Description    :
These are the official NVidia binary drivers for hardware OpenGL rendering
in X11, using the GLX extensions.

WWW: http://www.nvidia.com/object/unix.html
```

Kernel:

```
oot@clinton:usr# kldstat
Id Refs Address            Size     Name
 1   56 0xffffffff80200000 2015fe0  kernel
 2    1 0xffffffff82217000 381080   zfs.ko
 3    2 0xffffffff82599000 a380     opensolaris.ko
 4    1 0xffffffff825a4000 8998     mmcsd.ko
 5    1 0xffffffff825ad000 15da0    fuse.ko
 6    1 0xffffffff825c3000 2d40     coretemp.ko
 7    1 0xffffffff825c6000 fc58     tmpfs.ko
 8    3 0xffffffff825d6000 87f8     libiconv.ko
 9    1 0xffffffff825df000 37f8     libmchain.ko
10    1 0xffffffff825e3000 1100     cd9660_iconv.ko
11    1 0xffffffff825e5000 1118     msdosfs_iconv.ko
12    3 0xffffffff825e7000 a4ab8    linux.ko
13    3 0xffffffff8268c000 92c0     linux_common.ko
14    1 0xffffffff82821000 f4039    nvidia-modeset.ko
15    1 0xffffffff82916000 c40908   nvidia.ko
16    1 0xffffffff83557000 1780     uhid.ko
17    1 0xffffffff83559000 31e50    linux64.ko
18    1 0xffffffff8358b000 2328     ums.ko
```

Error:

```
May  6 17:50:12 clinton kernel: NVRM: RmInitAdapter failed! (0x26:0x1a:1123)
May  6 17:50:12 clinton kernel: nvidia0: NVRM: rm_init_adapter() failed!
```


----------



## SirDice (May 7, 2018)

Because it's a kernel module it's highly dependent on the version of the kernel. The packages assume a 11.1 kernel. On 11-STABLE you'll need to build it from ports so it's properly linked to the correct kernel version.


----------



## tobik@ (May 7, 2018)

tankist02 said:


> ```
> Annotations :
> FreeBSD_version: 1101001
> repo_type : binary
> ...


So the kernel module is compiled for 11.1-RELEASE. I bet you can solve this by recompiling x11/nvidia-driver for 11.2.  Make sure you have the right source tree in /usr/src when you do.


----------



## tankist02 (May 7, 2018)

Thanks a lot, will try this evening when at home.


----------



## tankist02 (May 8, 2018)

Worked like a charm. So, even though 11.2 is supposed to be the same interface for ports as 11.1 I still need to rebuild some ports like NVidia driver.


----------



## SirDice (May 8, 2018)

> So, even though 11.2 is supposed to be the same interface for ports as 11.1 I still need to rebuild some ports like NVidia driver.


The kernel ABI is different and the NVidia driver includes a kernel module. So the NVidia kernel module needs to be built for the correct ABI version.


----------



## ls4680 (Oct 22, 2018)

FYI - I received this same error when from FreeBSD 11.1 I did `freebsd-update -r 11.2-RELEASE upgrade`

The problem fixed itself when I did:
`portsnap fetch update
pkg update
pkg upgrade
reboot`


----------

