# can't get nvidia to work

## Berticus

so I emerged nvidia-drivers, and I thought it all went smoothly.  But then I did:

```
# modprob nvidia

FATAL: Error inserting nvidia (/lib/modules/2.6.18-gentoo-r6/video/nvidia.ko): No such device
```

Running lspci gave me: *Quote:*   

> 06:00.0 VGA compatible controller: nVidia Corperation GeForce 7900 GT (rev a1)

 

So as you can see, I have a 7900 GT, and I can't seem to get the modules to load, but the kernel has enable loadable modules selected.

I also went to the nvidia site to try to use the newest drivers, but I seem to have run into some problems when I run the script.  It says ./nvidia-install Permission denied.

Not quite sure what else I can do.

----------

## NeddySeagoon

Berticus,

Don't use the .bin from the nvidia site.

Look in dmesg, just after you do modprobe nvidia. There will be lots of useful info at the end of the output.

----------

## Berticus

I did as said, and got this: *Quote:*   

> NVRM: The NVIDIA probe routine was not called for 1 device(s).
> 
> NVRM: This can occur when a driver such as rivafb, nvidiafb or
> 
> NVRM: rivatv was loaded and obtained ownership of the NVIDIA
> ...

 Well I don't have either rivafb or nvidiafb modules loaded, so I decided to check the linux kernel configurations to make sure they were built in by going into /usr/src/linux and make menuconfig.  Neither rivafb nor nvidiafb kernel modules were selected, so the modules weren't built in, and no loadable modules were created.

So I'm guessing it's rivatv.  Not quite sure where to find that though.  Probably not in Device Drivers>>Graphics Devices?  Because I went in there, and none of the ones I selected would have created a rivatv.

----------

## NeddySeagoon

Berticus,

Use the search function in menuconfig.

Press / and enter riva

If you want framebuffer console and the nvidia binary blob for Xorg, choose either vesa-tng or vesa framebuffer support in your kernel. Turn off the rest.

----------

## Berticus

everything for riva was turned off.  By the way, I'm use the 64-bit version.  Not quite sure if that would make a difference.

----------

## NeddySeagoon

Berticus,

That means you have no control over it. In x86 its a menu control but looking in x86_64 its always on and showing three optionx (x86 has many more)

```
  │ │                      --- /dev/agpgart (AGP Support)       

  │ │                      < >   Intel 440LX/BX/GX, I8xx and E7x05 chipset support  

  │ │                      < >   SiS chipset support   

  │ │                      < >   VIA chipset support  
```

so that looks ok.

On the  Processor type and features  ---> menu, you need to get the right combination of 

```
 MTRR (Memory Type Range Register) support 

 IOMMU support (NEW)
```

I'm doing this by setting ARCH on a 32 bit box. At an educated guess you need, MTRR (Memory Type Range Register) support on and IOMMU support (NEW) off. From the kernel help, IOMMU support is only useful if you have >3GB of RAM.

----------

## Berticus

MTRR is on, and IOMMU ("IBM Calgary IOMMU support," unless there's another one I need to worry about) is off.

----------

## NeddySeagoon

Berticus,

Check your 

```
uname -a
```

the data and time tell the kernel build date and time.

Are you running your newest kernel?

If so, whats the error now ?

----------

## Berticus

Hmm...  Interesting: *Quote:*   

> Linux berticus 2.6.18-gentoo-r6 #2 SMP Sat Jan 27 08:15:21 EST 2007 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ GNU/Linux

 Right before the reboot of posting this, I remade the kernel because I didn't remember the last time I compiled the kernel.   This is definitely wrong.  So basically I haven't been compiling new kernels, just changing the modules?  I'm pretty sure after that time I removed the i2c modules from kernel configurations.  I did that temporarily because something about rivafb called on it.  I might add it back in after I get nvidia drivers to work.  Obviously if it causes nvidia drivers not to work, I'll keep it out.

----------

## Berticus

Wow...  I can't believe I concluded that...  I feel kinda stupid now, I'm not gonna lie.

Well anyway, modprobe nvidia works now.  Thanks for pointing the kernel wasn't the most recent one being used.

----------

## Berticus

Out of curiosity, why is it not suggested to use the script provided by nvidia.com?

----------

## NeddySeagoon

Berticus,

The *.bin provided by nvidia provides two binary blobs, one for Xorg and one for the kernel and some open source 'glue' code thats adapts the kernel and Xorg to the binary blobs. From time to time, ebuilds add patches to the 'glue' code, so ebuilds work when the bare nvidia *.bin does not.

In linux, when you download a file, it does not get execute permissions by default. If you really want to run a dowloaded file you must first chmod it. This stops the big bad internet running anything it wants on your PC, just because you downloaded it.

It makes you stop and think "Do I really trust the source of that stuff?"

Thats why your attempt to ./...bin failed.

We all install kernels incorrectly from time to time - theres no shame in learning the lesson and learning the quick check

----------

## Berticus

yeah, I know that part (I'm not exactly a noob) about chmoding.  you can actually also just sh the script.  But typically those, I chmod +x the file and then execute it.  Even then, it got me the error.  In the other linux distros that I used, that was fine and everything was all honky dory.

----------

## tp11235

I was getting the same error message: could not find the nvidia module... etc.

My problem was also that my kernel was not what I thought it was - thanks for the hint about uname -a.

I had not been running "make clean" between recompiles so I was going nowhere. That solved that bit.

Once I had got rid of the framebuffer support in my kernel I used the guide: http://www.gentoo.org/doc/en/nvidia-guide.xml.

All working nicely now thanks very much.

Tim.

----------

