# Error installing the Nvidia driver



## eXemplo (Sep 9, 2013)

I was using Slackware. I installed FreeBSD 9.1-RELEASE 64 bit today and I'm trying to install the NVidia driver, but 
I'm having trouble. I'm following this tutorial: http://www.freebsd.org/doc/en/articles/compiz-fusion/nvidia-setup.html

I typed:
`# cd /usr/ports/x11/nvidia-driver`
`# make install clean`

Terminal:

```
root@casa:/home/lucas # cd /usr/ports/x11/nvidia-driver
root@casa:/usr/ports/x11/nvidia-driver # make install clean
===>  Installing for nvidia-driver-319.32
===>   nvidia-driver-319.32 depends on file: /compat/linux/etc/fedora-release - not found
===>    Verifying install for /compat/linux/etc/fedora-release in /usr/ports/emulators/linux_base-f10
===>  linux_base-f10-10_7 linuxulator is not (kld)loaded.
*** [install] Error code 1

Stop in /usr/ports/emulators/linux_base-f10.
*** [run-depends] Error code 1

Stop in /usr/ports/x11/nvidia-driver.
*** [install] Error code 1

Stop in /usr/ports/x11/nvidia-driver.
root@casa:/usr/ports/x11/nvidia-driver #
```

I'm using KDE 4.8.4. I don't know what to do. My graphics card: EVGA GTX 460 1 GB 256 bits. I'm totally new to FreeBSD, and do not know anyone who uses it to help me. I'm using Google translator.

Thank you all.


----------



## SirDice (Sep 9, 2013)

eXemplo said:
			
		

> ```
> root@casa:/home/lucas # cd /usr/ports/x11/nvidia-driver
> root@casa:/usr/ports/x11/nvidia-driver # make install clean
> ===>  Installing for nvidia-driver-319.32
> ...



[cmd=]kldload linux[/cmd] see Handbook: Chapter 11. LinuxÂ® Binary Compatibility.


----------



## eXemplo (Sep 9, 2013)

Thank @SirDice.

Now I am getting this error:


```
root@casa:/usr/ports/x11/nvidia-driver # make install clean
===>  Installing for nvidia-driver-319.32
===>   nvidia-driver-319.32 depends on file: /compat/linux/etc/fedora-release - found
===>   nvidia-driver-319.32 depends on file: /usr/local/libdata/pkgconfig/xorg-server.pc - found
===>   nvidia-driver-319.32 depends on shared library: GL.1 - found
===>   Generating temporary packing list
===>  Checking if x11/nvidia-driver already installed
===> src (install)
install -o root -g wheel -m 555   nvidia.ko /boot/modules
kldxref /boot/modules
===> lib (install)
===> lib/libGL (install)
===> lib/libnvidia-tls (install)
===> lib/libnvidia-cfg (install)
===> lib/libnvidia-glcore (install)
===> lib/libvdpau_nvidia (install)
===> lib/compat (install)
===> lib/compat/libGL (install)
===> lib/compat/libnvidia-tls (install)
===> lib/compat/libnvidia-glcore (install)
===> lib/compat/libvdpau (install)
===> lib/compat/libvdpau_trace (install)
===> lib/compat/libvdpau_nvidia (install)
===> lib/compat/libcuda (install)
===> x11 (install)
===> x11/driver (install)
===> x11/extension (install)
===> doc (install)

To use these drivers, make sure that you have loaded the NVidia kernel
module, by doing

        # kldload nvidia

or adding

        nvidia_load="YES"

to your /boot/loader.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.

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

===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for nvidia-driver-319.32
===>  Cleaning for nvidia-driver-319.32
root@casa:/usr/ports/x11/nvidia-driver #
```


----------



## SirDice (Sep 9, 2013)

What error? Try actually reading what's being printed to the screen.


----------



## eXemplo (Sep 9, 2013)

*S*orry*.* Ignore the last post*.*

When I type:

```
root@casa:/home/lucas # cd /usr/ports/x11/nvidia-driver
root@casa:/usr/ports/x11/nvidia-driver # make install clean
===>  License NVIDIA accepted by the user
===>  Found saved configuration for nvidia-driver-319.32
===> Fetching all distfiles required by nvidia-driver-319.32 for building
===>  Extracting for nvidia-driver-319.32
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-319.32.tar.gz.
===>  Patching for nvidia-driver-319.32
===>   nvidia-driver-319.32 depends on file: /usr/local/libdata/pkgconfig/glproto.pc - found
===>   nvidia-driver-319.32 depends on file: /usr/local/libdata/pkgconfig/dri2proto.pc - found
===>   nvidia-driver-319.32 depends on file: /usr/local/libdata/pkgconfig/xorg-server.pc - found
===>   nvidia-driver-319.32 depends on shared library: GL.1 - found
===>  Configuring for nvidia-driver-319.32
===>  Building for nvidia-driver-319.32
===> src (all)
:> opt_acpi.h
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
awk -f @/tools/makeobjops.awk @/dev/acpica/acpi_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_acpi.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_ctl.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_dev.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_i2c.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_linux.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_os.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_os_pci.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_os_registry.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_pci.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_subr.c
cc -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"319.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer  -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -c nvidia_sysctl.c
ld  -d -warn-common -r -d -o nvidia.ko nv-kernel.o nvidia_acpi.o nvidia_ctl.o nvidia_dev.o nvidia_i2c.o nvidia_linux.o nvidia_os.o nvidia_os_pci.o nvidia_os_registry.o nvidia_pci.o nvidia_subr.o nvidia_sysctl.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk nvidia.ko  export_syms | xargs -J% objcopy % nvidia.ko
objcopy --strip-debug nvidia.ko
===> lib (all)
===> lib/libGL (all)
===> lib/libnvidia-tls (all)
===> lib/libnvidia-cfg (all)
===> lib/libnvidia-glcore (all)
===> lib/libvdpau_nvidia (all)
===> lib/compat (all)
===> lib/compat/libGL (all)
===> lib/compat/libnvidia-tls (all)
===> lib/compat/libnvidia-glcore (all)
===> lib/compat/libvdpau (all)
===> lib/compat/libvdpau_trace (all)
===> lib/compat/libvdpau_nvidia (all)
===> lib/compat/libcuda (all)
===> x11 (all)
===> x11/driver (all)
===> x11/extension (all)
===> doc (all)
===>  Installing for nvidia-driver-319.32
===>   nvidia-driver-319.32 depends on file:compat/linux/etc/fedora-release - found
===>   nvidia-driver-319.32 depends on file:usr/local/libdata/pkgconfig/xorg-server.pc -ound
===>   Generating temporary packing list
===>  Checking if x11/nvidia-driver already stalled
===>   nvidia-driver-319.32 is already instaed
      You may wish to ``make deinstall'' andnstall this port again
      by ``make reinstall'' to upgrade it prerly.
      If you really wish to overwrite the olport of x11/nvidia-driver
      without deleting it first, set the varble "FORCE_PKG_REGISTER"
      in your environment or the "make insta" command line.
*** [check-already-installed] Error code 1

Stop in /usr/ports/x11/nvidia-driver.
*** [install] Error code 1

Stop in /usr/ports/x11/nvidia-driver.
root@casa:/usr/ports/x11/nvidia-driver #
```
it says that the Nvidia driver is already installed,[ ]but where? I rebooted and it has no driver installed.


----------



## eXemplo (Sep 9, 2013)

Ignore the last post.

Again I try to install the driver:


```
root@casa:/home/lucas # cd /usr/ports/x11/nvidia-driver
root@casa:/usr/ports/x11/nvidia-driver # make install clean
===>  Installing for nvidia-driver-319.32
===>   nvidia-driver-319.32 depends on file: /compat/linux/etc/fedora-release - found
===>   nvidia-driver-319.32 depends on file: /usr/local/libdata/pkgconfig/xorg-server.pc - found
===>   nvidia-driver-319.32 depends on shared library: GL.1 - found
===>   Generating temporary packing list
===>  Checking if x11/nvidia-driver already installed
===>   nvidia-driver-319.32 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of x11/nvidia-driver
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1

Stop in /usr/ports/x11/nvidia-driver.
*** [install] Error code 1

Stop in /usr/ports/x11/nvidia-driver.
root@casa:/usr/ports/x11/nvidia-driver #
```

Strange:

```
===>   Generating temporary packing list
===>  Checking if x11/nvidia-driver already installed
===>   nvidia-driver-319.32 is already installed
```

is saying that the driver is already installed,[ ]but where?


----------



## tyson (Sep 9, 2013)

You really should start reading console output. It says nvidia-driver is already installed, and to reinstall it you should do `make deinstall reinstall clean`. Everything is installed to /usr/local (if you don't change it of course), so start looking in /usr/local/lib/xorg/modules/drivers and check if you've got nvidia.ko loaded into kernel.

The next logical step is to install x11/nvidia-xconfig and just configure your X.Org with it.


----------



## eXemplo (Sep 9, 2013)

tyson said:
			
		

> You really should start reading console output. It says nvidia-driver is already installed, and to reinstall it you should do
> 
> 
> 
> ...



I looked into /usr/local/lib/xorg/modules/drivers and do not have nvidia.ko.


----------



## eXemplo (Sep 9, 2013)

Solved, my screenshot with the nvidia driver working!

http://img43.imageshack.us/img43/7897/ji77.png


----------

