# Is there an IDEAL way to install Xorg && nvidia-driver together?



## PhenomII (Jun 7, 2010)

Greetings,
 I know this question can ultimately lead to alot of possibilities. But I've run into many issues in the past trying to get the nvidia-driver to work as desired/intended on FreeBSD. So (having already read the relevant portions of the FBSD handbook) was wondering if anyone might be willing offer proceedure that will greatly insure a *smooth* eventless install of the nvidia-driver && Xorg. In such a way, as to avoid some of the "pitfalls" one is likely to encounter. Maybe someone has already written a HOW-TO?

Anyway, thank you for all your time and consideration.
I just thought this might be a valuable addition - I know I'd appreciate it.


----------



## wblock@ (Jun 7, 2010)

My suggestion--others will no doubt be different:

Update ports before installing anything.
Install xorg from ports so it'll be built to match your config options.
Stick with default port options when building.
Figure out which nVidia blob port you need and install that.
Get twm to start.  Check keyboard and mouse input, screen resolution.

Don't mess with giant desktop environments until all the above works.


----------



## PhenomII (Jun 7, 2010)

Greetings wblock, and thanks for the reply.
That was basically my thought as well. As a matter of fact that was the way I went. The
"mondo desktop" route creates too many variables that will only add to making any issues
just that much harder to iron out, if anything should go wrong.

*BUT* in spite of going that route, I ended up with an issue installing the Nvidia blob.
In anticipation of wanting to make use of the Linux OpenGL that the Nvidia driver natively supports. I echoed
[CMD=""]linux_enable=\"YES\" >> /etc/rc.conf[/CMD]
then
[CMD=""]# kldload linux[/CMD]
then proceeded by installing emulators/fedora_base-f10
then installing the xorg server. And finally unpacking the Nvidia blob version 195.36.24.
Following the instructions provided for FreeBSD @ Nvidia:
as root
[CMD=""]# cd unpacked-nvidia-driver[/CMD]
then
[CMD=""]# make install[/CMD]
which resulted in make success, but install failure:
install: /usr/X11R6/lib/modules/drivers: No such file or directory

Not sure what went wrong, but the drivers directory exists in /usr/local/lib/xorg/modules
But I think a symlink was supposed to be made in the X11R6 tree. Not sure how best to proceed. Anyone have any thoughts/suggestions?

Thank you for all your time and consideration.


----------



## wblock@ (Jun 7, 2010)

PhenomII said:
			
		

> Greetings wblock, and thanks for the reply.
> That was basically my thought as well. As a matter of fact that was the way I went. The
> "mondo desktop" route creates too many variables that will only add to making any issues
> just that much harder to iron out, if anything should go wrong.
> ...



It might be a good intermediate step to use the vesa driver at, say, 800x600 first.  That will let you test xorg.



> In anticipation of wanting to make use of the Linux OpenGL that the Nvidia driver natively supports. I echoed
> [CMD=""]linux_enable=\"YES\" >> /etc/rc.conf[/CMD]
> then
> [CMD=""]# kldload linux[/CMD]



You may need to mount the linproc filesystem, too (can't recall).  And I'd use the port for the nVidia driver if possible, which should make sure all the dependencies are installed.


----------



## PhenomII (Jun 7, 2010)

wblock said:
			
		

> It might be a good intermediate step to use the vesa driver at, say, 800x600 first.  That will let you test xorg.


Good plan.




			
				wblock said:
			
		

> You may need to mount the linproc filesystem, too (can't recall).


Yes, I usually add that to fstab.


			
				wblock said:
			
		

> And I'd use the port for the nVidia driver if possible, which should make sure all the dependencies are installed.


I'm afraid that may only complicate things, as I currently have a half-installed NEWER version. I'm afraid the best policy will be to try to figure out how, and where Xorg makes the symlink to the "legacy" X11R6 tree.

Thank you wblock, for your thoughtful reply.


----------



## PhenomII (Jun 7, 2010)

OK I think I've found it.
The following
[CMD=""]Nvidia-driver-dir/x11/driver/Makefile[/CMD]
has
[CMD=""]
.if !defined(X11BASE)
X11BASE=	/usr/X11R6
[/CMD]
SO I'm going to change it to:
[CMD=""]
.if !defined(X11BASE)
X11BASE=	/usr/local
[/CMD]
and try that.
I'll report back with the results - wishe me luck.


----------



## PhenomII (Jun 7, 2010)

Whoo hoo! That did it - well, almost.
Here's the answer, the variable:
[CMD=""].if !defined(X11BASE)
X11BASE=	/usr/X11R6
[/CMD]
Must be changed in all subdirs in the:
Nvidia-driver-dir/xll
folder. eg;
xll/bin
x11/driver
x11/extension
x11/man
to:
[CMD=""].if !defined(X11BASE)
X11BASE=	/usr/local
[/CMD]
then it will be safe to perform a
[CMD=""]#make install[/CMD]
from the root of the freshly extracted Nvidia-driver-dir. 

Thanks again for your responses!


----------

