# Failed to initialize the NVIDIA kernel module



## pbd (Jul 26, 2010)

Hi,

I have a problem with Nvidia Go 6100 and nvidia driver - the driver wont load. Xorg.0.log:


```
(EE) Jul 26 11:05:50 NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the
(EE) Jul 26 11:05:50 NVIDIA(0):     system's kernel log for additional error messages and
(EE) Jul 26 11:05:50 NVIDIA(0):     consult the NVIDIA README for details
```

README says to look for lines preceded by "NVRM" in dmesg or /var/log/messages, but it does not contain some error.

Module seems to be loaded:


```
# kldstat -v |fgrep nvidia
                55 pci/ata_nvidia
                210 hostb/agp_nvidia
13    1 0xcbb3f000 946000   nvidia.ko (/boot/modules/nvidia.ko)
```

Versions used:


```
FreeBSD 8.1-RELEASE i386
nvidia-driver-195.36.15
xorg-7.5
xorg-server-1.7.5,1
```

I tried to wipe out /usr/src, rebuild world and kernel and the driver but it didn't help.

My kernel config:


```
# sed -e 's/#.*//' /sys/i386/conf/CHT0N-8 | uniq
cpu             I686_CPU
ident           CHT0N-VIMAGE

options         SCHED_ULE               
options         PREEMPTION              
options         INET                    
options         INET6                   
options         SCTP                    
options         FFS                     
options         SOFTUPDATES             
options         UFS_ACL                 
options         UFS_DIRHASH             
options         UFS_GJOURNAL            
options         MD_ROOT                 
options         NFSCLIENT               
options         NFSSERVER               
options         NFSLOCKD                
options         NFS_ROOT                
options         MSDOSFS                 
options         CD9660                  
options         PROCFS                  
options         PSEUDOFS                
options         GEOM_PART_GPT           
options         GEOM_LABEL              
options         COMPAT_43TTY            
options         COMPAT_FREEBSD4         
options         COMPAT_FREEBSD5         
options         COMPAT_FREEBSD6         
options         COMPAT_FREEBSD7         
options         SCSI_DELAY=5000         
options         KTRACE                  
options         STACK                   
options         SYSVSHM                 
options         SYSVMSG                 
options         SYSVSEM                 
options         P1003_1B_SEMAPHORES     
options         _KPOSIX_PRIORITY_SCHEDULING 
options         PRINTF_BUFR_SIZE=128    
options         KBD_INSTALL_CDEV        
options         HWPMC_HOOKS             
options         AUDIT                   
options         MAC                     
options         FLOWTABLE               

options         INCLUDE_CONFIG_FILE     

options         SMP                     
device          apic                    

device          cpufreq

device          acpi

device          pci

device          ata
device          atadisk         

device          atapicd         

options         ATA_STATIC_ID   

device          scbus           

device          da              

device          atkbdc          
device          atkbd           
device          psm             

device          kbdmux          

device          vga             

device          splash          

device          sc

device          agp             

device          pmtimer

device          miibus          

device          re              

device          wlan            
options         IEEE80211_DEBUG 
options         IEEE80211_AMPDU_AGE 
options         IEEE80211_SUPPORT_MESH  
device          wlan_wep        
device          wlan_ccmp       
device          wlan_tkip       
device          wlan_amrr       
device          an              
device          ath             
device          ath_hal         
options         AH_SUPPORT_AR5416       
device          ath_rate_sample 
device          ral             
device          wi              

device          loop            
device          random          
device          ether           
device          vlan            
device          tun             
device          pty             
device          md              
device          gif             
device          faith           
device          firmware        

device          bpf             

options         USB_DEBUG       
device          uhci            
device          ohci            
device          ehci            
device          usb             

device          uhid            
device          ukbd            
device          ulpt            
device          umass           
device          ums             
device          urio            

device          u3g             
device          uark            
device          ubsa            
device          uftdi           
device          uipaq           
device          uplcom          
device          uslcom          
device          uvisor          
device          uvscom          

device          aue             
device          axe             
device          cdce            
device          cue             
device          kue             
device          rue             
device          udav            

device          rum             
device          uath            
device          ural            
device          zyd
```

xorg.conf:


```
# cat xorg.conf
Section "ServerFlags"
    Option         "blank time"     "0"
    Option         "standby time"   "0"
    Option         "suspend time"   "0"
    Option         "off time"       "0"
    Option         "DefaultServerLayout" "cht0n"
    Option         "AllowEmptyInput" "0"
EndSection

Section "ServerLayout"
  Identifier     "cht0n"
  Screen         0 "Screen" 0 0
  InputDevice    "Mouse"    "CorePointer"
  InputDevice    "Keyboard" "CoreKeyboard"
EndSection

Section "Files"
  ModulePath   "/usr/local/lib/xorg/modules"
  FontPath     "/usr/local/lib/X11/fonts/misc/"
  FontPath     "/usr/local/lib/X11/fonts/TTF/"
  FontPath     "/usr/local/lib/X11/fonts/OTF"
  FontPath     "/usr/local/lib/X11/fonts/Type1/"
  FontPath     "/usr/local/lib/X11/fonts/100dpi/"
  FontPath     "/usr/local/lib/X11/fonts/75dpi/"
  FontPath     "/usr/local/lib/X11/fonts/webfonts/"
  FontPath     "/usr/local/lib/X11/fonts/TrueType/"
EndSection

Section "Module"
  Load  "extmod"
  Load  "dbe"
  Load  "type1"
  Load  "freetype"
  Load  "glx"
EndSection

Section "Extensions"
Option         "Composite" "Enable"
EndSection

Section "InputDevice"
  Identifier  "Keyboard"
  Driver      "kbd"
EndSection

Section "InputDevice"
  Identifier  "Mouse"
  Driver      "mouse"
  Option      "Protocol" "auto"
  Option      "Device" "/dev/sysmouse"
  Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
  Identifier   "Monitor"
  VendorName   "Monitor Vendor"
  ModelName    "Monitor Model"
  Option       "dpms"
  Option       "AddARGBGLXVisuals" "True"
EndSection

Section "Device"
  Identifier  "Card"
  Driver      "nvidia"
  #VendorName  "nVidia Corporation"
  #BoardName   "MCP51 PCI-X GeForce Go 6100"
  #Option      "SWcursor" "True"
  #Option      "HWcursor" "False"
  #Option      "NvAgp" "3"
  #BusID       "PCI:0:5:0"
EndSection

Section "Screen"
  Identifier "Screen"
  Device     "Card"
  Monitor    "Monitor"
  SubSection "Display"
    Viewport   0 0
    Depth     24
  EndSubSection
EndSection
```

This problem started after some upgrade, maybe upgrade of xorg-server, but I don't remember any more. Have you please any idea where to start?


----------



## adamk (Jul 26, 2010)

Please show us your dmesg.

Adam


----------



## pbd (Jul 26, 2010)

adamk said:
			
		

> Please show us your dmesg.




```
Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.1-RELEASE #1: Mon Jul 19 11:58:55 CEST 2010
    root@cht0n.tns.cz:/usr/obj/usr/src/sys/CHT0N-8 i386
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-50 (1608.94-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x40f82  Family = f  Model = 48  Stepping = 2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x1f<LAHF,CMP,SVM,ExtAPIC,CR8>
real memory  = 2684354560 (2560 MB)
avail memory = 2478133248 (2363 MB)
ACPI APIC Table: <A_M_I_ OEMAPIC >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <_ASUS_ Notebook> on motherboard
ACPI Error: Found unknown opcode 0xFD at AML address 0xe6767cd1 offset 0x56ED, ignoring (20100331/psloop-232)
ACPI Error: Found unknown opcode 0xFD at AML address 0xe6767d80 offset 0x579C, ignoring (20100331/psloop-232)
ACPI Error: Found unknown opcode 0xFD at AML address 0xe6767cd1 offset 0x56ED, ignoring (20100331/psloop-232)
ACPI Error: Found unknown opcode 0xFD at AML address 0xe6767d80 offset 0x579C, ignoring (20100331/psloop-232)
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of fee01000, ff000 (3) failed
acpi0: reservation of fec00000, 1000 (3) failed
acpi0: reservation of fee00000, 1000 (3) failed
acpi0: reservation of e0000000, 10000000 (3) failed
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 97f00000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x508-0x50b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_ec0: <Embedded Controller: GPE 0x20> port 0x62,0x66 on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 25000000 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.0 (no driver attached)
pci0: <memory, RAM> at device 0.1 (no driver attached)
pci0: <memory, RAM> at device 0.2 (no driver attached)
pci0: <memory, RAM> at device 0.3 (no driver attached)
pci0: <memory, RAM> at device 0.4 (no driver attached)
pci0: <memory, RAM> at device 0.5 (no driver attached)
pci0: <memory, RAM> at device 0.6 (no driver attached)
pci0: <memory, RAM> at device 0.7 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 2.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 3.0 on pci0
pci2: <ACPI PCI bus> on pcib2
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xd800-0xd8ff mem 0xdf6ff000-0xdf6fffff irq 17 at device 0.0 on pci2
re0: Using 1 MSI messages
re0: Chip rev. 0x38000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re0: Ethernet address: 00:18:f3:7a:73:bc
re0: [FILTER]
pcib3: <ACPI PCI-PCI bridge> at device 4.0 on pci0
pci3: <ACPI PCI bus> on pcib3
vgapci0: <VGA-compatible display> mem 0xde000000-0xdeffffff,0xc0000000-0xcfffffff,0xdd000000-0xddffffff irq 16 at device 5.0 on pci0
pci0: <memory, RAM> at device 9.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 10.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 10.1 (no driver attached)
pci0: <processor> at device 10.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xdf5de000-0xdf5defff irq 22 at device 11.0 on pci0
ohci0: [ITHREAD]
usbus0: <OHCI (generic) USB controller> on ohci0
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xdf5dfc00-0xdf5dfcff irq 23 at device 11.1 on pci0
ehci0: [ITHREAD]
usbus1: EHCI version 1.0
usbus1: <EHCI (generic) USB 2.0 controller> on ehci0
atapci0: <nVidia nForce MCP51 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 13.0 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pcib4: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci4: <ACPI PCI bus> on pcib4
pci4: <bridge, PCI-CardBus> at device 1.0 (no driver attached)
pci4: <serial bus, FireWire> at device 1.1 (no driver attached)
pci4: <base peripheral, SD host controller> at device 1.2 (no driver attached)
pci4: <base peripheral> at device 1.3 (no driver attached)
pci4: <network> at device 3.0 (no driver attached)
hdac0: <NVidia MCP51 High Definition Audio Controller> mem 0xdf5d8000-0xdf5dbfff irq 20 at device 16.1 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
acpi_button0: <Sleep Button> on acpi0
acpi_button0: enable wake failed
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button1: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
pmtimer0 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
powernow0: <PowerNow! K8> on cpu0
powernow1: <PowerNow! K8> on cpu1
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ugen0.1: <nVidia> at usbus0
uhub0: <nVidia OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <nVidia> at usbus1
uhub1: <nVidia EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
acd0: DVDR <HL-DT-ST DVDRAM GSA-T10N/PR03> at ata0-master UDMA33 
ad2: 95396MB <HTS541010G9AT00 MBZOA60A> at ata1-master UDMA100 
hdac0: HDA Codec #0: Realtek ALC861
hdac0: HDA Codec #1: Unknown Codec
pcm0: <HDA Realtek ALC861 PCM #0 Analog> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC861 PCM #1 Analog> at cad 0 nid 1 on hdac0
pcm2: <HDA Realtek ALC861 PCM #2 Digital> at cad 0 nid 1 on hdac0
SMP: AP CPU #1 Launched!
Root mount waiting for: usbus1 usbus0
uhub0: 8 ports with 8 removable, self powered
Root mount waiting for: usbus1
Root mount waiting for: usbus1
Root mount waiting for: usbus1
uhub1: 8 ports with 8 removable, self powered
Trying to mount root from ufs:/dev/ad2s1a
ugen0.2: <vendor 0x0b05> at usbus0
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
link_elf: symbol callout_reset undefined
ugen1.2: <HTC> at usbus1
umass0: <HTC Android Phone, class 0/0, rev 2.00/2.27, addr 2> on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x0000
umass0:0:0:-1: Attached to scbus0
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power on, reset, or bus device reset occurred)
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present)
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <HTC Android Phone 0100> Removable Direct Access SCSI-2 device 
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
GEOM: da0: partition 1 does not start on a track boundary.
GEOM: da0: partition 1 does not end on a track boundary.
ugen1.2: <HTC> at usbus1 (disconnected)
umass0: at uhub1, port 2, addr 2 (disconnected)
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
pid 40745 (hugin), uid 1000: exited on signal 11 (core dumped)
pid 40780 (hugin), uid 1000: exited on signal 11 (core dumped)
pid 40801 (hugin), uid 1000: exited on signal 11 (core dumped)
```


----------



## adamk (Jul 26, 2010)

So there's nothing in there about the nvidia driver being loaded.  Is it currently loaded?  Do you get any messages at all when you go to load the kernel module?


----------



## SirDice (Jul 26, 2010)

The nvidia kernel module isn't loaded. Add to /boot/loader.conf:

```
nvidia_load="YES"
```

`# kldload nvidia` or reboot.


----------



## pbd (Jul 26, 2010)

SirDice said:
			
		

> The nvidia kernel module isn't loaded. Add to /boot/loader.conf:
> 
> ```
> nvidia_load="YES"
> ...



I think that it is loaded. /boot/loader.conf:


```
# cat /boot/loader.conf
linux_enable="YES"
snd_hda_load="YES"
#if_bwi_load="YES"
#bwi_v3_ucode_load="YES"
nvidia_load="YES"
```


```
# kldstat 
Id Refs Address    Size     Name
 1   32 0xc0400000 795960   kernel
 2    1 0xc0b96000 1c2a4    snd_hda.ko
 3    2 0xc0bb3000 57794    sound.ko
 5    1 0xc6dcc000 8000     linprocfs.ko
 6    1 0xc6e25000 26000    linux.ko
 7    1 0xc6ece000 10000    ext2fs.ko
 8    1 0xc6fe3000 35000    pf.ko
 9    1 0xc70c0000 21000    ng_btsocket.ko
10    1 0xc70e1000 b000     netgraph.ko
11    1 0xc70f2000 2000     ng_bluetooth.ko
12    1 0xc7115000 e000     fuse.ko
13    1 0xcbb3f000 946000   nvidia.ko
```


----------



## lyuts (Jul 26, 2010)

This looks like inconsistency between nvidia module and your kernel. You need to recompile nvidia driver. I had similar problem when running 8.0 i cvsuped the source tree for 8.1 and recompiled the nvidia driver.


----------



## SirDice (Jul 26, 2010)

Are you sure it's the correct version for your card? It doesn't seem to recognize it.


----------



## pbd (Jul 28, 2010)

lyuts said:
			
		

> This looks like inconsistency between nvidia module and your kernel. You need to recompile nvidia driver. I had similar problem when running 8.0 i cvsuped the source tree for 8.1 and recompiled the nvidia driver.



I have allready recompiled the driver, but it din't help.



			
				SirDice said:
			
		

> Are you sure it's the correct version for your card? It doesn't seem to recognize it.



I have tried all versions in ports tree (x11/nvidia-driver worked in the past), but still no luck.


----------



## adamk (Jul 28, 2010)

I would suggest asking nvidia: http://nvnews.net/vbulletin/forumdisplay.php?f=47 

There's not much we can do about buggy binary drivers 

Adam


----------

