# How to fix the annoying NVdriver Gentoo 1.4_rc2 bug.

## Knight

As I have have noticed and many of you people out there the NVdriver kernel module has been having weird problems with working on Gentoo 1.4_rc2 lately. Namely XFree86 complaining about failure to initialize the NVdriver kernel module. Well I figured out a way to fix this rather easily without having to add NVdriver to /etc/modules.autoload. It's actually an old fix that was required around when the nvidia kernel driver still didn't support devfs. It requires editing to /etc/modules.d/nvidia and the creation of /etc/devfs.d/nvidia. I've had great success with this method and would like to share it with my fellow gentoo users. First you need to edit /etc/modules.d/nvidia and add make the appropriate changes to fit in accordance with what I have posted.

/etc/modules.d/nvidia

```
alias char-major-195  NVdriver

# nVidia DevFS support.

alias /dev/nvidia0    NVdriver

alias /dev/nvidia1    NVdriver

alias /dev/nvidiactl  NVdriver

```

Once you've added those 3 lines save the file and do update-modules. Now the last thing we need to do is force devfs to create the device entries to do this we'll make a file called nvidia in /etc/devfs.d/

/etc/devfs.d/nvidia

```
# nVidia DevFS support.

LOOKUP nvidia0    MODLOAD

LOOKUP nvidia1    MODLOAD

LOOKUP nvidiactl  MODLOAD

```

Save the file once you write this in and either send a SIGHUP signal to devfs or to restart your machine. After that X should startup without any issues. I hope this tip helps you guys if you have any questions you're more than welcome to private message me.

----------

## nempo

I fixed it by first doing 'emerge -C nvidia-kernel' and then 'emerge nvidia-kernel'.

----------

## Supox

Nice tip knight, but you're forgetting that the new nvidia-drivers 1.0.4191-r1 are using the name nvidia instead NVdriver. 

edit /etc/modules.d/nvidia 

NOTE: <nv-module> is an alias for the real name of the nvidia kernel module !!! I'm not entirely sure if you could specify on just one location within /etc/modules.d/ an alias and use that alias in /etc/modules.d/nvidia. But i use one here to indicate that no matter what the name is within /etc/modules.d/nvidia, it still remains the same.

```

alias char-major-195  <nv-module>

# nVidia DevFS support.

alias /dev/nvidia0    <nv-module>

alias /dev/nvidia1    <nv-module>

alias /dev/nvidiactl  <nv-module>

```

Currently valid names for <nv-module>: 

nvidia, for the new drivers 1.0.4xxx

NVdriver, for the older drivers till 1.0.3xxx

Last edited by Supox on Mon Jan 27, 2003 12:45 pm; edited 1 time in total

----------

## ErnieS

alias /dev/nvidiactl  nv-module 

I'v tried all three of the above solutions I'm still stuck with "vesa" drivers on my GeForce4 TI4200to satisfy my curiosity, in the above line, is that nvidiact"L" or nvidiact"one"?

----------

## Supox

EmleS: that's an "L" not a 1.

----------

## ErnieS

that's what I figured, well the fact remains that I still am running vesa drivers. With the "nvidia" driver, "startx" fails with a message something to the effect of "couldn't locate nvidia-kernel. if it would help anyone, I could post XF86Config and xfree86.0.log

----------

## Cyclone

Ernie,

From the looks of your post you literally tried to do:

alias /dev/nvidiactl nv-module

Correct?

the nv-module was supposed to be a generic term that varied depending on which version of the driver you used.

for the 3123 drivers, nv-module should be replaced with NVdriver:

alias /dev/nvidiactl NVdriver

for the new drivers (4191), nv-module should be replaced with nvidia:

alias /dev/nvidiactl nvidia

--

Cyclone

----------

