# nvidia kernel module issues

## kokes

Hi, I have converted to gcc 3.4.4, switched to gentoo-sources-2.6.14-r4 kernel, updated to udev-077-r3 (then r4) and now I have following problem with X:

1) When I tried to run startx (I have X.org) with nvidia-kernel 1.0.6629 (I think) the x server falled down with something like "failed to initialize nvidia kernel module"

2) I found here in forums, that in nvidia-kernel 1.0.7174 are some bug fixes, so I emerged that. I got black screen (x programs run, when I wrote a password, KDE start began). I thought, that problem is with nvidia-glx, which was of 6xxx version. So I've unmasked it and was forced to install 8174 version (of glx and kernel mod. too).

3)  With 8174 version I got the same black screen again. But in console were the error messages getXActiveScreen ... from libdri.a unresolved. I searched in forums again and found, that this is maybe a problem with access rights of /dev/nvidia0 and /dev/nvidiactl. These are 666 on my system, so I think, that rights are not my problem.

I've not changed /etc/X11/xorg.conf from my last running configuration, but maybe it could be wrong for the new nvidia version ??? I think not.

So, final question: What to do with that?

Thanks for all hints.

----------

## Jogie214

Hey!

Have you compiled your kernel and the nvidia-module with the new gcc? If not, do so!

Please psot your xorg.conf, because the libdri.a issue seems to indicate that you still have an entrie like

```
Load "dri" 
```

in your xorg.conf, you should comment thies out.

Seb

Sorry for my bad english  :Smile: 

----------

## stahlsau

did you recompile your kernel after switching compilers?

And, after rebooting the new kernel, you should recompile nvidia-kernel too.

----------

## kokes

So (just to be sure) I recompiled the kernel (2.6.14-r4 with gcc 3.4.4), then I rebooted and recompiled nvidia-kernel and nvidia-glx. Then I run 

```
eselect set opengl nvidia
```

which is recommended by enotify at the end of nvidia-glx compilation. Then I run startx and get again the black screen - but with running applications "behind" it.

I had the "Load dri" line in xorg.conf, don't know why, so I've commented it out -> messages about getX... disappeared.

But there is a new message, just after startx command, before x messages: "hostname: unknown". Maybe it was there before....

Finally my current xorg.conf:

```

Section "ServerFlags"

   Option "DefaultServerLayout" "beztv"

EndSection

Section "ServerLayout"

   Identifier     "stv"

   Screen      0  "Screen0" 0 0

   Screen      1  "Screen1" RightOf "Screen0"

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

   Identifier   "beztv"

   Screen   0   "Screen0" 0 0

   InputDevice   "Mouse0" "CorePointer"

   InputDevice   "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   RgbPath      "/usr/lib/X11/rgb"

   ModulePath   "/usr/lib/modules"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/TTF/"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/CID/"

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

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

EndSection

Section "Module"

   Load  "extmod"

   #Load  "dri"

   Load  "dbe"

   Load  "record"

   Load  "xtrap"

   Load  "glx"

   Load  "type1"

   Load  "freetype"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "IMPS/2"

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

   Option       "ZAxisMapping" "4 5"

   Option       "Buttons" "5"

EndSection

Section "Monitor"

   #DisplaySize     350   260   # mm

   Identifier   "Monitor0"

   VendorName   "ADI"

   ModelName    "ADI P920"

   HorizSync    30.0 - 96.0

   VertRefresh  50.0 - 150.0

   Option       "DPMS"

EndSection

Section "Monitor"

   Identifier   "Monitor1"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

EndSection

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "SWcursor"              # [<bool>]

        #Option     "HWcursor"              # [<bool>]

        #Option     "NoAccel"               # [<bool>]

        #Option     "ShadowFB"              # [<bool>]

        #Option     "UseFBDev"              # [<bool>]

        #Option     "Rotate"                # [<str>]

        #Option     "VideoKey"              # <i>

        #Option     "FlatPanel"             # [<bool>]

        #Option     "FPDither"              # [<bool>]

        #Option     "CrtcNumber"            # <i>

        #Option     "FPScale"               # [<bool>]

        #Option     "FPTweak"               # <i>

   Identifier  "Card0"

   Driver      "nvidia"

   VendorName  "nVidia Corporation"

   BoardName   "NV11 [GeForce2 MX/MX 400]"

   BusID       "PCI:1:0:0"

EndSection

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "slow_edodram"          # [<bool>]

        #Option     "slow_dram"             # [<bool>]

        #Option     "fast_dram"             # [<bool>]

        #Option     "fpm_vram"              # [<bool>]

        #Option     "pci_burst"             # [<bool>]

        #Option     "fifo_conservative"     # [<bool>]

        #Option     "fifo_moderate"         # [<bool>]

        #Option     "fifo_aggressive"       # [<bool>]

        #Option     "pci_retry"             # [<bool>]

        #Option     "NoAccel"               # [<bool>]

        #Option     "early_ras_precharge"    # [<bool>]

        #Option     "late_ras_precharge"    # [<bool>]

        #Option     "lcd_center"            # [<bool>]

        #Option     "set_lcdclk"            # <i>

        #Option     "set_mclk"              # <freq>

        #Option     "set_refclk"            # <freq>

        #Option     "show_cache"            # [<bool>]

        #Option     "HWCursor"              # [<bool>]

        #Option     "SWCursor"              # [<bool>]

        #Option     "ShadowFB"              # [<bool>]

        #Option     "Rotate"                # [<str>]

        #Option     "UseFB"                 # [<bool>]

        #Option     "mxcr3afix"             # [<bool>]

        #Option     "XVideo"                # [<bool>]

   Identifier  "Card1"

   Driver      "s3virge"

   VendorName  "S3 Inc."

   BoardName   "ViRGE/DX or /GX"

   BusID       "PCI:2:11:0"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   DefaultDepth 24 

   SubSection "Display"

      Viewport   0 0

      Depth     1

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

   EndSubSection

EndSection

Section "Screen"

   Identifier "Screen1"

   Device     "Card1"

   Monitor    "Monitor1"

   DefaultDepth 24

   SubSection "Display"

      Viewport   0 0

      Depth     1

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

   EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

   EndSubSection

EndSection

```

Nvidia is card0, that is the one, that I use. The second one is for tv output, which is not set up yet.

----------

## Jogie214

Okay set your hostname in /etc/conf.d/hostname.

While reading your xorg.conf, I'm wondering where you define your resolutions, here is the relevant part from my xorg.conf:

```

Section "Screen"

        Identifier "Screen0"

        Device     "Card0"

        Monitor    "Monitor0"

        DefaultColorDepth 24

        SubSection "Display"

                Depth     24

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

        EndSubSection

Endsection

```

Please post the last maybe 30 lines of your /var/log/Xorg.0.log (I guess).

----------

## ebike

I get the "hostname" error with the 2.6.14 kernel as well. I did not find a solution, so had to revert to a 2.6.11 kernel

and downgrade ny nvidia driver to 6629.

Anyone know how to fixe this hostname issue? I cannot rum Mythtv which relies on a correct hostname.

(seems strange since /etc/conf.d/hostname is correctly set on my machine and works with 2.6.11, maybe someone has 

changed things in 2.6.14 without notifying anyone ... as seems to more the norm these days with gentoo releases ..)

----------

## stahlsau

mmh..i remember i got an error about the hostname aswell some time ago. Maybe you got another file /etc/hostname or something similar? Deleting this solved my problem.

----------

## ebike

Nope, I had allready deleted /etc/hostname some time ago. All I have is /etc/conf.d/hostname.

Also, I note that running domainname returns nothing. Although /etc/conf.d/domainname has my domain in it.

Do I also have to attach it to localhost? i.e  "127.0.0.1 localhost.domainname" instead of just "127.0.0.1 localhost" in /etc/hosts

----------

## kokes

Thanks to all, my problem is solved, it was an error in xorg.conf (I've replaced viewport with modes and now it's ok). It's strange, that I didn't do any changs i that file. So thanks.

----------

