# nvidia install fails [solved]



## Rita G. (Oct 23, 2016)

FreeBSD 11.0 KDE Asus GTX970

Trying to install nvidia driver and get:



```
# pkg install nvidia-driver

Updating FreeBSD repository catalogue...

FreeBSD repository is up-to-date.

All repositories are up-to-date.

Checking integrity... done (0 conflicting)

The following 2 package(s) will be affected (of 0 checked):



New packages to be INSTALLED:

nvidia-driver: 367.44

linux_base-c6: 6.8_1



Number of packages to be installed: 2



The process will require 340 MiB more space.



Proceed with this action? [y/N]: y

[1/2] Installing linux_base-c6-6.8_1...

Cannot install package: kernel missing Linux support

pkg: PRE-INSTALL script failed
```

can someone please help me?


----------



## Deleted member 48958 (Oct 23, 2016)

Rita G. said:


> ```
> Cannot install package: [u]kernel missing Linux support[/u]
> pkg: PRE-INSTALL script failed
> ```


To load Linux kernel module, execute as root
`# kldload linux`

Install nvidia-driver package
`# pkg ins nvidia-driver`

Then don't forget to add

```
nvidia_load="YES"
```
 to /boot/loader.conf,
and 
	
	



```
linux_enable="YES"
```
 to /etc/rc.conf.


Or you can build nvidia-driver without linux compatibility support,
`# cd /usr/ports/x11/nvidia-driver && make config`






`make install clean`


Note:
nvidia-driver package installs nvidia-driver-367,
be sure you need this one, because x11/nvidia-driver-340 and x11/nvidia-driver-304 are also available.


----------



## Rita G. (Oct 24, 2016)

dammit I made a typo error in /etc/rc.conf and I cannot change it and system will not boot.


----------



## SirDice (Oct 24, 2016)

Boot to single user mode, fix /etc/rc.conf and boot normally.


----------



## Rita G. (Oct 24, 2016)

SirDice said:


> Boot to single user mode, fix /etc/rc.conf and boot normally.



tried that with nano; it will not let me edit. says 'read-only file'


----------



## SirDice (Oct 24, 2016)

For UFS:

```
fsck -y
mount -u /
mount -a -t ufs
```
For ZFS:

```
zfs set readonly=false zroot
```


----------



## Rita G. (Oct 24, 2016)

thank you SirDice, that (for UFS) worked and i edited /etc/rc.conf and booted back to KDE desktop. But I still do not have nvidia driver installed after doing post #2


----------



## SirDice (Oct 24, 2016)

What does `pkg info nvidia-driver\*` return?


----------



## Deleted member 48958 (Oct 24, 2016)

Also you need to create xorg.conf file after nvidia-driver installation,
you can do that via x11/nvidia-xconfig utility.
Install nvidia-xconfig
`# pkg ins nvidia-xconfig`
Then execute as root
`# nvidia-xconfig`


----------



## Rita G. (Oct 25, 2016)

thanks for replies,
entered

```
# pkg ins nvidia-xconfig
# nvidia-xconfig
```
rebooted and boot sequence brings me to scrambled artifaxed login window that i cannot see.

`pkg info nvidia-driver\*` gives nvidia-driver 367.44


----------



## SirDice (Oct 25, 2016)

```
dice@williscorto:~> pkg info -D nvidia-driver
nvidia-driver-367.44:
Always:
To use these drivers, make sure that you have loaded the NVidia kernel
module, by doing

        # kldload nvidia        (or nvidia-modeset, see below)

or adding

        nvidia_load="YES"       (or nvidia-modeset_load="YES", see below)

to /boot/loader.conf, or putting ``nvidia'' (or ``nvidia-modeset'', see
below again) on ``kld_list'' variable in /etc/rc.conf.

If you build this port with FreeBSD AGP GART driver, make sure you have
agp.ko kernel module installed and loaded, since nvidia.ko will depend
on it, or have your kernel compiled with "device agp".  Otherwise, the
NVidia kernel module will not load.  Also, please set correct value for
``Option "NvAGP"'' in ``Device'' section of your X11 configuration file.

When building with Linux compatibility support, make sure that linux.ko
module is available as well (or have it compiled in kernel).  It can be
loaded via /boot/loader.conf, or later in the boot process if you add

        linux_enable="YES"

to your /etc/rc.conf.

If X.org cannot start and reports

        (EE) NVIDIA(0): Failed to obtain a shared memory identifier.

in /var/log/Xorg.0.log while actually you have ``options SYSVSHM''
enabled in kernel, the sysctl ``kern.ipc.shmall'' should be increased.

Starting with version 358.09, some important functionality of the driver
has been broken out into a separate kernel module, nvidia-modeset.ko.
Users that experience hangs when starting X11 server, or observe

        (II) NVIDIA(0): Validated MetaModes:
        (II) NVIDIA(0):     "NULL"

in /var/log/Xorg.0.log should replace ``nvidia'' with ``nvidia-modeset''
in their /boot/loader.conf or /etc/rc.conf configuration files, depending
on how they prefer to load NVidia driver kernel module.

See /usr/local/share/doc/NVIDIA_GLX-1.0/README for more information.
```

Use /boot/loader.conf:

```
nvidia-modeset_load="YES"
```


----------



## Rita G. (Nov 5, 2016)

. . tried everything over again and boot brings me to . .
see attach


----------



## SirDice (Nov 7, 2016)

Use nvidia-modeset_load instead of nvidia_load.


----------



## Rita G. (Nov 7, 2016)

Thank you SirDice,
I had to put 10.3 in that computer yesterday and its good to go. Will probably try 11.0 again in the near future.


----------



## Rita G. (Nov 8, 2016)

OK, couldn't resist . . tried 11.0 again and all is well. used nvidia-modeset_load instead of nvidia_load this time . . Thanks again SirDice.


----------

