# X11 setup using nvidia driver



## lokiseto (Sep 20, 2011)

The GPU is supported as mentioned in Appendix A
NVIDIA GeForce 9300M G

Copied into /usr/ports/distfiles, but during [cmd=]make install clean[/cmd]
NVIDIA-FreeBSD-x86_64-270.41.19

I receive various error messages

```
cc1: warnings being treated as errors
nvidida_linux.c: In function 'linux_ioctl_nvidia' :
nvidida_linux.c:40 warning: passing argument 3 of 'fget' makes integer from pointer without a cast (mhm)
nvidida_linux.c:40 warning: too few arguments to fucntion 'fget'
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-270.41.19/src.
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-270.41.19.
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver.
*** Error code 1
```


----------



## DutchDaemon (Sep 20, 2011)

Why not just install x11/nvidia-driver, which is at v280.13?


----------



## lokiseto (Sep 20, 2011)

*The error message is identical*

same output as stated previously :q


----------



## akil (Sep 20, 2011)

Hi

You have issue regarding fget function which should take 3 arguments (yes, i know we can read that from compiler output as a warning). However, somehow during linking with kbuild, some changes are not applied to your source files, especially nvidia-linux.c.

Below i present small patch, which can help you in your case:

```
--- nvidia-linux.c-last 2011-07-28 01:56:14.000000000 +0200
+++ nvidia-linux.c      2011-09-20 10:28:02.000000000 +0200
@@ -37,7 +37,7 @@
     int error;
     u_long cmd;
 
-    if ((error = fget(td, args->fd, &fp)) != 0)
+    if ((error = fget(td, args->fd, 0, &fp)) != 0)
         return error;
 
     cmd = args->cmd;
```

You can put that patch-nvidia-linux.c into ${PORTS}/x11/nvidia-driver/files directory, and build should be completed without any issue , I guess.

Please be patient, that work should be automate by make, perhaps check your /usr/src once more because.


----------



## lokiseto (Sep 20, 2011)

*How can I install Xorg without being online*

I have the 8.2 and the 9.0 Beta2 available.

If I exeute as root

```
# cd /usr/ports/x11/xorg
# make install clean
```

output is

```
===> Installing for xorg-7.5.1
===> xorg-7.5.1 depends on file: /usr/local/libdata/pkgconfig/dri.pc - not found
```

also
MesaLib is missing from /usr/ports/distfiles/ and cannot be fetched from ftp obviously

so this post should really stand at the beginning of the thread


----------



## UNIXgod (Sep 20, 2011)

Have you updated you ports collection? If not, please do so, and and try again.


----------

