# Nvidia drivers --> sluggish graphics [SOLVED]

## NathanZachary

Alright, after trying for a long time now, I guess I need some help.  I've gone through the guide that was listed for installing nVidia drivers for my MX 4000.  When I emerge the nvidia-drivers (don't think I need the legacy ones), I get the following message at the end of the install:

```

* Updating module dependencies for 2.6.18-gentoo-r6 ...

 *

 * /usr/src/linux/System.map not found.

 * You must manually update the kernel module dependencies using depmod.  [ !! ]

```

I'm not sure what I need to do about this error.

Also, something just doesn't seem right about my graphics card.  It seems like things are really sluggish.  I don't play games, but just using the regular desktop environment, it seems slow.  For instance, when I move a window around on the desktop, it leaves trails for a while.  Basically, it just doesn't seem smooth.  If anyone could give me some pointers on what to check, that would be awesome.

Then I thought maybe I didn't actually have the driver set installed because when I went to modprobe, this is what happened:

```

localhost / # modprobe nvidia

FATAL: Module nvidia not found.

```

I thought that maybe I needed to emerge nvidia-settings, but when I did that, I got this error:

```

error: X11/extensions/xf86vmode.h: No such file or directory

make: *** [.objs/NvCtrlAttributes.o] Error 1

!!! ERROR: media-video/nvidia-settings-1.0.20051122-r3 failed.

Call stack:

  ebuild.sh, line 1546:   Called dyn_compile

  ebuild.sh, line 937:   Called src_compile

  nvidia-settings-1.0.20051122-r3.ebuild, line 78:   Called die

!!! Failed to build nvidia-settings

```

Sorry if I sound inept, but I'm totally lost.

Thanks preemptively,

Zach

----------

## PaulBredbury

 *gentoo_zach wrote:*   

> error: X11/extensions/xf86vmode.h: No such file or directory

 

```
$ equery belongs /usr/include/X11/extensions/xf86vmode.h

x11-proto/xf86vidmodeproto-2.2.2 (/usr/include/X11/extensions/xf86vmode.h)
```

So, you should:

```
emerge xf86vidmodeproto
```

xorg-server depends on xf86vidmodeproto, so you should have xf86vidmodeproto already installed  :Confused: 

----------

## NathanZachary

Well, I just emerged that file.  When I go search for nvidia drivers I get this:

```

*  x11-drivers/nvidia-drivers

      Latest version available: 1.0.8776

      Latest version installed: 1.0.8776

      Size of files: 25,303 kB

      Homepage:      http://www.nvidia.com/

      Description:   NVIDIA X11 driver and GLX libraries

      License:       NVIDIA

```

Even though I obviously have it installed, when I modprobe it, I get the following (still):

```

localhost / # modprobe nvidia

FATAL: Module nvidia not found.

```

I don't know what I'm doing wrong.

----------

## Age_M

hi

looks like your /usr/src/linux symlink is not pointing to the right kernel?

check what kernel you are using

```
uname -a
```

then check where your symlink is pointing to

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

greetz Age_M

----------

## NathanZachary

It looks like I don't actually have a symlink, but I know that I followed those instructions when I installed the kernel.  Here's what I got when I used those two commands:

```

zach@localhost ~ $ uname -a

Linux localhost 2.6.17-gentoo-r7 #1 SMP Tue Aug 29 01:30:07 UTC 2006 x86_64 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux

zach@localhost ~ $ ls -1 /usr/src/linux

COPYING

CREDITS

Documentation

Kbuild

MAINTAINERS

Makefile

README

REPORTING-BUGS

arch

block

crypto

drivers

fs

include

init

ipc

kernel

lib

mm

net

patches.txt

scripts

security

sound

usr

```

----------

## madisonicus

 *gentoo_zach wrote:*   

> It looks like I don't actually have a symlink, but I know that I followed those instructions when I installed the kernel.  Here's what I got when I used those two commands:
> 
> ```
> 
> zach@localhost ~ $ uname -a
> ...

 Actually we need to know what the symlink which should be at /usr/src/linux points to so that we can be sure that it points to the sources for the kernel you're using (which you determined with uname -a).  The command in that case is ls -ld /usr/src/linux or ls -l /usr/src/.  Keep in mind that it's a lower case "L" not the number 1.

----------

## NathanZachary

I'm sorry, I posted the wrong information.  Here's the info on the symlink, which I believe is correct:

```

localhost zach # ls -l /usr/src/linux

lrwxrwxrwx 1 root root 22 Feb  4 23:00 /usr/src/linux -> linux-2.6.18-gentoo-r6

localhost zach # uname -a

Linux localhost 2.6.17-gentoo-r7 #1 SMP Tue Aug 29 01:30:07 UTC 2006 x86_64 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux

```

Now I'm really at a loss.  I know that recently I emerged the new gentoo-sources, did the make menuconfig, yadda-yadda.  I guess I did something wrong.  Maybe that's why the modprobe said the module didn't exist.  :Shocked: 

Any help would be appreciated to get my butt out of this sling of confusion.

--Zach

----------

## madisonicus

 *gentoo_zach wrote:*   

> I'm sorry, I posted the wrong information.  Here's the info on the symlink, which I believe is correct:
> 
> ```
> 
> localhost zach # ls -l /usr/src/linux
> ...

 There's the problem.  Your /usr/src/linux points to a 2.6.18-r6 kernel when you've booted from a 2.6.17-r7 kernel.  The solution should be simple.

It looks like you compiled the kernel yourself.  If so, then you probably forgot one of two steps.  Either you didn't copy the newly compiled 2.6.18 kernel from /usr/src/linux/arch/x86_64/boot/bzImage to your /boot directory.  Or, you didn't change your /boot/grub/grub.conf so that it knows to boot the new kernel instead of the old one.

Once you reboot with the 2.6.18 kernel in use, then you should be able to see the nvidia module.

If you want some help with configuring your grub.conf let us know.

And, please don't be hard on yourself.  We've all made these mistakes.    :Wink: 

-m

----------

## NathanZachary

I just have one quick question about configuring my /grub/grub.conf.  This is what it says:

```

default 0

timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux

root (hd0,0)

kernel /kernel-genkernel-x86_64-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3

initrd /initramfs-genkernel-x86_64-2.6.17-gentoo-r7

```

Now, when I copied my new kernel compilation, I put it here:

/boot/linux-2.6.18-gentoo-r6

Should my grub.conf now look like this?:

```

default 0

timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux

root (hd0,0)

kernel /boot/linux-2.6.18-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3

initrd /initramfs-genkernel-x86_64-2.6.17-gentoo-r7

```

I know that makes sense to me, but I'm a little lost about the initrd part.  Should that be updated to something new?  Am I missing anything else?

Thanks a bunch!

--Zach

----------

## madisonicus

Ugh genkernel... I have almost no experience with it.  Well, reading the official Genkernel guide leads me to ask whether you used the --install switch when you gave the genkernel command.  If you did, apparently it will install the kernel and the initrd into /boot.  If so, then you just need to make sure the kernel line points to the new genkernel and the initrd line points to the new initramfs.  They should be in /boot already, so you can just copy the names.

In any case, the initrd and the kernel version need to match.

Big disclaimer on genkernel stuff though... have you tried doing your own yet?  It is a liberating experience once you get used to it.    :Smile: 

----------

## Age_M

Hi again,

```

localhost zach # ls -l /usr/src/linux

lrwxrwxrwx 1 root root 22 Feb  4 23:00 /usr/src/linux -> linux-2.6.18-gentoo-r6

localhost zach # uname -a

Linux localhost 2.6.17-gentoo-r7 #1 SMP Tue Aug 29 01:30:07 UTC 2006 x86_64 AMD Athlon(tm) 64 Processor 3200+ GNU/Linux

```

This is what i thought had happened  :Smile:  so i think you always emerge the gentoo-sources with the symlink use-flag!? You should check this:

```

emerge -pv gentoo-sources

```

Now, if you see USE="-symlink", then it's ok, if not, then you should consider changing it. The Problem is, with the symlink useflag your system

will allways switch to the newest kernel and this can cause problems like yours.

The next question is, why are you using an initrd? do you have special hardware that requires an initrd? fake-raid? disk-encryption?

If not, and i'm assuming not, because your root-disk is hda, you can _try_ to do this in your grub.conf, but i don't know if it really works:

```

default 0

fallback 1

timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

# default

title=Gentoo Linux ( new kernel 2.6.18-r6 )

root (hd0,0)

kernel /boot/linux-2.6.18-gentoo-r6 root=/dev/hda3

# fallback

title=Gentoo Linux ( old kernel 2.6.17-r7 )

root (hd0,0)

kernel /kernel-genkernel-x86_64-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3

initrd /initramfs-genkernel-x86_64-2.6.17-gentoo-r7 

```

Remember: When you update your kernel, don't remove the old one before you are sure the new one really works  :Wink: 

Good luck with that,

Greetz Age_M

----------

## NathanZachary

I don't think I would have a problem configuring my kernel manually, but I'm not sure that I had a choice in the first place.  I simply used the CD to install (networkless) and I guess it automatically uses genkernel.  I'm really just trying to learn as much as I can.  And to answer your specific questions, no I'm not using RAID, disk-encryption or anything else.  I might do a clean install now that I have a little better understanding of how Gentoo works.

--Zach

----------

## coolsnowmen

I apologize ahead of time if I am writing you about things you already know, 

well I recommend against completely reinstalling...its a waste of time, any system changes can be done with your current system.

Using the kernel already made for you as a base, it would not be a bad idea to learn to build one by hand.  Because if you like gentoo linux, eventually you will find a piece of hardware that requires you to build the kernel by hand to support it (In my experience).  remember the .config file contains the kernel options...

But its obvious that your video problem stems from the fact that

/usr/src/linux need to point to the same folder as the running kernel version (this will solve the system.map error you got when you tried to install nvidia)

  if you have to reboot, go ahead and disable xdm (rc-update del xdm) until you can modprobe nvidia successfully 

  then emerge nvidia-drivers again, 

  make sure you can modprobe nvidia

  eselect opengl set nvidia (probably unnecessary, and should not be done while X is running)

  make sure X starts...

----------

## i4dnf

if i read your original post right you say you have an mx4000, that means you should use nvidia-legacy-drivers, since support for the mx cards has been dropped from the more recent drivers. hope this helps.

----------

## coolsnowmen

 *i4dnf wrote:*   

> if i read your original post right you say you have an mx4000, that means you should use nvidia-legacy-drivers, since support for the mx cards has been dropped from the more recent drivers. hope this helps.

 

Where did you here that?

I'm not saying you are wrong...but I usually goto the source:

most recent package: nvidia-drivers-1.0.9746 	

http://www.nvidia.com/object/linux_display_ia32_1.0-9746.html

 ->Supported Products list

http://www.nvidia.com/object/IO_18897.html

 *Quote:*   

> ...
> 
> GeForce4 MX 4000 	0x0185
> 
> GeForce4 MX 420 	0x0172
> ...

 

(Its supported by bothe the IA32 driver and the amd64 one...) according to nvidia's website

I've found they are pretty good about updating this list

----------

## NathanZachary

@coolsnowmen,

Thanks for the information, and I will probably give it a try.  What I would like to do is to learn how to install Gentoo manually (without using the options provided).  By that, I mean I would like to compile my own kernel (without genkernel) from the start, and not have any options that I don't need.  I guess one doesn't have the option to configure the kernel manually if the installation is done networklessly.

When I updated to the newer kernel version, I didn't notice any real benefits, but I did notice a huge slowdown overall.  I think I would like to stick with the currently installed version.

Again, thanks for your help thus far.

--Zach

----------

## i4dnf

 *coolsnowmen wrote:*   

>  *i4dnf wrote:*   if i read your original post right you say you have an mx4000, that means you should use nvidia-legacy-drivers, since support for the mx cards has been dropped from the more recent drivers. hope this helps. 
> 
> Where did you here that?
> 
> ...

 

 here http://www.nvnews.net/vbulletin/showthread.php?t=82822

 *Quote:*   

>  Please note: This NVIDIA Linux graphics driver release supports GeForceFX and newer NVIDIA GPUs, GeForce4 and older GPUs are supported through the 1.0-96xx and 1.0-71xx NVIDIA legacy graphics drivers.

 

i guess that list is the list of all the cards they provide support for, but from some versions ago they dropped support for older cards in the main nvidia-drivers, and introduced nvidia-legacy-drivers for those cards.

----------

## coolsnowmen

 *i4dnf wrote:*   

>  *coolsnowmen wrote:*    *i4dnf wrote:*   if i read your original post right you say you have an mx4000, that means you should use nvidia-legacy-drivers, since support for the mx cards has been dropped from the more recent drivers. hope this helps. 
> 
> Where did you here that?
> 
> ... 
> ...

 

Well short of asking nvidia to clarify the difference.

The 9631 drivers are still in portage, So I'ld get that working, then upgrade and see what happens...

http://packages.gentoo.org/ebuilds/?nvidia-drivers-1.0.9631

----------

## NathanZachary

The MX4000 still uses the current nvidia-drivers in portage.  So, as of right now, they should be used instead of the legacy drivers.

----------

