# Installed new kernel version and ckpatches, nvidia problems!

## DeZZa

I installed a new kernel version first 2.6.7 ck-sources, and now my nvidia module won't load!

If i use modprobe

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

And if i set it in autoload it just says something like "Failed to load nvidia" when i boot up ..

I tried with newest masked ebuild and the current 1.0.4496-r3 and the glx current 1.0.4496 ..

I also remembered to run 'opengl-update nvidia' after that.

I've tried to re-emerge it several times without luck, and i have the

[*] Enable loadable module support

kernel option too!

Pretty weird if you ask me, worked with all my previous kernel-versions  :Crying or Very sad:  ..

Thanks in advance!  :Razz:  ..

----------

## b0fh_

that driver will not work with kernel 2.6, you need to:

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

Only the latest unstable works with 2.6.x kernels. Why it is still masked is beyond me.

peace.

----------

## DeZZa

 *b0fh_ wrote:*   

> Only the latest unstable works with 2.6.x kernels. Why it is still masked is beyond me.
> 
> peace.

 

Ahaa, now i remember  :Smile:  ..

Will try it out.

Wonders me too, why it is still masked.

----------

## frozenJim

I have also just upgraded to 2.6.7 from 2.4.25.

I emerged the -kernel and -glx with the ACCEPT_KEYWORDS and ran opengl_update nvidia.

However when I startx, I get

NV: could not open control device /dev/nvidiactl (No such file or directory)

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

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

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

Since I'm new to Linux, I don't know exactly why the /dev/nvidiactl directory would be missing.

I HAVE enabled NVIDIA in the kernel.

----------

## b0fh_

you need to load the nvidia kernel module first 

```
modprobe nvidia
```

you can put "nvidia" in /etc/modules.autoload.d/kernel-<yourkernel> to automagically do it at boot time

peace

----------

## frozenJim

# modprobe nvidia

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

Any idea what this error means?

----------

## frozenJim

Hey!  I just noticed that after making the changes, I now have exactly the same problem that started this thread.

I'm feeling kinda stuck.  I believe this must be something really simple that I've overlooked.

----------

## b0fh_

re-read the second post... you need to emerge the "unstable" nvidia driver for kernel 2.6.x... the stable one gives this crappy invalid format error.

peace

----------

## frozenJim

Well now this is starting to be a "who's on first" kind of thing  :Wink: 

I had emerged the nvidia drivers as instructed.  For clarity, here is the line I used to do so:

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

To be sure, I just did so again just now.

Here is the error I get when I modprobe nvidia:

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

If I ignore this error and set my video to Display = "nvidia"  I get the following error when I startx:

NV: could not open control device /dev/nvidiactl (No such file or directory)

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

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

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

And so I am back to using Display = "nv" which works... but that's not what I'm after.  I would like to make it work right.

So what else am I missing here?  Why is it looking for nvidia.ko at all if it is compiled into the kernel?  Is there perhaps a third file to be emerged?  

I'm stuck.

----------

## Duck-Billed Platypus

Try this

```
sh NVIDIA-Linux-x86-1.0-5336-pkg1.run --kernel-name='KERNEL_NAME'
```

where 'KERNEL_NAME' is the output of

```
uname -r
```

From the README

----------

## frozenJim

So you think the problem is with the Portage installation rather than with the driver itself?

While I ponder this, let me fill you in on what has happened here.

I realized that my errors indicated the wrong nvidia version so I tried this to verify my versions:

```
ACCEPT_KEYWORDS = "~x86" emerge -s nvidia
```

Well holy smoke, here's what I found:

nvidia-glx 

   CURRENT: 1.0.5336-r2

   INSTALLED: 1.0.4496

nvidia-kernel

   CURRENT: 1.0.5336-r4

   INSTALLED: 1.0.4496-r3

So now I'm confused.  I KNOW that I used this line to update on two separate days:

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

I don't know enough to say if the syntax is correct or not, but I tried doing it in two steps and was rewarded with the NEW versions (finally!!)

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

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

Should this have made any difference?

Anyhow, I changed the line in /etc/X11/XF86Config:

```
#Driver "nv"

Driver "nvidia"
```

and tried startx.

Well, we're getting SOMEWHERE because now I just got a black screen.  Rebooted and got the same black screen.

Back into /etc/X11/XF86Config: 

```
Driver "nv"

#Driver "nvidia"
```

And all is well again.

Does this give you any hints?

----------

## frozenJim

AHA!

I just found this on another thread:

 *Quote:*   

> If anybody cares i was able to solve the problem.
> 
> It was caused by the ehci_hcd module that was loaded on boot.
> 
> Although i don't have any usb 2.0 compliant devices the kernel loaded the module and after not finding any devices the logfile showed the following:
> ...

 

So I'm off to recompile my kernel.  I will follow up with my results in about a half hour.

(fingers crossed)

----------

## Duck-Billed Platypus

 *frozenJim wrote:*   

> Should this have made any difference?

 

I don't know much about bash, but AFAIK yes.

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

tells Gentoo to do this

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

emerge nvidia-glx
```

nvidia-kernel is a dependency of nvidia-glx, so doing the second one would have made portage try and get the stable (non ~x86) version of nvidia-kernel before emerging nvidia-glx. Do I make sense?

As for the black screen, at the moment the only thing that comes to mind is to ask you for you /etc/X11/XF86Config file..

----------

## JinxterX

The 55.36 drivers work but are rubbish, read this thread: https://forums.gentoo.org/viewtopic.php?t=187632

----------

## frozenJim

OK, rebooted with new kernel, but no difference.  I'm ok with Display "nv" for now.

So here are some stats for ya!

My dmesg:

```

Linux version 2.6.7-gentoo-r4 (root@thorn) (gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)) #9 SMP Fri Jun 25 16:11:57 EDT 2004

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 0000000000097c00 (usable)

 BIOS-e820: 0000000000097c00 - 0000000000098000 (reserved)

 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001ffc0000 (usable)

 BIOS-e820: 000000001ffc0000 - 000000001fff8000 (ACPI data)

 BIOS-e820: 000000001fff8000 - 0000000020000000 (ACPI NVS)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)

 BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)

511MB LOWMEM available.

On node 0 totalpages: 131008

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 126912 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 AMI                                       ) @ 0x000ff980

ACPI: RSDT (v001 D850MV MV85010A 0x20020724 MSFT 0x00001011) @ 0x1fff0000

ACPI: FADT (v001 D850MV MV85010A 0x20020724 MSFT 0x00001011) @ 0x1fff1000

ACPI: DSDT (v001 D850MV MV85010A 0x00000006 MSFT 0x0100000b) @ 0x00000000

Built 1 zonelists

Kernel command line: root=/dev/hdb3 vga=795

Found and enabled local APIC!

Initializing CPU#0

CPU 0 irqstacks, hard=c04d9000 soft=c04b9000

PID hash table entries: 2048 (order 11: 16384 bytes)

Detected 1795.145 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Memory: 513740k/524032k available (2483k kernel code, 9496k reserved, 1057k data, 256k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 3538.94 BogoMIPS

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU:     After generic identify, caps: 3febfbff 00000000 00000000 00000000

CPU:     After vendor identify, caps: 3febfbff 00000000 00000000 00000000

CPU: Trace cache: 12K uops, L1 D cache: 8K

CPU: L2 cache: 256K

CPU: Hyper-Threading is disabled

CPU:     After all inits, caps: 3febfbff 00000000 00000000 00000080

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU0: Intel P4/Xeon Extended MCE MSRs (12) available

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

CPU0: Intel(R) Pentium(R) 4 CPU 1.80GHz stepping 02

per-CPU timeslice cutoff: 731.45 usecs.

task migration cache decay timeout: 1 msecs.

SMP motherboard not detected.

enabled ExtINT on CPU#0

ESR value before enabling vector: 00000000

ESR value after enabling vector: 00000000

Using local APIC timer interrupts.

calibrating APIC timer ...

..... CPU clock speed is 1794.0289 MHz.

..... host bus clock speed is 99.0682 MHz.

Brought up 1 CPUs

CPU0:  online

 domain 0: span 00000001

  groups: 00000001

NET: Registered protocol family 16

EISA bus registered

PCI: PCI BIOS revision 2.10 entry at 0xfda95, last bus=2

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20040326

ACPI: IRQ9 SCI: Level Trigger.

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

PCI: Transparent bridge - 0000:00:1e.0

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]

ACPI: Power Resource [FDDP] (off)

ACPI: Power Resource [URP1] (off)

ACPI: Power Resource [URP2] (off)

ACPI: Power Resource [LPTP] (off)

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 9 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 *9 10 11 12 14 15)

Linux Plug and Play Support v0.97 (c) Adam Belay

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 5

ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10

ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 9

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

ACPI: PCI Interrupt Link [LNKF] enabled at IRQ 11

PCI: Using ACPI for IRQ routing

apm: BIOS version 1.2 Flags 0x0b (Driver version 1.16ac)

apm: overridden by ACPI.

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

NTFS driver 2.1.14 [Flags: R/W].

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

mice: PS/2 mouse device common for all mice

serio: i8042 AUX port at 0x60,0x64 irq 12

input: ImExPS/2 Logitech Explorer Mouse on isa0060/serio1

serio: i8042 KBD port at 0x60,0x64 irq 1

input: AT Translated Set 2 keyboard on isa0060/serio0

lp: driver loaded but no devices found

Linux agpgart interface v0.100 (c) Dave Jones

parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]

lp0: using parport0 (polling).

Using anticipatory io scheduler

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

Linux Tulip driver version 1.1.13 (May 11, 2002)

tulip0:  MII transceiver #1 config 1000 status 786d advertising 05e1.

eth0: ADMtek Comet rev 17 at 0xd800, 00:04:E2:1F:A8:75, IRQ 9.

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ICH2: IDE controller at PCI slot 0000:00:1f.1

ICH2: chipset revision 4

ICH2: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA

hda: Maxtor 6Y120P0, ATA DISK drive

hdb: MAXTOR 6L040J2, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

hdc: YAMAHA CRW3200E, ATAPI CD/DVD-ROM drive

hdd: TOSHIBA DVD-ROM SD-M1212, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

hda: max request size: 128KiB

hda: 240121728 sectors (122942 MB) w/7936KiB Cache, CHS=65535/16/63, UDMA(100)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 >

hdb: max request size: 128KiB

hdb: 78177792 sectors (40027 MB) w/1819KiB Cache, CHS=65535/16/63, UDMA(100)

 /dev/ide/host0/bus0/target1/lun0: p1 p2 p3

hdc: ATAPI 40X CD-ROM CD-R/RW CD-MRW drive, 8192kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 32X DVD-ROM drive, 256kB Cache, UDMA(33)

Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004 UTC).

ALSA device list:

  #0: Sound Blaster Audigy (rev.3) at 0xdf80, irq 10

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 32768)

NET: Registered protocol family 1

NET: Registered protocol family 17

ACPI: (supports S0 S1 S4 S5)

EXT3-fs: INFO: recovery required on readonly filesystem.

EXT3-fs: write access will be enabled during recovery.

(fs/jbd/recovery.c, 255): journal_recover: JBD: recovery, exit status 0, recovered transactions 42535 to 42565

(fs/jbd/recovery.c, 257): journal_recover: JBD: Replayed 214 and revoked 5/6 blocks

kjournald starting.  Commit interval 5 seconds

EXT3-fs: recovery complete.

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 256k freed

Adding 500464k swap on /dev/hdb2.  Priority:-1 extents:1

EXT3 FS on hdb3, internal journal

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

```

lspci:

```

0000:00:00.0 Host bridge: Intel Corp. 82850 850 (Tehama) Chipset Host Bridge (MCH) (rev 04)

0000:00:01.0 PCI bridge: Intel Corp. 82850 850 (Tehama) Chipset AGP Bridge (rev 04)

0000:00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB/ER Hub interface to PCI Bridge (rev 04)

0000:00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 04)

0000:00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 04)

0000:00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 04)

0000:00:1f.3 SMBus: Intel Corp. 82801BA/BAM SMBus (rev 04)

0000:00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 04)

0000:01:00.0 VGA compatible controller: nVidia Corporation NV25 [GeForce4 Ti 4200] (rev a3)

0000:02:0b.0 Ethernet controller: Accton Technology Corporation EN-1216 Ethernet Adapter (rev 11)

0000:02:0c.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)

0000:02:0c.1 Input device controller: Creative Labs SB Audigy MIDI/Game port (rev 03)

0000:02:0c.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port

0000:02:0d.0 Communication controller: ESS Technology ES2838/2839 SuperLink Modem (rev 01)

```

lsmod:

```

Module                  Size  Used by

```

and my XF86Config

```

# File generated by xf86config.

#

# Copyright (c) 1999 by The XFree86 Project, Inc.

#

# Permission is hereby granted, free of charge, to any person obtaining a

# copy of this software and associated documentation files (the "Software"),

# to deal in the Software without restriction, including without limitation

# the rights to use, copy, modify, merge, publish, distribute, sublicense,

# and/or sell copies of the Software, and to permit persons to whom the

# Software is furnished to do so, subject to the following conditions:

# 

# The above copyright notice and this permission notice shall be included in

# all copies or substantial portions of the Software.

# 

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL

# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF

# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

# SOFTWARE.

# 

# Except as contained in this notice, the name of the XFree86 Project shall

# not be used in advertising or otherwise to promote the sale, use or other

# dealings in this Software without prior written authorization from the

# XFree86 Project.

#

# **********************************************************************

# Refer to the XF86Config(4/5) man page for details about the format of 

# this file.

# **********************************************************************

# **********************************************************************

# Module section -- this  section  is used to specify

# which dynamically loadable modules to load.

# **********************************************************************

#

Section "Module"

# This loads the DBE extension module.

    Load        "dbe"     # Double buffer extension

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

    SubSection  "extmod"

      Option    "omit xfree86-dga"   # don't initialise the DGA extension

    EndSubSection

# This loads the Type1 and FreeType font modules

    Load        "type1"

    Load        "speedo"

#    Load        "freetype"

#    Load        "xtt"

# This loads the GLX module

    Load       "glx"

# This loads the DRI module

#    Load       "dri"

EndSection

# **********************************************************************

# Files section.  This allows default font and rgb paths to be set

# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the

# file minus the extension (like ".txt" or ".db").  There is normally

# no need to change the default.

    RgbPath   "/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),

# as well as specifying multiple comma-separated entries in one FontPath

# command (or a combination of both methods)

# 

# If you don't have a floating point coprocessor and emacs, Mosaic or other

# programs take long to start up, try moving the Type1 and Speedo directory

# to the end of this list (or comment them out).

# 

    FontPath   "/usr/X11R6/lib/X11/fonts/local/"

    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"

    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"

    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"

    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"

    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"

#    FontPath   "/usr/X11R6/lib/X11/fonts/TrueType/"

#    FontPath   "/usr/X11R6/lib/X11/fonts/freefont/"

    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"

    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"

# The module search path.  The default path is shown here.

#    ModulePath "/usr/X11R6/lib/modules"

EndSection

# **********************************************************************

# Server flags section.

# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is 

# received.  This may leave the console in an unusable state, but may

# provide a better stack trace in the core dump to aid in debugging

#    Option "NoTrapSignals"

# Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence

# (where n is 1 through 12).  This allows clients to receive these key

# events.

#    Option "DontVTSwitch"

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence

# This allows clients to receive this key event.

#    Option "DontZap"

# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching

# sequences.  This allows clients to receive these key events.

#    Option "Dont Zoom"

# Uncomment this to disable tuning with the xvidtune client. With

# it the client can still run and fetch card and monitor attributes,

# but it will not be allowed to change them. If it tries it will

# receive a protocol error.

#    Option "DisableVidModeExtension"

# Uncomment this to enable the use of a non-local xvidtune client. 

#    Option "AllowNonLocalXvidtune"

# Uncomment this to disable dynamically modifying the input device

# (mouse and keyboard) settings. 

#    Option "DisableModInDev"

# Uncomment this to enable the use of a non-local client to

# change the keyboard or mouse settings (currently only xset).

#    Option "AllowNonLocalModInDev"

EndSection

# **********************************************************************

# Input devices

# **********************************************************************

# **********************************************************************

# Core keyboard's InputDevice section

# **********************************************************************

Section "InputDevice"

    Identifier   "Keyboard1"

    Driver   "Keyboard"

# For most OSs the protocol can be omitted (it defaults to "Standard").

# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),

# uncomment the following line.

#    Option     "Protocol"      "Xqueue"

    Option "AutoRepeat" "500 30"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))

#    Option   "Xleds"      "1 2 3"

#    Option "LeftAlt"     "Meta"

#    Option "RightAlt"    "ModeShift"

# To customise the XKB settings to suit your keyboard, modify the

# lines below (which are the defaults).  For example, for a non-U.S.

# keyboard, you will probably want to use:

#    Option "XkbModel"    "pc102"

# If you have a US Microsoft Natural keyboard, you can use:

#    Option "XkbModel"    "microsoft"

#

# Then to change the language, change the Layout setting.

# For example, a german layout can be obtained with:

#    Option "XkbLayout"   "de"

# or:

#    Option "XkbLayout"   "de"

#    Option "XkbVariant"  "nodeadkeys"

#

# If you'd like to switch the positions of your capslock and

# control keys, use:

#    Option "XkbOptions"  "ctrl:swapcaps"

# These are the default XKB settings for XFree86

#    Option "XkbRules"    "xfree86"

#    Option "XkbModel"    "pc101"

#    Option "XkbLayout"   "us"

#    Option "XkbVariant"  ""

#    Option "XkbOptions"  ""

#    Option "XkbDisable"

    Option "XkbRules"   "xfree86"

    Option "XkbModel"   "pc104"

    Option "XkbLayout"   "us"

    Option "XkbOptions"   "ctrl:ctrl_aa,caps:shift_nocancel"

EndSection

# **********************************************************************

# Core Pointer's InputDevice section

# **********************************************************************

Section "InputDevice"

# Identifier and driver

    Identifier  "Mouse1" 

     Driver      "mouse" 

    Option "Protocol"    "Auto" 

    #Option "Device"      "/dev/input/mice"  does not exist on my pc.

    Option "Device"   "/dev/mouse"

    Option "ZAxisMapping" "4 5"

    #Identifier   "Mouse1"

    #Driver   "mouse"

    #Option "Protocol"    "IMPS/2"

    #Option "Device"      "/dev/mouse"

# Mouse-speed setting for PS/2 mouse.

#    Option "Resolution"   "256"

# When using XQUEUE, comment out the above two lines, and uncomment

# the following line.

#    Option "Protocol"   "Xqueue"

# Baudrate and SampleRate are only for some Logitech mice. In

# almost every case these lines should be omitted.

#    Option "BaudRate"   "9600"

#    Option "SampleRate"   "150"

# Emulate3Buttons is an option for 2-button Microsoft mice

# Emulate3Timeout is the timeout in milliseconds (default is 50ms)

#    Option "Emulate3Buttons"

#    Option "Emulate3Timeout"    "50"

# ChordMiddle is an option for some 3-button Logitech mice

#    Option "ChordMiddle"

EndSection

# **********************************************************************

# Other input device sections 

# this is optional and is required only if you

# are using extended input devices.  This is for example only.  Refer

# to the XF86Config man page for a description of the options.

# **********************************************************************

#

# Section "InputDevice" 

#    Identifier  "Mouse2"

#    Driver      "mouse"

#    Option      "Protocol"      "MouseMan"

#    Option      "Device"        "/dev/mouse2"

# EndSection

#

# Section "InputDevice"

#    Identifier "spaceball"

#    Driver     "magellan"

#    Option     "Device"        "/dev/cua0"

# EndSection

#

# Section "InputDevice"

#    Identifier "spaceball2"

#    Driver     "spaceorb"

#    Option     "Device"        "/dev/cua0"

# EndSection

#

# Section "InputDevice"

#    Identifier "touchscreen0"

#    Driver     "microtouch"

#    Option     "Device"        "/dev/ttyS0"

#    Option     "MinX"          "1412"

#    Option     "MaxX"          "15184"

#    Option     "MinY"          "15372"

#    Option     "MaxY"          "1230"

#    Option     "ScreenNumber"  "0"

#    Option     "ReportingMode" "Scaled"

#    Option     "ButtonNumber"  "1"

#    Option     "SendCoreEvents"

# EndSection

#

# Section "InputDevice"

#    Identifier "touchscreen1"

#    Driver     "elo2300"

#    Option     "Device"        "/dev/ttyS0"

#    Option     "MinX"          "231"

#    Option     "MaxX"          "3868"

#    Option     "MinY"          "3858"

#    Option     "MaxY"          "272"

#    Option     "ScreenNumber"  "0"

#    Option     "ReportingMode" "Scaled"

#    Option     "ButtonThreshold"       "17"

#    Option     "ButtonNumber"  "1"

#    Option     "SendCoreEvents"

# EndSection

# **********************************************************************

# Monitor section

# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

    Identifier  "SyncMaster 900ift (7X3)"

# HorizSync is in kHz unless units are specified.

# HorizSync may be a comma separated list of discrete values, or a

# comma separated list of ranges of values.

# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S

# USER MANUAL FOR THE CORRECT NUMBERS.

    HorizSync   30 - 96

#    HorizSync  30 - 96       # I got this from the manual for 900ift.

#    HorizSync   30-64         # multisync

#    HorizSync   31.5, 35.2    # multiple fixed sync frequencies

#    HorizSync   15-25, 30-50  # multiple ranges of sync frequencies

# VertRefresh is in Hz unless units are specified.

# VertRefresh may be a comma separated list of discrete values, or a

# comma separated list of ranges of values.

# NOTE: THE VALUES HERE ARE EXAMPLES ONLY.  REFER TO YOUR MONITOR'S

# USER MANUAL FOR THE CORRECT NUMBERS.

#  VertRefresh 50 - 160     #SyncMaster 900ift, from the manual

    VertRefresh 50-160

EndSection

# **********************************************************************

# Graphics device section

# **********************************************************************

# Any number of graphics device sections may be present

# Standard VGA Device:

Section "Device"

    Identifier   "Standard VGA"

    VendorName   "Unknown"

    BoardName   "Unknown"

# The chipset line is optional in most cases.  It can be used to override

# the driver's chipset detection, and should not normally be specified.

#    Chipset   "generic"

# The Driver line must be present.  When using run-time loadable driver

# modules, this line instructs the server to load the specified driver

# module.  Even when not using loadable driver modules, this line

# indicates which driver should interpret the information in this section.

    Driver     "vga"

# The BusID line is used to specify which of possibly multiple devices

# this section is intended for.  When this line isn't present, a device

# section can only match up with the primary video device.  For PCI

# devices a line like the following could be used.  This line should not

# normally be included unless there is more than one video device

# intalled.

#    BusID      "PCI:0:10:0"

#    VideoRam   256

#    Clocks   25.2 28.3

EndSection

# Device configured by xf86config:

Section "Device"

    Identifier  "My ASUS GeForce4"

    Driver "nv"

    #Driver "nvidia"

    #Driver "vga"

    VideoRam    131072

    # Insert Clocks lines here if appropriate

EndSection

# **********************************************************************

# Screen sections

# **********************************************************************

# Any number of screen sections may be present.  Each describes

# the configuration of a single screen.  A single specific screen section

# may be specified from the X server command line with the "-screen"

# option.

Section "Screen"

    Identifier  "Screen 1"

    Device      "My ASUS GeForce4"

    Monitor     "SyncMaster 900ift (7X3)"

    DefaultDepth 24

    DefaultFbBpp 32

    Subsection "Display"

        Depth       8

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

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       16

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

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       24

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

        ViewPort    0 0

    EndSubsection

EndSection

# **********************************************************************

# ServerLayout sections.

# **********************************************************************

# Any number of ServerLayout sections may be present.  Each describes

# the way multiple screens are organised.  A specific ServerLayout

# section may be specified from the X server command line with the

# "-layout" option.  In the absence of this, the first section is used.

# When now ServerLayout section is present, the first Screen section

# is used alone.

Section "ServerLayout"

# The Identifier line must be present

    Identifier  "Simple Layout"

# Each Screen line specifies a Screen section name, and optionally

# the relative position of other screens.  The four names after

# primary screen name are the screens to the top, bottom, left and right

# of the primary screen.  In this example, screen 2 is located to the

# right of screen 1.

    Screen "Screen 1"

# Each InputDevice line specifies an InputDevice section name and

# optionally some options to specify the way the device is to be

# used.  Those options include "CorePointer", "CoreKeyboard" and

# "SendCoreEvents".

    InputDevice "Mouse1" "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"

EndSection

# Section "DRI"

#    Mode 0666

# EndSection

```

I'm really glad for this wonderful opportunity to learn more about Linux   :Twisted Evil:  but perhaps getting a "Linux for Dummies" would be less painful?

Many others have the "BLACK SCREEN" problem with nvidia, but their dmesg always shows where the irq is conflicting with, for example, their usb 2.0.  Mine shows no conflicts that I can see.

Helllllpppp mmmeeeeeeeee.....

----------

## DeZZa

I have downloaded the NVIDIA-Linux-x86-1.0-5336-pkg1.run file, and installed the module, and 'modprobe nvidia' works just after the installation, but if i reboot and makes it autoload it fails .. If i try to do 'modprobe nvidia' again after reboot it gives me this error too:

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

like frozenJim.

What is the problem? I have /usr/src/linux linked to linux-2.6.7-ck1 .. The source i compiled from ..

----------

## frozenJim

Just for fun I removed the following from my Kernel configuration:

Drivers:

   <> /dev/agpgart (AGP Support)

   <> Direct Rendering Manger (XFree86 4.1.0 and higher DRI support)

However this made no difference.

If I enable the "nvidia" in XF86Config then I get one of two problems depending on whether or not I have NVIDIA support enabled in the kernel.  

If it IS enabled, I get a black screen.   

If it is NOT enabled I get the "Failed to initialize the NVIDIA kernel module" error.

Surely someone from nvidia monitors these forums?  There are a LOT of us in this predicament   :Question: 

----------

## Morphix

This page may help you, I successfully have the nvidia 4496 running on the gentoo-dev-sources 2.6.7r5. The first method described worked for me in the 4496 readme.

http://minion.de/nvidia.html

----------

## Duck-Billed Platypus

Have you tried doing

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

without doing

```
emerge nvidia-kernel
```

yet?

What does modprobe nvidia say if you do it now?

----------

## frozenJim

Yes.  I just tried it again for fun.  Nothing changes,  The error is the same.  

Here is the error I get when I modprobe nvidia: 

 *Quote:*   

> FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo-r4/video/nvidia.ko): Invalid module format[ 
> 
>  If I ignore this error and set my video to Display = "nvidia" I get the following error when I startx: 
> 
>  NV: could not open control device /dev/nvidiactl (No such file or directory) 
> ...

 

----------

## Locke355

I had the same problem, did what was suggested in this thread (and others) and am running the 5x nvidia drivers now (also dumped ehci).

Xfree starts fine, and runs fine, but when I close xfree, I loose monitor sync (monitor says it goes into standby). I can hit ctrl-alt-del and get the pc to reboot. Anyone have any ideas on how to fix?

----------

## Nylle

 *frozenJim wrote:*   

> Yes.  I just tried it again for fun.  Nothing changes,  The error is the same.  
> 
> Here is the error I get when I modprobe nvidia: 
> 
>  *Quote:*   FATAL: Error inserting nvidia (/lib/modules/2.6.7-gentoo-r4/video/nvidia.ko): Invalid module format[ 
> ...

 

What is the output of dmesg after you have modprobed nvidia? This should give you some hint of why the kernel refused to load the module.

----------

## trevinator

I had the same problem with my nvidia drivers.

I used the modules-update command after I emerged both the nvidia-kernel and nvidia-glx

did a modprobe nvidia, then startx

started up no problem.

 :Laughing: 

----------

## frozenJim

A very good idea to check dmesg!

After modprobe I ran dmesg and got an interesting problem:

```
nvidia: version magic '2.6.7-gentoo-r4 SMP preempt PENTIUM gcc-3.3' should be '2.6.7-gentoo-r4 SMP PENTIUM4 gcc-3.3'
```

I'll bet this means lots so someone.  Is this as simple as a use flag missing?

----------

## SysOP XXL

 *frozenJim wrote:*   

> A very good idea to check dmesg!
> 
> After modprobe I ran dmesg and got an interesting problem:
> 
> ```
> ...

 

That's the clue IMO   :Wink: 

Is your kernel compiled as a preemptive kernel? The module is crying that it's not, but the module is.. Try to enable preempt, recompile the kernel then re-merge nvidia-kernel   :Idea: 

----------

## frozenJim

Yep, I think it's obvious too.  I took a look in menuconfig and found that in the Processor section there is a choice for "enable Premptive..." which had been checked.  I unchecked it and am currently recompiling.

I bet this fixes it.

But it doesn't explain the problem does it?  Using this solution, I can never again optimize my kernel without breaking nvidia.  

WHY is it looking for an outdated kernel?  And how can we fix this?  I believe this is the solution that hundreds (or thousands) of us have been fighting toward.

On the other distro sites they are all having the same problem and are fixing it by replacing their kernel with an older one.  Same bad fix, different distro.  They blame gcc (?).

Who knows what the "right" solution is?  This should be good for 100 brownie points at least!

----------

## DeZZa

Version 6106 is out!

http://www.nvidia.com

or

```
/usr/portage/media-video/nvidia-kernel

/usr/portage/media-video/nvidia-glx
```

----------

## frozenJim

Right.  I see that it is there in usr/portage/media-video//nvidia-kernel.

How do I install it?

Emerge still only gives me the 1.9.4496-r3 option.  I already have the 1.0.5336-r4 installed.

So how do I get the 6106?  If I follow the instructions at 

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

will I somehow break my portage for future video drivers?

(sorry to ask such noob questions.. but I truly am a noob of the worst sort)

----------

## Nylle

It is masked, meaning it is not considered "stable" yet. Don't let this scare you though, it mostly just means that it is new and not enough people have tried it yet.

To get the latest nvidia-kernel and nvidia-glx do

```

ACCEPT_KEYWORDS=~x86 emerge -p nvidia-kernel nvidia-glx

```

"~x86" means "unstable" build in the x86 arch. I suggest you take a look at the portage manual, as it will make it possible for you to really control your gentoo box.

----------

## frozenJim

Yep.  That was it.

Just a driver update.  sigh.  So simple when the drivers work.

Thx all.

----------

## DeZZa

Here's what i did, so anyone in future do not get the same problem .. :Arrow: 

1. My sources were broken, gave some errors .. So i re-emerged them (emerge ck-sources)

2. I compiled the kernel.

3. I re-emerged nvidia-kernel and nvidia-glx version 6106.

4. Rebooted, everything worked fine!

 :Exclamation:  And YES i have 4kstacks enabled, it's supported by 6106! Cheers!  :Very Happy:  ..

----------

