# nVidia driver [solved]

## at

Hello,

I know that nVidia video drivers were discussed many time on this board and I apologise if  I repeat the question.

I have a QuadroFX 560 video card. It is an OpenGL card and I would certainly like to use all capabilities and hardware acceleration this card provides. As I understand, the open source "nv" driver does not do that.

My motherboard is Asus M2N-SLI Deluxe with AMD 64 x2 3800+ processor.

I am trying to install NVIDIA-Linux-x86_64-1.0-8762-pkg2.run video driver from nVidia web site (http://www.nvidia.com/object/linux_display_amd64_1.0-8762.html) using Gentoo Hardened kernel 2.6.16.

When I run the installer, I get the following error:

```
ERROR: Unable to determine the version of the kernel sources located in '/usr/src/linux-2.6.16-hardened-r11'. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-soource-path' command line option.
```

I start installer as 

```
./NVIDIA-Linux-x86_64-1.0-8762-pkg2.run --kernel-soource-path /usr/src/linux-2.6.16-hardened-r11
```

"/usr/src/linux-2.6.16-hardened-r11" directory does contain correct kernel source files. In fact, I have just compiled the kernel from them.

If I start the installer without any options, a similar error is displayed.

Or shall I use "media-video/nvidia-kernel" and "media-video/nvidia-glx" packages instead, in sipte of them being masked for the hardened kernel?

Or shall I use "x11-drivers/nvidia-drivers" instead (although they are masked too)?

Thank you for all your help!Last edited by at on Sat Sep 30, 2006 3:09 pm; edited 1 time in total

----------

## Headrush

Use the nvidia-drivers package.

You are running the kernel you built and it was configured in /usr/src/linux?

----------

## i92guboj

First, use 

```
ls -l /usr/src/linux
```

To chech where is that symlink pointing to. Make sure it is pointing to the source tree for the kernel version that you are running. You can check the info about your running kernel with "uname -a".

If it is not, use rm to delete de symlink, and then "cd /usr/src && ln -l linux <whatever-kernel>" to recreate de link.

Then emerge nvidia-drivers, change your Xorg.conf to use the "nvidia" driver instead of nv, vesa or whatever it has right now.

----------

## at

Thank you,

I will try using x11-drivers/nvidia-drivers.

----------

## at

Hello,

I am trying to install x11-drivers/nvidia-drivers.

I have AMD 64 x2 and Quadro FX 560 video card.

The kernel is Gentoo Hardened kernel linux-2.6.16-hardened-r11.

I have unmasked x11-drivers/nvidia-drivers package but when I am trying to emerge x11-drivers/nvidia-drivers-1.0.8762-r1, I am getting the following error:

```
make[1]: *** [nv-vm.o] Error 1

make[1]: *** [nv.o] Error 1

make: *** [module] Error 2

!!!ERROR: x11-drivers/nvidia-drivers-1.0.8762-r1 failed.

Call stack:

   ebuild.sh, line 1539:   Called dyn_compile

   ebuild.sh, line 939:   Called srs_compile

   nvidia-drivers-1.0.8762-r1.ebuild, line 145:   Called linux-mod_src_compile

   linux-mod.eclass, line 469:   Called die

!!! Unable to make IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/linux clean module.
```

I know that nvidia-dirvers is masked for the hardened kernel. But what is the alternative? The open source "nv", as I understand does not support many features of the card, including hardware acceleration.

Thank you!

----------

## jmbsvicetto

[mod]at, please don't create a new thread for discussing the same issue. I've merged the two threads.[/mod]

You need to post the previous 5 to 10 lines. You should also post the output of emerge --info.

----------

## at

Sorry - I thought it was a different topic: the original was about installing nVidia drivers from their website using their installer, and the current one is about emerging x11-drivers/nvidia-drivers.

A more complete output from

```
USE="dlloader" emerge -v x11-drivers/nvidia-drivers
```

is

```
nv-linux.h: At top level:

nv-linux.h:711: error: conflicting types for 'pm_message_t'

/usr/src/linux/include/linux/pm.h:143: error: previous declaration of 'pm_message_t' was here

In file included from os-agp.c:24:

nv-linux.h:744:2: warning: #warning "conftest.sh failed, assuming remap_page_range(4)!"

os-agp.c: In function 'KernInitAGP':

os-agp.c:102: error: too few arguments to function 'agp_backend_acquire'

os-agp.c:108: warning: passing arg 1 of 'agp_copy_info' from incompatible pointer type

os-agp.c:108: error: too few arguments to function 'agp_copy_info'

os-agp.c.165: warning: passing arg 1 of 'agp_enable' makes pointer from integer without a cast

os-agp.c:165: error: too few arguments to function 'agp_enable'

os-agp.c:165: error: too few arguments to function 'agp_backend_release'

os-agp.c:178: error: too few arguments to function 'agp_backend_release'

os-agp.c: In function 'KernTeardownAGP':

os-agp.c:206: error: too few arguments to function 'agp_backend_release'

os-agp.c: In function 'KernAllocAGPPages':

os-agp.c:245: warning: passing arg 1 of 'agp_allocate_memory' makes pointer from integer without a cast

os-agp.c:245: error: too few arguments to function 'agp_allocate_memory'

make[1]: *** [os-agp.o] Error 1

make: *** [module] Error 2

!!!ERROR: x11-drivers/nvidia-drivers-1.0.8762-r1 failed.

Call stack:

   ebuild.sh, line 1539:   Called dyn_compile

   ebuild.sh, line 939:   Called srs_compile

   nvidia-drivers-1.0.8762-r1.ebuild, line 145:   Called linux-mod_src_compile

   linux-mod.eclass, line 469:   Called die

!!! Unable to make IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/usr/src/linux clean module.
```

An excerpt from "emerge info" is

```
ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -finline-functions -fweb-frename-registers"

CHOST="86_64-pc-linux-gnu"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
```

Processor is AMD 64 x2 3800+.

Kernel is Gentoo linux-2.6.16-hardened-r11.

Using hardened toolchain.

Thank you!

----------

## MCSpan20

I'm having this exact same problem, Athlon 64, etc...

Also, I get the same error when trying to emerge nvidia-kernel or nvidia-drivers...

Anyone have any ideas???   :Confused: 

----------

## MCSpan20

It must be a configuration setting somewhere because I am unable to compile any previous versions of the nvidia-kernel which I know work.

----------

## MCSpan20

Well I finally got nvidia-drivers to compile. I upgraded my kernel from gentoo-sources-2.6.17-r4 to the unstable gentoo-sources-2.6.17-r5 and that did the trick.

Hope it works for you too.

----------

## jmbsvicetto

I believe the missing x in x86_64 on the CHOST is a typo. However, you should reconsider your CFLAGS.

You should check if you have the support for AGP active in your kernel. You might need to disable it.

 *at wrote:*   

> An excerpt from "emerge info" is
> 
> ```
> 
> CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -finline-functions -fweb-frename-registers"
> ...

 

----------

## at

Hi,

Yes, with CHOST it was a typo: it is "x86_64-pc-linux-gnu" of course.

Why do you suggest to reconsider my CFLAGS?

You are right - there is AGP support in the kernel. But a curious thing is that I could not find a way to disable it through "make menuconfig".

When I go and directly disable it with a text editor in .config, every time after invoking "make && make modules_install" it comes back:

```
#

# Ftape, the floppy tape device driver

#

CONFIG_AGP=y

CONFIG_AGP_AMD64=y

# CONFIG_AGP_INTEL is not set

# CONFIG_DRM is not set

# CONFIG_MWAVE is not set

#CONFIG_RAW_DRIVER is not set

CONFIG_HPET=y

# CONFIG_HPET_RTC_IRQ is not set
```

So there is no way to disable AGP support in the kernel?

Also, thank for the proposed solution to use gentoo-sources-2.6.17-r5 kernel. I need to use hardened-sources. I would also rather wait until the issue with the nVidia drivers is resolved than switch to an unstable kernel.

Thank you!

----------

## at

x11-drivers/nvidia-drivers compiles nicely with x86_64-pc-linux-gnu-4.1.1 on 2.6.17-hardened-r1 on AMD64.

Don't forget to install media-video/nvidia-settings.

----------

