# nvidia settings

## sk8harddiefast

i emerge nvidia driver but when i went to nvidia xserver settings to setup my resolution is not open the menu and tels me

```
You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server
```

----------

## smerf

Have you configured X to use nvidia driver (grep nvidia /etc/X11/xorg.conf)?

----------

## sk8harddiefast

i dont think so.i am new in gentoo.what i must to do?

----------

## honp

Change driver in section Device in /etc/X11/xorg.conf

    Driver         "nvidia"

----------

## d2_racing

The best for you is to run this :

```

# emerge -av nvidia-drivers media-video/nvidia-settings

# nvidia-xconfig

```

After that, reboot your box  :Razz: 

----------

## sk8harddiefast

it dont work.a have allready install them   :Crying or Very sad: 

----------

## d2_racing

What's the error then ?

----------

## sk8harddiefast

when i go to nvidia xserver settings it tells me that 

```
You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server
```

and menu is not show up.

When i run nvidia-xconfig (with sudo) create a new xorg.conf.but when i make restart the xorg.conf dont work and xserver crashes.

----------

## d2_racing

Ok, plz run this and post the result :

```

$ su -

# nvidia-xconfig

# cat /etc/X11/xorg.conf

# equery list nvidia

```

----------

## sk8harddiefast

su -

nothing returns me back

nvidia-xconfig

```
nvidia-xconfig

Using X configuration file: "/etc/X11/xorg.conf".

WARNING: The CorePointer device was not specified explicitly in the layout;

         using the first mouse device.

Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'

New X configuration file written to '/etc/X11/xorg.conf'

```

cat /etc/X11/xorg.conf

```
# nvidia-xconfig: X configuration file generated by nvidia-xconfig

# nvidia-xconfig:  version 1.0  (buildmeister@builder63)  Tue Nov  4 14:07:17 PST 2008

# Auto-generated by mkxf86config

Section "ServerLayout"

# Serial Mouse not detected

#No Synaptics touchpad found

    Identifier     "X.Org Configured"

    Screen      0  "Screen0" 0 0

    InputDevice    "Serial Mouse" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

    InputDevice    "PS/2 Mouse" "AlwaysCore"

    InputDevice    "USB Mouse" "AlwaysCore"

EndSection

Section "Files"

    FontPath        "/usr/share/fonts/util"

    FontPath        "/usr/share/fonts/encodings"

    FontPath        "/usr/share/fonts/misc"

    FontPath        "/usr/share/fonts/local"

    FontPath        "/usr/share/fonts/terminus"

    FontPath        "/usr/share/fonts/corefonts"

    FontPath        "/usr/local/share/fonts"

    FontPath        "/usr/share/fonts/default"

    FontPath        "/usr/share/fonts/TTF"

    FontPath        "/usr/share/fonts/type1"

    FontPath        "/usr/share/fonts/100dpi"

    FontPath        "/usr/share/fonts/75dpi"

    FontPath        "/usr/share/fonts/arphicfonts"

    FontPath        "/usr/share/fonts/jisx0213"

    FontPath        "/usr/share/fonts/shinonome"

    FontPath        "/usr/share/fonts/baekmuk-fonts"

    FontPath        "/usr/share/fonts/kacst-fonts"

    FontPath        "/usr/share/fonts/sgi-fonts"

    FontPath        "/usr/share/fonts/unfonts"

    FontPath        "/usr/share/fonts/default/ghostscript"

    FontPath        "/usr/share/fonts/xfonts-cronyx-100dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-75dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-misc:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-100dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-75dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-misc"

    FontPath        "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-cp1251-misc:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-cp1251-misc"

    FontPath        "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-isocyr-misc:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-isocyr-misc"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8r-misc:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8r-misc"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8u-misc:unscaled"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi"

    FontPath        "/usr/share/fonts/xfonts-cronyx-koi8u-misc"

EndSection

Section "Module"

    Load           "ddc"

    Load           "vbe"

    Load           "dbe"

    Load           "extmod"

    Load           "glx"

    Load           "bitmap"

    Load           "type1"

    Load           "freetype"

    Load           "record"

EndSection

Section "ServerFlags"

    Option         "AllowMouseOpenFail" "true"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

    Option         "CoreKeyboard"

    Option         "XkbRules" "xorg"

    Option         "XkbModel" "pc105"

#   Option   "XkbOptions" "grp:toggle,grp_led:scroll"

    Option         "XkbVariant" ",winkeys"

    Option         "XkbLayout" ""

EndSection

Section "InputDevice"

    Identifier     "Serial Mouse"

    Driver         "mouse"

    Option         "Protocol" "Microsoft"

    Option         "Device" "/dev/ttyS0"

    Option         "Emulate3Buttons" "true"

    Option         "Emulate3Timeout" "70"

    Option         "SendCoreEvents" "true"

EndSection

Section "InputDevice"

    Identifier     "PS/2 Mouse"

    Driver         "mouse"

    Option         "Protocol" "IMPS/2"

    Option         "Device" "/dev/misc/psaux"

    Option         "Emulate3Buttons" "true"

    Option         "Emulate3Timeout" "70"

    Option         "SendCoreEvents" "true"

    Option         "ZAxisMapping" "4 5"

EndSection

Section "InputDevice"

    Identifier     "USB Mouse"

    Driver         "mouse"

    Option         "Device" "/dev/input/mice"

    Option         "SendCoreEvents" "true"

    Option         "Protocol" "IMPS/2"

    Option         "ZAxisMapping" "4 5"

    Option         "Buttons" "5"

EndSection

Section "InputDevice"

    Identifier     "Synaptics"

    Driver         "synaptics"

    Option         "Protocol" "event"

    Option         "Device" ""

    Option         "LeftEdge" "1900"

    Option         "RightEdge" "5400"

    Option         "TopEdge" "1900"

    Option         "BottomEdge" "4000"

    Option         "FingerLow" "25"

    Option         "FingerHigh" "30"

    Option         "MaxTapTime" "180"

    Option         "MaxTapMove" "220"

    Option         "VertScrollDelta" "100"

    Option         "MinSpeed" "0.02"

    Option         "MaxSpeed" "0.10"

    Option         "AccelFactor" "0.0010"

    Option         "SHMConfig" "on"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    HorizSync       28.0 - 96.0

    VertRefresh     50.0 - 75.0

EndSection

Section "Device"

   ### Available Driver options are:-

   # sw_cursor is needed for some ati and radeon cards

   # The following line is auto-generated by x11-misc/mkxf86config

#   BusID       "PCI:1:0:0"

    Identifier     "Card0"

    Driver         "nvidia"

    VendorName     "All"

    BoardName      "All"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Card0"

    Monitor        "Monitor0"

    Option         "sw_cursor"

   #Option     "hw_cursor"

   #Option     "NoAccel"

   #Option     "ShowCache"

   #Option     "ShadowFB"

   #Option     "UseFBDev"

   #Option     "Rotate"

   #Option     "MonitorLayout" "LVDS, NONE"

    SubSection     "Display"

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection     "Display"

        Depth       4

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection     "Display"

        Depth       8

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection     "Display"

        Depth       15

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection     "Display"

        Depth       16

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection     "Display"

        Depth       24

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

    SubSection     "Display"

        Depth       32

        Modes      "1024x768" "800x600" "640x480"

    EndSubSection

EndSection

```

equery list nvidia

```

equery command not found
```

----------

## d2_racing

Hi, can you run this plz :

```

# emerge --info

# emerge -av gentoolkit

```

And then post this :

```

# equery list nvidia

```

----------

## sk8harddiefast

emerge --info

```

Portage 2.1.6.7 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r5 i686)

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

System uname: Linux-2.6.24-gentoo-r5-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.0

Timestamp of tree: Wed, 04 Mar 2009 10:40:01 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 2.1.6-r1

dev-lang/python:     2.4.4-r13, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r6

dev-util/cmake:      2.4.8

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

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

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

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

DISTDIR="/usr/portage/distfiles"

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

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="C"

LDFLAGS="-Wl,-O1"

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 acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde ldap libnotify mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xulrunner xv 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

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

i install gentoolkit.

now equery runs

```
equery list nvidia 

[ Searching for package 'nvidia' in all categories among: ]

 * installed packages

[I--] [  ] media-video/nvidia-settings-177.80 (0)

[I--] [  ] x11-drivers/nvidia-drivers-177.82 (0)
```

----------

## Leon_UK

your emerge --info shows no mention of nvidia as a gfx card

```
VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" 
```

So in your /etc/make.conf you should have a line with at least..

```
VIDEO_CARDS="nvidia nv vesa"
```

 (nv and vesa not needed per say but it's good to have a backup driver)

you can try recompiling against that to see if it makes a different

```
emerge --deep --newuse --ask --verbose world
```

 of course you can shorten it too (emerge -DNav world) which does the exact same thing, just makes it easier to type.

After that just to be sure you can try shutting down the xserver ((you will need root access))

```
 /etc/init.d/xdm stop
```

should leave you in a terminal with a login prompt

then unload the nvidia module and reload it with

```
modprobe -r nvidia

modprobe nvidia
```

Then tell X to use nvidia for opengl

```
 eselect opengl set nvidia

Switching to nvidia OpenGL interface... done
```

getting the message 'done' should mean it worked we can test with the following.

```
eselect opengl list

Available OpenGL implementations:

  [1]   nvidia *

  [2]   xorg-x11

```

Then to test it out back in your X session

```
 /etc/init.d/xdm start
```

----------

## sk8harddiefast

i went to /etc/make.conf and i write to the end the  extra line VIDEO_CARDS="nvidia nv vesa"

after that when i make emerge --deep --newuse --ask --verbose world i have 3 things and he ask me to reinstall them so i did it.

when i stop xdm i went to modprobe nvidia but tell me nvidia module not found!

----------

## Leon_UK

 *sk8harddiefast wrote:*   

> i went to /etc/make.conf and i write to the end the  extra line VIDEO_CARDS="nvidia nv vesa"
> 
> after that when i make emerge --deep --newuse --ask --verbose world i have 3 things and he ask me to reinstall them so i did it.
> 
> when i stop xdm i went to modprobe nvidia but tell me nvidia module not found!

 

```
emerge --oneshot nvidia-drivers
```

run that to recompile nvidia drivers so it can rebuild the module and try again

----------

## sk8harddiefast

i did it but it telling me again that is cant fid the nvidia module

----------

## z3rgl1ng_z

Some more info would be great:

```
emerge -v pciutils
```

```
lspci | grep VGA
```

```
cat /var/log/Xorg.0.log | grep nvidia
```

----------

## Leon_UK

It would also be nice if you could post 

```
cat /usr/src/linux/.config  | grep MODULE
```

Interested in if your kernel has loadable module support

EDIT: this is what mine looks like for the important stuff kernel wise the (y indicates that it is compiled into the kernel instead of being compiled as a module (m))

```
$ cat /usr/src/linux/.config | grep MODULE

CONFIG_MODULES=y

# CONFIG_MODULE_FORCE_LOAD is not set

CONFIG_MODULE_UNLOAD=y

CONFIG_MODULE_FORCE_UNLOAD=y

# CONFIG_MODULE_SRCVERSION_ALL is not set

```

```
$ cat /usr/src/linux/.config | grep MTRR

CONFIG_MTRR=y

# CONFIG_MTRR_SANITIZER is not set
```

```
$ cat /usr/src/linux/.config | grep AGP

CONFIG_AGP=y

CONFIG_AGP_AMD64=y

# CONFIG_AGP_INTEL is not set

# CONFIG_AGP_SIS is not set

# CONFIG_AGP_VIA is not set

```

----------

## sk8harddiefast

lspci | grep VGA

```

01:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTX] (rev a2)
```

cat /usr/src/linux/.config  | grep MODULE]

```
CONFIG_MODULES=y

CONFIG_MODULE_UNLOAD=y

CONFIG_MODULE_FORCE_UNLOAD=y

# CONFIG_MODULE_SRCVERSION_ALL is not set
```

cat /usr/src/linux/.config | grep MTRR

```
CONFIG_MTRR=y
```

cat /usr/src/linux/.config | grep AGP 

```
# CONFIG_AGP is not set
```

----------

## Leon_UK

Everything there looks fine (ignore AGP since we are running pci-e so it makes no difference)

the other thing to check I was suppose to include in my post was 

```
cat /usr/src/linux/.config | grep FB_NVIDIA

# CONFIG_FB_NVIDIA is not set

```

if it does'nt look like mine then you have that set and will have to recompile your kernel as so (if it is not set or even is it is scroll down and read the EDIT first:).

```
su -

cd /usr/src/linux

make clean

make menuconfig

```

then find the following and disable nVidia frambuffer support (you can leave Support for frame buffer devices its nice to have just use vesa or uvesa instead)

```
Device Drivers --->

Graphics Support --->

<*> Support for frame buffer devices --->

< >   nVidia Framebuffer Support

< >   nVidia Riva support

```

after that exit and make sure /boot is mounted and recompile your kernel and nvidia-drivers prior to rebooting. Double check your grub.conf (if you use grub)  so that you boot from the new kernel

```
mount /boot

make && make modules_install && make install 
```

```
emerge --oneshot nvidia-drivers
```

make install will install your kernel to /boot for you, so it is important /boot is mounted. Also the name of the kernel will be something like vmlinuz-2.6.28-xxx you can find that out once the kernel has been compiled with

```
 ls /boot
```

 once you get the name of the kernel edit your grub.conf to reflect the new kernel, since we want to be sure that it is the one we are booting from and finally once grub is set  reboot

```
shutdown -r now
```

EDIT:

Someone in another thread had a similar problem, the problem was they was compiling against the wrong kernel, to test this.

```
eselect kernel list
```

you will see a star next to the kernel it is linked to, to check if it is the same as the one you are running do:

```
uname -rv
```

compare the to names if they are different run:

```
eselect kernel set X
```

and replace X with the number of the kernel you are running that was shown in the list and double check that it is now pointing to the correct kernel:

```
eselect kernel list

Available kernel symlink targets:

  [1]   linux-2.6.28-hardened *

  [2]   linux-2.6.27-gentoo-r2

```

if it is try to recompile nvidia-drivers if it complains that it cant find the kernel .config 

```
make clean

make menuconfig
```

double check that everything is in order recompile your kernel as posted above (before the edit) including the nvidia-drivers

----------

