# Getting and installing nv video driver



## PaoloRoberti (Apr 14, 2009)

Hallo everybody:

I got a DELL PowerEdge T300 server (x86_64) and installed FREBSD.  Do far so good.

The server on board video has a VGA plug and since my KVM supports only DVI I decided to get the chepest video card for the server, that is a NVIDIA QUADRO NVS 290 from PNY.  

From many comments online I understand that the only driver for NVIDIA cards on x86_64 is the open source nv. 

Here are my questions:

1.  Where do I go to download the driver (binary if possible)

2.  Will it work with X11 in 64 bits mode?

3.  Any docs on how to install nv.

I am new to FreeBSD and a little frustrated by the often conflicting info I find online about video drivers.

Thanks to all


----------



## znaya (Apr 14, 2009)

http://forums.freebsd.org/showthread.php?t=3038


----------



## PaoloRoberti (Apr 14, 2009)

Thanks Znaya:

I am actually running 64 bit mode (x86_64).  The post you pointed me to describes i386 (32 bit) how to.

Are you suggesting I should install 32 bbit version of Xorg???


----------



## znaya (Apr 14, 2009)

Uoops! I'm sorry. I didn't notice the x86_64...


----------



## DrJ (Apr 14, 2009)

PaoloRoberti said:
			
		

> 1.  Where do I go to download the driver (binary if possible)
> 
> 2.  Will it work with X11 in 64 bits mode?
> 
> 3.  Any docs on how to install nv.



nv is part of the xorg drivers.  If you have xorg installed, you may well already have it.  Otherwise, install the package (for binary) and you will have it.  You can also get it from ports, but that you will have to compile (unless you force getting the package).

If that is unclear, please ask.


----------



## PaoloRoberti (Apr 14, 2009)

Drj:

Thank for setting me in the right direction.  I do have Xorg installed.  I run startx and this is the tail end of the Xorg log in /var/log:



(II) Primary Device is: PCI 05:00:0
(EE) No devices detected.

Fatal server error:
no screens found


If I read it correctly it is not able find any screen.

However FreeBSD does find the video card.  Here is the output from pciconf -lvc:

vgapci0@pci0:5:0:0:     class=0x030000 card=0x049310de chip=0x042f10de rev=0xa1 hdr=0x00
    vendor     = 'Nvidia Corp'
    class      = display
    subclass   = VGA
    cap 01[60] = powerspec 2  supports D0 D3  current D0
    cap 05[68] = MSI supports 1 message, 64 bit 
    cap 10[78] = PCI-Express 1 endpoint

So my bext question is: how do I check if I do have the nv driver already on disk?  I am totally clouless.

Thanks again


----------



## DrJ (Apr 14, 2009)

OK -- let's see if you have it installed.  Do:

ls /var/db/pkg | grep nv

and you should find something like

xf86-video-nv-2.1.13

At least that is the version I have installed.  If you don't have that, then you don't have the driver installed.  Note the version might be different.


----------



## PaoloRoberti (Apr 14, 2009)

DrJ:

Yes it is there (V 2.1.12).  I tried to use add_pkg and this is what I have got:

tar: Unrecognized archive format: Inappropriate file type or format
tar: +CONTENTS: Not found in archive
tar: Error exit delayed from previous errors.
pkg_add: tar extract of /var/db/pkg/xf86-video-nv-2.1.12 failed!
pkg_add: unable to extract table of contents file from '/var/db/pkg/xf86-video-nv-2.1.12' - not a package?

By the way file +CONTENTS does exists under the directory and it is in clear text.

I am totally lost.


----------



## SirDice (Apr 14, 2009)

Looks like the package is garbled somewhere. See if you can download it by hand then add it or use *pkg_add -r*


----------



## PaoloRoberti (Apr 14, 2009)

I did try to use add_pkg -r.  It states package is alredy installed.  I checked the nv driver directory in x11-directories and noticed a Makefile.  I try the make command and it did reinstalled the nv driver after detecting some corruption.  Quite impressive.

Everything works when I connect one of the two DVI output to a VGA monitor via DV-VGA adapter supplied with the card.

The Xorg trace shows that VGA signal is selcted instead of DVI.   Now I have to figure out how to instruct the nv driver to select the DVI output signal instead of the VGA

Anyway this was great learning and great help from DrJ and SirDice.

Tanks......


----------



## SirDice (Apr 14, 2009)

You may have to play with the CrtcNumber and/or FlatPanel Options. It should auto-detect which one's connected though..

http://xorg.freedesktop.org/archive/X11R7.0/doc/html/nv.4.html


----------



## PaoloRoberti (Apr 15, 2009)

SirDice:

The nv driver is selecting the right output (DVI1) but nothing shows on the screen.  What is puzzling is that the Mode for the monitor is "1920x1080" but the log shows me a lot of vga modes and saying the come form the configuration file "(**)" prefix to the message.  

Here is the relevant part of the log:

```
(II) NV(0): EDID vendor "KVM", prod id 8196
(II) NV(0): Output VGA1 disconnected
(II) NV(0): Output DVI0 disconnected
(II) NV(0): Output VGA0 disconnected
(II) NV(0): Output DVI1 connected
(II) NV(0): Output DVI1 using initial mode 1024x768
(--) NV(0): Virtual size is 1024x1024 (pitch 1024)
(**) NV(0):  Driver mode "1024x768": 65.0 MHz (scaled from 0.0 MHz), 48.4 kHz, 60.0 Hz
(II) NV(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz)
(**) NV(0):  Driver mode "1024x768": 78.8 MHz (scaled from 0.0 MHz), 60.1 kHz, 75.1 Hz
(II) NV(0): Modeline "1024x768"x75.1   78.80  1024 1040 1136 1312  768 769 772 800 +hsync +vsync (60.1 kHz)
(**) NV(0):  Driver mode "1024x768": 75.0 MHz (scaled from 0.0 MHz), 56.5 kHz, 70.1 Hz
(II) NV(0): Modeline "1024x768"x70.1   75.00  1024 1048 1184 1328  768 771 777 806 -hsync -vsync (56.5 kHz)
(**) NV(0):  Driver mode "1024x768": 65.0 MHz (scaled from 0.0 MHz), 48.4 kHz, 60.0 Hz
(II) NV(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz)
(**) NV(0):  Driver mode "1024x768": 63.5 MHz (scaled from 0.0 MHz), 47.8 kHz, 59.9 Hz
(II) NV(0): Modeline "1024x768"x59.9   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync (47.8 kHz)
(**) NV(0):  Driver mode "832x624": 57.3 MHz (scaled from 0.0 MHz), 49.7 kHz, 74.6 Hz
(II) NV(0): Modeline "832x624"x74.6   57.28  832 864 928 1152  624 625 628 667 -hsync -vsync (49.7 kHz)
(**) NV(0):  Driver mode "800x600": 50.0 MHz (scaled from 0.0 MHz), 48.1 kHz, 72.2 Hz
(II) NV(0): Modeline "800x600"x72.2   50.00  800 856 976 1040  600 637 643 666 +hsync +vsync (48.1 kHz)
(**) NV(0):  Driver mode "800x600": 49.5 MHz (scaled from 0.0 MHz), 46.9 kHz, 75.0 Hz
(II) NV(0): Modeline "800x600"x75.0   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync (46.9 kHz)
(**) NV(0):  Driver mode "800x600": 40.0 MHz (scaled from 0.0 MHz), 37.9 kHz, 60.3 Hz
(II) NV(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)
(**) NV(0):  Driver mode "800x600": 36.0 MHz (scaled from 0.0 MHz), 35.2 kHz, 56.2 Hz
(II) NV(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz)
(**) NV(0):  Driver mode "640x480": 31.5 MHz (scaled from 0.0 MHz), 37.5 kHz, 75.0 Hz
(II) NV(0): Modeline "640x480"x75.0   31.50  640 656 720 840  480 481 484 500 -hsync -vsync (37.5 kHz)
(**) NV(0):  Driver mode "640x480": 31.5 MHz (scaled from 0.0 MHz), 37.9 kHz, 72.8 Hz
(II) NV(0): Modeline "640x480"x72.8   31.50  640 664 704 832  480 489 491 520 -hsync -vsync (37.9 kHz)
(**) NV(0):  Driver mode "640x480": 30.2 MHz (scaled from 0.0 MHz), 35.0 kHz, 66.7 Hz
(II) NV(0): Modeline "640x480"x66.7   30.24  640 704 768 864  480 483 486 525 -hsync -vsync (35.0 kHz)
(**) NV(0):  Driver mode "640x480": 25.2 MHz (scaled from 0.0 MHz), 31.5 kHz, 60.0 Hz
(II) NV(0): Modeline "640x480"x60.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz)
(**) NV(0):  Driver mode "720x400": 28.3 MHz (scaled from 0.0 MHz), 31.5 kHz, 70.1 Hz
(II) NV(0): Modeline "720x400"x70.1   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz)
(==) NV(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
```


----------



## PaoloRoberti (Apr 15, 2009)

I have finally got xorg to work with the DVI interface.  All I had to do was to delete the file, module load and monitor sections from the xorg.conf file.  The sections had been generated by the xorg configuration utility.

The way I figure it out is that I have another identical machine running Linux CENTOS and it did not have any problem using the DVI interface on the same card.  The xorg.conf on linux uses the nv drive but does not have file, load module and monitor sections.

By the way I still have no idea why it works....

Any way the all problems are solved.  Thanks to everybody for the great help...


----------



## SirDice (Apr 17, 2009)

PaoloRoberti said:
			
		

> By the way I still have no idea why it works....


Unless you have some specific settings xorg should be able to autodetect (almost) everything using HAL these days. You can even remove the whole /etc/X11/xorg.conf file and it should still work.


----------



## PaoloRoberti (Apr 20, 2009)

*It really was a KVM problem*

I finally know what the problem is.  It had nothing to do with taking out sections form xorg.conf: that was a COINCIDENCE.

It had to do to the fact that when I booted I normally switched the KVM to another machine not to waste time.  
When Gnome tried to get up nv  sensed the KVM attributes and not the  real screen attribute.  Same when I tried to startx via telnet from another machine.

So always keep the KVM set to the booting machine until the boot is completed at least when using DVI.  
I am not sure about VGA since all my testing was done with a screen directly attached to the server and it always worked.

As always thanks to everybody


----------



## DutchDaemon (Apr 21, 2009)

If I boot my laptop with the KVM set to a different computer, my keyboard doesn't work when switching back. So yes, doing a full boot with the KVM attached is usually the best thing to do (XP has the same problem, and I'm sure there are more).


----------

