# Problem with nvidia driver.

## user20000

Hi,

if i run startx i get back:

ERROR: could not insert 'nvidia': No such file or directory.

i run several times

emerge nvidia-drivers.

Would be nice if somebody can help me

Greetings

----------

## NeddySeagoon

user20000,

Welcome to Gentoo.

There will be more detail in both dmesg and in /var/log/Xorg.0.log.

Those things are usually to too big for a post, so procede as follows:-

```
emerge wgetpaste

dmesg | wgetpaste

wgetpaste /var/log/Xorg.0.log
```

and tell us the URLs that wgetpaste returns.

Once we know why the nvidia kernel module is not loading, we can tell you how to fix it.

----------

## user20000

Hi =)

thanks for the welcome.

the Kernelring buffer: http://bpaste.net/show/33916

and the X-Org log : http://bpaste.net/show/33917

----------

## user20000

I have tried to make this:

"FEATURES="-ccache" emerge -a nvidia-drivers" 

this compiles, but whil compiling there is invalid kernel report....

in the end it doesnot work.

----------

## BillWho

user20000,

Compile the drivers with 

```
ebuild  $(equery w x11-drivers/nvidia-drivers) compile
```

Then paste the log with 

```
wgetpaste  /var/tmp/portage/x11-drivers/nvidia-drivers-302.17/temp/build.log
```

----------

## user20000

Hi BillWho,

okay: http://bpaste.net/show/33926

Should i try to build a nother version of kernel or the nvidia driver ??

----------

## NeddySeagoon

user20000,

```
Disabling lock debugging due to kernel taint

nvidia: module license 'NVIDIA' taints kernel.

nvidia: Unknown symbol i2c_del_adapter (err 0)
```

tells all.  You have a piece of kernel missing that nvidia depends on.

grepping the kernel sources shows that its defined at drivers/i2c/i2c-core.c:EXPORT_SYMBOL(i2c_del_adapter);

In turn that equats to the kernel option 

```
 <*> I2C support  ---> 
```

which is actually a menu.

In that menu, se

```
t  │ │       --- I2C support                                                              │ │  

  │ │       [ ]   Enable compatibility bits for old user-space                           │ │  

  │ │       <M>   I2C device interface                                                   │ │  

  │ │       < >   I2C bus multiplexing support                                           │ │  

  │ │       [*]   Autoselect pertinent helper modules
```

rebuild and reinstall your kernel, reboot, rebuild nvidia-drivers, so it can find your new kernel symbol and you should be set.

At least, you can move on to your next Gentoo learning experience.

----------

## BillWho

user20000,

It compiled fine with one warning message, but I get that too and it's up and running   :Confused: 

Change to your /lib/modules/kernel-version and grep nvidia modules.{dep,alias}. You should get back something like

```
root@gentoo-ws490 3.4.4-gentoo # grep nvidia modules.{dep,alias}

modules.dep:video/nvidia.ko:

modules.alias:alias char-major-195-* nvidia

modules.alias:alias pci:v000010DEd00000E00sv*sd*bc04sc80i00* nvidia

modules.alias:alias pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00* nvidia

modules.alias:alias pci:v000010DEd*sv*sd*bc03sc02i00* nvidia

modules.alias:alias pci:v000010DEd*sv*sd*bc03sc00i00* nvidia

```

See if you have nouveau in there - you shouldn't grep nouveau modules.{dep,alias}

If you take a look in this forum another poster has a baffling problem with nvidia   :Confused: 

----------

## user20000

Hi Neddy,

i have had a look on the i2c-core.c ... 

can you tell mi littele bit of the Softwarearchitecture of the kernel ??

Why is i2c-core a adapter. I thought the driver must implement the

functions of file_operations structure....

----------

## user20000

Hi Bill,

in the lib/modules is no folder for my Kernelversion. There are some old version. but not the actual.

This may be the problem ??

I have hade a look ond wordering on this bevore prosting here. I was unshure if this may be the failure ??

----------

## NeddySeagoon

user20000,

i2c is a bus, much ilike PCI or USB. I suspect the nvidia driver uses i2c to load firmware onto the graphics card, whic is why you need i2c support in your kernel.

The kernel codebase as distributed, will build for any supported architecture but menuconfig uses the value of the ARCH to hide things that are not relevant to the ARCH you want to configure the kernel for. To see supported architectures look in /usr/src/linux/arch

The various parts of the kernel can be loadable modules, built in, or left out entirely.  You do not need to use loadable modules if you don't want to, unless you need things that cannot be built in.  Monolithic kernel are fine and offer one less attack vector for an attacker.

Did you skip the 

```
make modules_install
```

 step when you installed your kernel?

You can do that step now.

Did you mistype it as

```
make modules install
```

That does something quite different without producing an error.

----------

## BillWho

 *user20000 wrote:*   

> Hi Bill,
> 
> in the lib/modules is no folder for my Kernelversion. There are some old version. but not the actual.
> 
> This may be the problem ??
> ...

 

In short, yes there should be file tree in /lib/modules/kerne for the kernel you're compiling. That's how you can have multiple kernel versions, each version will have the modules compiled for it.

```
root@gentoo-gateway modules # ls -l 3.5.0-rc5/kernel/

total 28

drwxr-xr-x  3 root root 4096 Jul  2 21:24 arch/

drwxr-xr-x  2 root root 4096 Jul  2 21:24 crypto/

drwxr-xr-x 18 root root 4096 Jul  2 21:24 drivers/

drwxr-xr-x  3 root root 4096 Jul  2 21:24 fs/

drwxr-xr-x  2 root root 4096 Jul  2 21:24 lib/

drwxr-xr-x  8 root root 4096 Jul  2 21:24 net/

drwxr-xr-x  5 root root 4096 Jul  2 21:24 sound/

```

The nvidia.ko file will reside there too so not having it explains a lot. I see NeddySeagoon explained things, so if you follow his guidance all will be good 

Good luck   :Wink: 

----------

## user20000

Okay,

now i can load the nvidia driver. (Ihave updated the Kernel one version)

but now i have blocking problems with qt-core:

emerge qt-core http://bpaste.net/show/33942

----------

## BillWho

Have you made any entries in  /etc/portage/package.keywords   :Question:   and if so for what reason   :Question: 

There's a big complaint at the beginning of the paste about it which is not a good thing   :Confused: 

----------

## user20000

hmm do you talking about the

--- Invalid atom in /etc/portage/package.keywords: sys-apps/kmod-7

--- Invalid atom in /etc/portage/package.keywords: sys-apps/kmod-5

... this i have removed...

But the rest of the output stays the same...

I have set the x86 keyword generally in the make.conf , but this does not solve anything, and

if, this would not be a good solution. So i have disabledit again. 

Soi stay on the problem.

----------

## BillWho

user20000.

Can you paste the /etc/make.conf and /etc/portage/package.keywords   :Question: 

----------

