# nvidia & 2.6.6 & x11

## njlg

(I am posting these because I have noticed some people having this problem on this forum, but no one has posted a solution. I hope one exists.)

I recency ran into problems with 2.6.6 & nvidia-kernel (who hasn't really). So after I tried to get them working together for acouple weeks, I decided to go back to 2.6.5 where I had nvidia-kernel (quasi) working. 

When my system comes up with 2.6.5 the nvidia module is auto probed. 

```
% startx

hostname: Unknown host

Release Date: 18 December 2003

X Protocol Version 11, Revision 0, Release 6.7

Build Operating System: Linux 2.6.5-gentoo-r1 i686 [ELF] 

Current Operating System: Linux cN*2 2.6.5-gentoo-r1 #2 SMP Thu Apr 22 10:33:34 PDT 2004 i686

Build Date: 23 April 2004

   Before reporting problems, check http://wiki.X.Org

   to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jun  1 13:08:00 2004

(==) Using config file: "/etc/X11/XF86Config"

Using vt 7

(EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module!

(EE) NVIDIA(0):  *** Aborting ***

(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:

no screens found

Please consult the The X.Org Foundation support 

    at http://wiki.X.Org

 for help. 

Please also check the log file at "/var/log/Xorg.0.log" for additional information.

XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"

      after 0 requests (0 known processed) with 0 events remaining.
```

Then I uninstall all versions of nvidia-kernel & nvidia-glx from my system. Double check that /usr/src/linux is pointing to 2.6.5-gentoo-r1. Then I emerge nvidia-kernel-1.0.5336-r2 &

nvidia-glx-1.0.5336-r2. Then I try to run x11 and get exactly the same message as before. Then I try the following

```
% sh /usr/portage/distfiles/NVIDIA-Linux-x86-1.0-5341-pkg1.run -a -s

chown: `0.0' syntax is obsolete; use `:' since this will be removed in the future

make: *** [select_makefile] Error 1

ERROR: Unable to determine the NVIDIA kernel module filename.

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.
```

```
% cat /var/log/nvidia-installer.log

nvidia-installer log file '/var/log/nvidia-installer.log'

creation time: Tue Jun  1 13:08:53 2004

option status:

  license pre-accepted    : true

  update                  : false

  force update            : false

  expert                  : false

  uninstall               : false

  driver info             : false

  no precompiled interface: false

  no ncurses color        : false

  query latest driver ver : false

  OpenGL header files     : false

  no questions            : true

  silent                  : true

  XFree86 install prefix  : /usr/X11R6

  OpenGL install prefix   : /usr

  Installer install prefix: /usr

  kernel source path      : (not specified)

  kernel install path     : (not specified)

  proc mount point        : /proc

  ui                      : none

  tmpdir                  : /tmp

  ftp site                : ftp://download.nvidia.com

Using built-in stream user interface

-> License accepted by command line option.

-> There appears to already be a driver installed on your system (version: 1.0-

   5341).  As part of installing this driver (version: 1.0-5341), the existing 

   driver will be uninstalled.  Are you sure you want to continue? ('no' will a

   bort installation) (Answer: Yes)

-> No precompiled kernel interface was found to match your kernel; would you li

   ke the installer to attempt to download a kernel interface for your kernel f

   rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)

-> No matching precompiled kernel interface was found on the NVIDIA ftp site;

   this means that the installer will need to compile a kernel interface for

   your kernel.

-> Kernel source path: '/usr/src/linux'

-> Performing cc_version_check with CC="gcc".

ERROR: Unable to determine the NVIDIA kernel module filename.

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.
```

Next I reboot into 2.6.6-rc1. The nvidia module is auto probed this time too. When the system comes up I try

```
% startx

hostname: Unknown host

Release Date: 18 December 2003

X Protocol Version 11, Revision 0, Release 6.7

Build Operating System: Linux 2.6.5-gentoo-r1 i686 [ELF] 

Current Operating System: Linux cN*2 2.6.6-rc1 #2 SMP Tue May 18 10:45:37 PDT 2004 i686

Build Date: 23 April 2004

   Before reporting problems, check http://wiki.X.Org

   to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jun  1 13:13:16 2004

(==) Using config file: "/etc/X11/XF86Config"

Using vt 7

(EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module!

(EE) NVIDIA(0):  *** Aborting ***

(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:

no screens found

Please consult the The X.Org Foundation support 

    at http://wiki.X.Org

 for help. 

Please also check the log file at "/var/log/Xorg.0.log" for additional information.

XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"

      after 0 requests (0 known processed) with 0 events remaining.
```

```
% lsmod

Module                  Size  Used by

nvidia               2079592  0 
```

The only way I know how to get nvidia-kernel working with x11 is to manually run the installer from Nvidia.com.

```
% sh /usr/portage/distfiles/NVIDIA-Linux-x86-1.0-5341-pkg1.run -a -s

Verifying archive integrity... OK

Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-5341........................................................................................

.........................................................................................

chown: `0.0' syntax is obsolete; use `:' since this will be removed in the future

WARNING: Unable to restore symbolic link /usr/X11R6/lib/libGL.so.1 ->

         libMesaGL.so (File exists).
```

But keep in mind I still have these emerged

```
%qpkg -I -v nvidia

nvidia-kernel-1.0.5336-r3

nvidia-glx-1.0.5336-r2
```

And x11 starts just fine. The only problem is I have to do this every time I restart my computer (which happens a lot now, because as far as I can tell the nvidia driver locks up my system sporadically).

When I restart the system in 2.6.6-rc1 this is the error message

```
% startx

hostname: Unknown host

Release Date: 18 December 2003

X Protocol Version 11, Revision 0, Release 6.7

Build Operating System: Linux 2.6.5-gentoo-r1 i686 [ELF] 

Current Operating System: Linux cN*2 2.6.6-rc1 #2 SMP Tue May 18 10:45:37 PDT 2004 i686

Build Date: 23 April 2004

   Before reporting problems, check http://wiki.X.Org

   to make sure that you have the latest version.

Module Loader present

Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jun  1 17:58:51 2004

(==) Using config file: "/etc/X11/XF86Config"

Using vt 7

dlopen: /usr/lib/opengl/nvidia/lib/libGLcore.so.1: undefined symbol: _nv000024gl

(EE) Failed to load /usr/X11R6/lib/modules/extensions/libglx.so

(EE) Failed to load module "glx" (loader failed, 7)

(EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module!

(EE) NVIDIA(0):  *** Aborting ***

(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:

no screens found

Please consult the The X.Org Foundation support 

    at http://wiki.X.Org

 for help. 

Please also check the log file at "/var/log/Xorg.0.log" for additional information.

XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"

      after 0 requests (0 known processed) with 0 events remaining.
```

I think I will try love-sources later and see if that helps anything. I also need to experiment with 2.6.6-rc1 kernel settings (ie. some people get nvidia to work without fb).

----------

## ikaro

I got a good working solution...

emerge -C nvidia-kernel nvidia-glx

then edit the xorg.conf and change:

"nvidia" to  "nv"

now you can startx  :Smile: 

----------

## Aurisor

 *ikaro wrote:*   

> I got a good working solution...
> 
> emerge -C nvidia-kernel nvidia-glx
> 
> then edit the xorg.conf and change:
> ...

 

Just in case you couldn't tell, he's being a wiseass.   :Smile: 

----------

## Cintra

 *ikaro wrote:*   

> I got a good working solution...
> 
> emerge -C nvidia-kernel nvidia-glx
> 
> then edit the xorg.conf and change:
> ...

 

Been there..  :Wink: 

mvh

----------

## ikaro

 *ishan wrote:*   

>  *ikaro wrote:*   I got a good working solution...
> 
> emerge -C nvidia-kernel nvidia-glx
> 
> then edit the xorg.conf and change:
> ...

 

It is known that the nvidia drivers are not working properlly with the kernels 2.6.x

Im not using the nvidia drivers, and not going to waste more time trying to, until nvidia releases decent drivers.

You can take my advice and so the same, or not   :Rolling Eyes: 

Whatever you might chose to do, peace! and good luck.

----------

## Drooling Iguana

They work fine with 2.6.4, but not on anything above that.

----------

## MaDxRaY

 *Drooling Iguana wrote:*   

> They work fine with 2.6.4, but not on anything above that.

 

I wouldn't say it this way...gentoo-dev-sources (2.6.5-r3) and nvidia/nvidia-glx(newest, 1.0.5336-r3/r2) are working fine here.

@co je Jidda Sha Ti'l:

Your problem sound's like missing module...are you shure it's up(lsmod)?

In my eyes it could also work with kernel 2.6.6 and above, cause mainly libs, headers and some links where changed, and their path should be the same...what about mesa, does it stuck with new kernel?

----------

## IvanHoe

Do you have CONFIG_REGPARMS or CONFIG_4KSTACKS enabled? If you do then disable them and rebuild your kerrnel. If you don't see those options then check arch/i386/Kconfig in your linux source folder for "config REGPARMS" or "config 4KSTACKS". You'll see something like this

```
config REGPARMS

    def_bool=y
```

Just set it to "n".

----------

## njlg

I am using nv right now. Wow! I never really used this driver longer than a few moments. Everything is all jerky. This is great! =]

I am not surprised by nvidia flat out not working with 2.6.6-rc1. Though I am midly surprised that it does work, but I just have to install it every time I reboot. And even more so that I cannot get nvidia working with 2.6.5, even though I had it working perfectly (sort of) before.

I believe the only difference between the first time I had nvidia working with 2.6.5 and now, is that I emerged the arch modutils and module-init-tools.

Thanks for everyones responces. I guess I will just have to play around with backing things off of arch and see if that helps.

----------

## Deathwing00

Moved from Desktop Environments.

Check bug: https://bugs.gentoo.org/show_bug.cgi?id=47692

----------

## teutzz

try the latest driver available in arch="~x86"

i've been using it without any problem in conjuction with 2.6.6-love4   :Very Happy: 

----------

## njlg

Deathwing00, 

Thanks for moving to the correct location (wherever that may be); but the bug is not related to my problem.

teutzz (and all),

I have tried this with 1.0.5??? to 1.0.5341-r1 with no luck. Also, I just tried 2.6.7-rc2-love2 with no luck either.

----------

## teutzz

are you using 4k stack in your kernel config? because nvidia don't cope with that

----------

## danone

pure question do you use udev? are sysfstools,hotplug ..i ran 2 time in this problem and made everything new until I checked /dev for nvidia0 & nvidiactl..hehe solution was NVmakedevices..but this is for udev..

----------

## njlg

danon: I call NVmakedevices on startup.

teutzz: this is not related to 4k stack problem, because the module loads and worksine (after I install it). =]

----------

## John5788

 *m@dxray wrote:*   

>  *Drooling Iguana wrote:*   They work fine with 2.6.4, but not on anything above that. 
> 
> I wouldn't say it this way...gentoo-dev-sources (2.6.5-r3) and nvidia/nvidia-glx(newest, 1.0.5336-r3/r2) are working fine here.
> 
> @co je Jidda Sha Ti'l:
> ...

 

same here

----------

## teutzz

man, there must be something really wrong with your box; I never had any problems with nvidia drivers not in conjunction with 2.4 or 2.6 kernels

One thing comes to my mind (stupid question by the way, so please don't flame me for asking it): are you sure you are propelly installing your newly configured kernel?

(had to ask it   :Cool:  )

----------

## Bonkie

 *danone wrote:*   

> pure question do you use udev? are sysfstools,hotplug ..i ran 2 time in this problem and made everything new until I checked /dev for nvidia0 & nvidiactl..hehe solution was NVmakedevices..but this is for udev..

 

Well you did solve my issues  :Smile: 

Gonna try 2.6.7 now that 2.6.4 works  :Very Happy: 

----------

## dan2003

Bah, i just ran into this too.. silly thing is my box has been fine.

I booted and logged in fine.. I was trying to build summin in kdevelop 3.0.1 and ran into some weird build issue with things that were on an nfs mount.

I started an update of kdevelop but didn't pay attention to what else it was updating apart from noticed kdelibs 3.2.2 was becoming 3.2.2-r1 there were 8 things to do in total, but i cancelled it (ctrl+c) on the seventh cos i wanted to umount my nfs mount and something was keeping it busy within kde so i wanted to log out and back in. I logged out and went to log back in but X wouldnt start (i use qingy 0.4 by the way).

After much poking around i noticed that nvidia0 and nvidiactl are not in /dev anymore. I added them manaully but i stilll cant get X to start I have remerged baselayout, devfsd, nvidia-kernel, nvidia-glx and now emerged xorg instead and remerged nvidia again but i still cant get X back..  :Sad: .

So i'm stumped at the mo.

[Edit} By the way im using kernel 2.6.4-ck2

----------

## njlg

 *danone wrote:*   

> pure question do you use udev? are sysfstools,hotplug ..i ran 2 time in this problem and made everything new until I checked /dev for nvidia0 & nvidiactl..hehe solution was NVmakedevices..but this is for udev..

 

Damnit! You were right. I did have NVmakedevices.sh on startup, but I guess I forgot to save my local.start when I upgraded. I feel so stupid right now.

So this total fixed my problem with all of the kernels I have and a new one =]

```
Linux cN*2 2.6.7-rc2-love2 #1 SMP Thu Jun 3 12:31:34 PDT 2004 i686 AMD Athlon(tm) XP 2400+ AuthenticAMD GNU/Linux
```

Thanks for everyone's help and opinions!

----------

## thechris

ok, firstly i'm trying to fix sound without losing video.  alsa sucks with aureal cards.  i'm hoping that by ugrading to 2.6.7 sources that i'll fix the sound.

but nvidia won't work.

4k stacks and reg-arguments aren't in the kernel.  8k stacks.

i've modified /etc/conf.d/local.start to have mknod for nvidia0-7 and ctl

re-emerged the 5336 kernel driver and glx packages

tried the patch script that fixed "invalid module format" in the past

tried modprobe nvidia

what log gives detailed specs.  pretty much it just says failed to load nvidia -- no screens with valid conf found.

this is from the log listed in the errror.

tried the NVmakedevices.sh script as well.

so far nothing has worked.  and i don't get a detailed error message.

----------

## the_sphynx

Hey All,

I just wanted to let you know that the 2.6.7 Kernel came out today as a stable release according to Kernel.org.  I downloaded it and complied and I am getting the "invalid module format" error as well after makeing sure that /usr/src/linux is pointing to linux-2.6.7.  I hope that NVidia gets off their buts and gets a driver to work for anything higher than my 2.6.5 kernel (that is as high up as I can go).

----------

## HydroSan

 *the_sphynx wrote:*   

> Hey All,
> 
> I just wanted to let you know that the 2.6.7 Kernel came out today as a stable release according to Kernel.org.  I downloaded it and complied and I am getting the "invalid module format" error as well after makeing sure that /usr/src/linux is pointing to linux-2.6.7.  I hope that NVidia gets off their buts and gets a driver to work for anything higher than my 2.6.5 kernel (that is as high up as I can go).

 

I got nVidia working with 2.6.7-rc3. I don't think there would be THAT much of a difference between 2.6.6 and 2.6.7.

----------

## the_sphynx

 *Quote:*   

> the_sphynx wrote:	
> 
> Hey All, 
> 
> I just wanted to let you know that the 2.6.7 Kernel came out today as a stable release according to Kernel.org. I downloaded it and complied and I am getting the "invalid module format" error as well after makeing sure that /usr/src/linux is pointing to linux-2.6.7. I hope that NVidia gets off their buts and gets a driver to work for anything higher than my 2.6.5 kernel (that is as high up as I can go).	
> ...

 

What card are you using?  I am using a GForce2 Ti with 32M/RAM and I can't get anything but the 2.6.5 Kernel to work.  Did you compile something different in the 2.6.7-rc3 kernel than the previous version?[/quote]

----------

## HydroSan

 *Quote:*   

>  *HydroSan wrote:*    *Quote:*   
> 
> Hey All, 
> 
> I just wanted to let you know that the 2.6.7 Kernel came out today as a stable release according to Kernel.org. I downloaded it and complied and I am getting the "invalid module format" error as well after makeing sure that /usr/src/linux is pointing to linux-2.6.7. I hope that NVidia gets off their buts and gets a driver to work for anything higher than my 2.6.5 kernel (that is as high up as I can go). 
> ...

 

GeForceFX 5600 256MB. Works like a charm with 8k stacks.

----------

## javac16

I had this problem this morning as well.  This post really helped me out.  Adding /sbin/NVmakedevices.sh to my local.start fixed my x start up problems.  Thanks   :Very Happy: 

----------

## mr.twemlow

I'm also getting the invalid module format error on a 2.6.5-r1 kernel.  However, if you just force the modprobe then it all works fine.  Unfortunately, it does make it so the module can't be loaded on boot...

But hey, it works!

----------

## javac16

Just upgraded to the 2.6.7 kernel and I can't load nvidia anymore.

I am getting the invalid module format error

```

FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo/video/nvidia.ko): Invalid module format

```

 :Question:  This may be a dumb questions but what does it mean "it worked like a charm with 8k stacks"?  Where do I set this?

I am able to load it in 2.6.5...

----------

## NiK[IT]

 *Quote:*   

> This may be a dumb questions but what does it mean "it worked like a charm with 8k stacks"? Where do I set this? 

 

Processor type and features  --->  [ ] Use register arguments (EXPERIMENTAL)

Kernel hacking  ---> [ ] Use 4Kb for kernel stacks instead of 8Kb 

They must be unflagged.

----------

## javac16

 :Crying or Very sad:   Hmm...I do have those unchecked for the 2.6.7 kernel.

----------

## NiK[IT]

Have you recompiled nvidia-kernel and nvidia-glx for the new kernel?

Remember to make && make modules_install after emerging...

Also change from "nvidia" to "nv" in XF86Config file.

Mine works (even glx and even faster than in 2.6.5) as I emerged nvidia-kernel and nvidia-glx with this option:

```
 ACCEPT_KEYWORDS="~x86" emerge nvidia-kernel nvidia-glx
```

Try this.

----------

## javac16

I was running the stable version of nvidia-kernel and nvidia-glx...when I emerged the ~ version and changed the XF86Config file as you mentioned it worked.

Thanks.

I'll add them to my package.keywords fileLast edited by javac16 on Sat Jun 19, 2004 8:05 pm; edited 1 time in total

----------

## NiK[IT]

 :Laughing:   :Laughing:   :Laughing: 

----------

## demitrix

changing nvidia to nv in ur X config defeats the whole purpose nv drivers are unaccelerated.

----------

## javac16

I realized this when glx stopped working.  I switched back to nvidia and everything is still working.  Guess I just needed the latest drivers with the 2.6.7 kernel.

Thanks!

----------

## NiK[IT]

True...   :Embarassed:   :Embarassed:   :Embarassed:   :Embarassed: 

I had to try that before arriving to a solution and accidentaly wrote tin my explanations...

 :Embarassed:   :Embarassed:   :Embarassed: 

----------

## theDreamer

after reading this thread i'm not sure what is the solution:

i have 2.6.7-r3 kernel with the latest stable (not ~ branch) of nvidia-kernel and nvidia-glx.

i reemerged nvidia packages after i emerged, booted & changed the symbolic link to the new kernel.

and now when i modprobe/insmod nvidia driver i get:

"error inserting "nvidia.ko": -1 invalid module format"

(which cause X not to find nvidia device)

any solution?

----------

## mariourk

Same here   :Sad: 

I tried to search on the forum and found this thread: 

https://forums.gentoo.org/viewtopic.php?t=187281&highlight=2+6+7+nvidia

It didn't work for me though. A solution would be nice   :Rolling Eyes: 

----------

## pvincent

This thread has already provided the solution.

Just emerge nvidia-kernel and nvidia-glx with the latest release 1.05336

As portage 2.0.5 claims, people should edit and append unstable packages into /etc/portage/package.keywords

 *Quote:*   

> nvidia-kernel
> 
> nvidia-glx

 

Then emerge these 2 packages as usual, portage will use the latest ones.

```
emerge nvidia-kernel nvidia-glx
```

It did work for me with kernel gentoo-dev-sources-2.6.7

----------

## yyop

 *pvincent wrote:*   

> It did work for me with kernel gentoo-dev-sources-2.6.7

 

It didn't work for me:

gentoo-dev-sources-2.6.7-r5

nvidia-kernel-1.0.5336-r4

Invalid module format....

----------

## theDreamer

for me it worked...

(though there's another problem with dual cpu - but that's something else).

try compiling by hand - maybe the ebuild compilation has a problem..

download directly from nvidia and follow the instructions.

----------

## yyop

 *theDreamer wrote:*   

> for me it worked...
> 
> (though there's another problem with dual cpu - but that's something else).

 

Umh, I have SMP activated. I was trying hyperthreading.

I'll try without it...

Thanks!

----------

## kelargo

http://www.nvidia.com/object/linux_display_ia32_1.0-6106.html

 :Very Happy: 

----------

