# Problem with Nvidia Drivers

## thehighpander

I am trying to get the Nvidia Drivers to work on my system. I get a "no screens found" error. Here are some relevent pastes, sorry for the slight lack of coherency, but im doing this all in Links, with an unfortunate resolution. 

My error

bpaste.net/show/33825

My Xorg.cong

bpaste.net/show/33825

If anyone has any thoughts or ideas I would appreciate the help. The only relevent result from google didnt work for me.

If you need anymore info, just let me know. Im running the latest kernel etc. releses, this install is only 2 days old.

Thanks

lspci

bpaste.net/show/33827

----------

## eccerr0r

```
[  1727.988] (II) LoadModule: "nvidia"

[  1727.988] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so

[  1727.988] (II) Module nvidia: vendor="NVIDIA Corporation"

[  1727.988]    compiled for 4.0.2, module version = 1.0.0

[  1727.988]    Module class: X.Org Video Driver

[  1728.034] (EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your

[  1728.035] (EE) NVIDIA:     system's kernel log for additional error messages.

[  1728.035] (II) UnloadModule: "nvidia"

[  1728.035] (II) Unloading nvidia

[  1728.035] (EE) Failed to load module "nvidia" (module-specific error, 0)

[  1728.035] (EE) No drivers available.

```

This looks like it had a problem finding the kernel module.  The kernel module tends to need to match the kernel.

Do a lsmod and look for nvidia.ko, it should stick out as a sore thumb as a 1MB kernel module.  Also check dmesg for some clues about why it didn't load. 

It may be as simple as re-emerge nvidia-drivers to make it match up with your current kernel (if /usr/src/linux points to the right place...)

----------

## thehighpander

I ran lsmod, and there is nothing about nvidia.ko, even afte a re-energe of nvidia-drivers, and a reboot.

Dmesg says 

bpaste.net/show/33839

I looked through my kernel config though and none of the listed were active.

Here is my .config if that helps

bpaste.net/show/33840

Thanks

----------

## BillWho

thehighpander,

Does this return a count > 0 (don't do this from a chroot - do it from your installed gentoo)

```
grep -c nvidia /lib/modules/$(uname -r)/{modules.dep,modules.alias}
```

Does this return anything 

```
find /lib/modules/$(uname -r)/kernel -type f -iname 'nvidia*'
```

----------

## thehighpander

the first one returns file not found

if i do them seperatly .dep returns 1 and alies returns 5

the other returns nothing.

----------

## eccerr0r

```
[  510.357489] NVRM: The NVIDIA probe routine was not called for 1 device(s).

[  510.357492] NVRM: This can occur when a driver such as nouveau, rivafb,

[  510.357493] NVRM: nvidiafb, or rivatv was loaded and obtained ownership of

[  510.357494] NVRM: the NVIDIA device(s).

[  510.357495] NVRM: Try unloading the conflicting kernel module (and/or

[  510.357496] NVRM: reconfigure your kernel without the conflicting

[  510.357497] NVRM: driver(s)), then try loading the NVIDIA kernel module

[  510.357498] NVRM: again.

[  510.357499] NVRM: No NVIDIA graphics adapter probed!

```

This is kind of weird...Do you have any of these loaded (nouveau, rivafb, nvidiafb, rivatv?

It looks like you do have CONFIG_FB enabled but I don't see nvidiafb ...

weird...

----------

## BillWho

 *thehighpander wrote:*   

> the first one returns file not found
> 
> if i do them seperatly .dep returns 1 and alies returns 5
> 
> the other returns nothing.

 

 *Quote:*   

> im doing this all in Links

 

It would be better if you chroot from  systemrescuecd  or some other live media.

If you have entries in modules.dep and modules.alias then you should have a nvidia.ko in /lib/modules/$(uname -r)

Can you chroot and 

```
ebuild  $(equery w x11-drivers/nvidia-drivers) compile
```

 and wgetpaste the log   :Question: 

----------

## thehighpander

I ran it and got

http://bpaste.net/show/NvPweHvPFv0mbb4NpGlB/

It seemed to run ok.

EDIT:

I'm running off a chroot in a Lubuntu Live usb.

I rebooted back into gentoo, and nothing there changed.

Back in lubuntu now.

----------

## BillWho

thehighpander,

Except for one warning it looks good

Try the full emerge again then go to your /lib/modules/kernel-version (don't use uname -r because it will be lubuntu's version) and 

find  -iname 'nvidia*'

----------

## thehighpander

lubuntu 3.3.8-gentoo # find -iname 'nvidia*'

./video/nvidia.ko

will reboot and let you know

----------

## BillWho

thehighpander,

You could have done the find from in the chroot   :Smile:  Just don't use $(uname -r) to resolve the module path   :Wink: 

----------

## thehighpander

Sorry, 

```

lubuntu 3.3.8-gentoo # find -iname 'nvidia*' 

./video/nvidia.ko

```

was the response. I just rebooted to see if that fixed any thing

upon startx, now I get

http://bpaste.net/show/33856

back in lubuntu now, whats next?

----------

## BillWho

thehighpander,

Make sure you have VIDEO_CARDS="fbdev vesa nvidia" in make.conf and emerge -uavDN @world 

When that's done emerge -av1 $(qlist -I -C x11-drivers)

----------

## thehighpander

that all seemed to work fine. 

rebooting to test

----------

## thehighpander

Nope. Startx still produces No Screens found

bpaste.net/show/33866

```

[    42.792] (EE) NVIDIA: Failed to load the NVIDIA kernel module. Please check your

[    42.792] (EE) NVIDIA:     system's kernel log for additional error messages.

```

----------

## BillWho

what's the output of  

```
eselect opengl show 
```

----------

## thehighpander

```

lubuntu / # eselect opengl show

nvidia

```

----------

## BillWho

Did you install a wm/de yet   :Question: 

----------

## thehighpander

yes. i installed lxde and had it running perfectly before this.

----------

## BillWho

thehighpander,

Might be coincidence of timing with nvidia, but I got errors with lxde the other day after a udev update. What I did was

eix-sync && revdep-rebuild then emerge lxde-meta lxde-common 

If that doesn't work, try dropping back to the prior version of nvidia

----------

## eccerr0r

Are you trying to run Gentoo in an ubuntu chroot? That's not going to work unless your ubuntu has the same kernel version as gentoo - the module versions won't match up...

But this still doesn't explain why it won't load the module...

If you modprobe nvidia and then do a dmesg|tail, does it still give you the "no cards detected" issue?

Also what's in your lsmod ?

----------

## thehighpander

@Billwho - after running those commands I see no change

@Eccerr0r - I was just using a lubuntu chroot to troubleshoot

If i modprobe nvidia the dmesg|tail i get

"nvidia 11531559 1"

----------

## BillWho

thehighpander,

Can you paste back:

```
lsmod 

modinfo -F vermagic nvidia 

ls -l /boot

uname -a

```

----------

## thehighpander

lsmod

```

Module                  Size  Used by

vboxnetflt             15085  0 

vboxnetadp             17542  0 

vboxdrv              1780636  2 vboxnetflt,vboxnetadp

```

modinfo -F vermagic nvidia 

```

3.3.8-gentoo SMP mod_unload 

```

ls -l /boot 

```

total 4668

-rw-r--r-- 1 root root 4779936 Jul  8 09:19 bzImage

```

uname -a 

```

Linux thehighpander-pc 3.3.8-gentoo #2 SMP Wed Jul 4 05:54:08 Local time zone must be set--see zic m x86_64 AMD Phenom(tm) II X4 840 Processor AuthenticAMD GNU/Linux

```

----------

## BillWho

thehighpander,

One thing that sticks out is the date disparity with the contents of /boot and kernel time stamp.

rw-r--r-- 1 root root 4779936 Jul  8 09:19 bzImage 

3.3.8-gentoo #2 SMP Wed Jul 4 05:54:08

If you followed the handbook and created a separate /boot partition, then by the listing it's not mounted and you're copying  bzImage to the wrong place thereby booting an older kernel.

If a modification was made and you did a make && make modules_install then the modules are not matched to the kernel.

The nvidia module is compiled against the correct kernel version so that's OK.

----------

## thehighpander

I feel like I should just re-install with the nvidia drivers in mind from the get-go. I'm going to go mess around a bit, and if that doesn't work, its re-install time.

thanks for your time and help everyone, I actually learned a bit in the process.

----------

## thehighpander

All right, well, I reinstalled and ran into the same problem, then I reinstalled and installed X11, nvidia drivers, and lxde all before my first reboot after the install was over, and the system booted flawlessly. As best I can tell, the system just doesn't like to let go of the nouveau drivers, so I never gave them a chance to load. Odd, but it might help someone else, so I thought I'd share.

----------

