# nvidia setup problem

## skilambi

Hi All,

I am new to Gentoo and I am having issues installing nvidia drivers. Currently I use the "nv" driver and it works fine. These are the steps I followed to use nvidia.

1) I reconfigured the kernel to remove nvidia fb support as well as riva. I did not explicitly remove nouveau support as I did not find it. Is this normal? This is how i reconfigured the kernel

       1.a) Went under /usr/src/linux/

       1.b) make menuconfig

       1.c) went under device drivers

       1.d) unchecked nvidia framebuffer support

       1.e) exited

       1.f) typed in "make && make modules_install"

       1.g) After it compiled it said bzimage is ready. Cannot remember exact path.

       1.h) typed in "update_modules"

2) I emerged nvidia-drivers. I am guessing this compiled nvidia drivers  matching my new kernel

3) As stated in the text output messages of the emerge. I typed "modprobe -r nvidia"

4) I typed "nvidia-xconfig" to regenerate xconfig.org. Checked to see if it had driver nvidia in it. It did.

    I should note that load dri2 was present in modules section. I read somewhere that I should removed "load dri". Do i need to remove "dri2" as well?

5) stopped kdm

6) restarted kdm

7) typed startx.

I get errors stating that dri and dri2 could not be loaded and module nvidia could not be inserted. WTF????

Alternatively I read on some forum that someone downloaded the latest driver from nvidia website and it worked for them. I did that and the log file had the following output

>>>>>

 Kernel module compilation complete.

ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most

       frequently when this kernel module was built against the wrong or

       improperly configured kernel sources, with a version of gcc that differs

       from the one used to build the target kernel, or if a driver such as

       rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel

       module from obtaining ownership of the NVIDIA graphics device(s), or

       NVIDIA GPU installed in this system is not supported by this NVIDIA

       Linux graphics driver release.

       Please see the log entries 'Kernel module load error' and 'Kernel

       messages' at the end of the file '/var/log/nvidia-installer.log' for

       more information.

-> Kernel module load error: insmod: error inserting './kernel/nvidia.ko': -1

   No such device

-> Kernel messages:

   [ 1010.200915] nvidiafb_setcolreg END

   [ 1010.200916] nvidiafb_setcolreg START

   [ 1010.200917] nvidiafb_setcolreg END

   [ 1050.771298] firefox used greatest stack depth: 5372 bytes left

   [ 1050.780225] X used greatest stack depth: 5220 bytes left

   [ 1050.815205] krunner used greatest stack depth: 5124 bytes left

   [ 1073.571873] nvidia: module license 'NVIDIA' taints kernel.

   [ 1073.571876] Disabling lock debugging due to kernel taint

   [ 1074.415606] NVRM: The NVIDIA probe routine was not called for 1

   device(s).

   [ 1074.415609] NVRM: This can occur when a driver such as rivafb, nvidiafb

   or

   [ 1074.415610] NVRM: rivatv was loaded and obtained ownership of the NVIDIA

   [ 1074.415611] NVRM: device(s).

   [ 1074.415613] NVRM: Try unloading the rivafb, nvidiafb or rivatv kernel

   module

   [ 1074.415614] NVRM: (and/or reconfigure your kernel without rivafb/nvidiafb

   [ 1074.415615] NVRM: support), then try loading the NVIDIA kernel module

   again.

   [ 1074.415617] NVRM: No NVIDIA graphics adapter probed!

   [ 1161.975863] NVRM: The NVIDIA probe routine was not called for 1

   device(s).

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

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

   of

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

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

   [ 1161.975871] NVRM: reconfigure your kernel without the conflicting

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

   [ 1161.975873] NVRM: again.

   [ 1161.975875] NVRM: No NVIDIA graphics adapter probed!

ERROR: Installation has failed.  Please see the file

       '/var/log/nvidia-installer.log' for details.  You may find suggestions

       on fixing installation problems in the README available on the Linux

       driver download page at www.nvidia.com.

>>>>>>

I dont get it. I removed fb and riva support. So why the complaints??

Can anyone help. I have been at it for 2 days non-stop now.  :Sad:   :Sad: 

Regards,

----------

## d2_racing

Hi, can you post this :

```

# emerge --info

# cd /usr/src

# ls -la

# cat /boot/grub/grub.conf

```

----------

## skilambi

Hi d2_racing, 

Thanks for the quick reply

Output of emerge --info

>>>>

Portage 2.1.8.3 (default/linux/x86/10.0/desktop/kde, gcc-4.4.3, glibc-2.10.1-r1, 2.6.34-gentoo-r1 i686)

=================================================================

System uname: Linux-2.6.34-gentoo-r1-i686-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-gentoo-1.12.13

Timestamp of tree: Tue, 10 Aug 2010 00:30:01 +0000

app-shells/bash:     4.0_p37

dev-lang/python:     2.6.4-r1, 3.1.2-r3

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.65

sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 AdobeFlash-10"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.mirrors.tera-byte.com/ http://gentoo.gossamerhost.com ftp://gentoo.arcticnetwork.ca/pub/gentoo/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.arcticnetwork.ca/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://mirror.the-best-hosting.net "                                                            

LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                  

PKGDIR="/usr/portage/packages"                                                                     

PORTAGE_CONFIGROOT="/"                                                                             

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"        

PORTAGE_TMPDIR="/var/tmp"                                                                          

PORTDIR="/usr/portage"                                                                             

SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                     

USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif extras fam firefox flac fortran gdbm gif gpm gtk hal iconv ipv6 jpeg kde lcms ldap libnotify mad mikmod mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 x86 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

>>>>>>

output of cd /usr/src followed by ls -la

>>>>>

total 12

drwxr-xr-x  3 root root 4096 Aug  9 19:34 .

drwxr-xr-x 13 root root 4096 Aug 12 18:16 ..

-rw-r--r--  1 root root    0 Jun 22 07:30 .keep

lrwxrwxrwx  1 root root   22 Aug  9 19:34 linux -> linux-2.6.34-gentoo-r1

drwxr-xr-x 24 root root 4096 Aug 14 06:20 linux-2.6.34-gentoo-r1

>>>>>

output of cat /boot/grub/grub.conf

>>>>

file does not exist???????????? Theres actually nothing under boot. Thats weird. I get the grub splash screen whenever i reboot so grub.conf has to be somewhere

----------

## d2_racing

Ok, post this :

```

# cat /etc/fstab

# mount

```

----------

## skilambi

Hi d2_racing.

Thanks for quick reply again. As requested

output of cat /etc/fstab

>>>>>>>>>

# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda1               /boot           ext3            noauto,noatime  1 2

/dev/sda3               /               ext3            noatime         0 1

/dev/sda2               none            swap            sw              0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,ro,users 0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/sdb1               /mnt/sechd      ntfs-3g            users         0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

proc                    /proc           proc            defaults                0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

>>>>>>>>>>>

output of mount

>>>>>>>>>>>

/dev/sda3 on / type ext3 (rw,noatime)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)

/dev/sdb1 on /mnt/sechd type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

>>>>>>>>>>>

Ahhhhhh boot is missing. So I mounted /dev/sda1 (boot partition) on to /boot and now I can see the grub folder

Output of cat /boot/grub/grub.conf

>>>>>>>>>>

# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook

# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2

# If you are not using Genkernel and you need help creating this file, you

# should consult the handbook. Alternatively, consult the grub.conf.sample that

# is included with the Grub documentation.

default 0

timeout 30

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

title Gentoo Linux 2.6.34-r1

root (hd0,0)

kernel /boot/smk_kernel_r1 root=/dev/sda3

title Gentoo Linux 2.6.34-r1 (rescue)

root (hd0,0)

kernel /boot/smk_kernel_r1 root=/dev/sda3 init=/bin/bb

#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

# vim:ft=conf:

>>>>>>>>>>>

Oh ok. So smk_kernel_r1 was the name of the kernel I gave when I first compiled gentoo. This means the its booting my first installation. So everytime I recompile my kernel, I need to update this kernel with the bzimage thing. Is that correct????

Regards,

----------

## d2_racing

Yes, and you must run this before copying it :

```

# mount /boot

# cd /boot

# ls -la

```

Now, you will have the correct /boot.

----------

## skilambi

Thanks d2_racing

That worked  :Smile:   :Smile: 

Regards,

----------

## d2_racing

No problem  :Razz: 

----------

