# Latest Nvidia Driver, bumblebee, kernel and u-effing-dev

## RayDude

I updated my gentoo yesterday. Upon reboot all hell broke loose as one CPU ran at 100% and slowly ate all memory until the swap was almost full. I just barely rebooted it in time.

I've had this problem before so I immediately forgot what had happened before and googled it.

The problem is simple: The udev tries to load the nvidia kernel, but doesn't know that bumblebee has switched it off. The Nvidia driver says, "Yo axehandle, they ain't no  effing nvidia card here!" and the kernel unloads nvidia.

Somewhere, some how someone (probably the kernel) loses a little bit of memory (fails to release it) in this process.

This happens over and over and over again until the system is unusable and has to be rebooted.

I HATE THIS BUG WITH A PASSION AND I SEE IT EVERY FEW MONTHS WITH NEW NVIDIA DRIVERS.

The fix has always been the same: Enable the stupid Nvidia Card (kill battery life) and let the stupid nvidia module load.

I did that late last night, but yanno? I still get messages in the UDEV KERNEL dance (`udevadm monitor`). Now they are biotching about ACPI and NVIDIA and some magical module I've never heard of, the Nvidia ACPI module driver or something like that. And you know what? That process takes 5-10% of my CPU and will eventually fill all of available memory as well.

The fix to this mess was simply to go back to an old version of the Nvidia driver. udevadm monitor is clean with 331.67 drivers.

UPDATE: But 331.67 nvidia drivers are Farked! I lost a bunch of libraries and everything stopped working! 334.21-r3 is the one you want.

Does anyone know more about this? Is there a permanent fix short of running the nvidia driver all the time, as the primary display?

----------

## djdunn

I'm shooting in the dark, perhaps eudev would behave better than udev?

----------

## RayDude

 *djdunn wrote:*   

> I'm shooting in the dark, perhaps eudev would behave better than udev?

 

Hmmm First I've heard of the beastie.

*googles around a bit*

I see. I think I'll try it out.

Thanks.

----------

## lexming

In the case that you are in a Intel+Nvidia setup, it is not necessary to load the nvidia module at all. You should blacklist it to avoid such problems during bootup.

```
# cat /etc/modprobe.d/blacklist.conf

blacklist nvidia
```

Then bbswitch will poweroff the gpu and the nvidia module won't be loaded unless optirun/primusrun is called.

----------

## Yuriy Skvortsov

Hi!

I have kind of same problem with nvidia & co for quite a week. The udev goes nuts, uses 100% CPU and leaks memory. Nvidia module constantly appears and disappears at lsmod. I observe this behaviour on gentoo-sources-3.12.13, ck-sources-3.12.13, nvidia-drivers-334.21-r3, nvidia-drivers-337.12 in any combination. For the record: bbswitch-0.8 .

Typical dmesg output in the case is:

```

[ 8238.041217] NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:0fd1)

NVRM: installed in this system is not supported by the 334.21

NVRM: NVIDIA Linux driver release.  Please see 'Appendix

NVRM: A - Supported NVIDIA GPU Products' in this release's

NVRM: README, available on the Linux driver download page

NVRM: at www.nvidia.com.

[ 8238.041229] nvidia: probe of 0000:01:00.0 failed with error -1

[ 8238.042414] NVRM: The NVIDIA probe routine failed for 1 device(s).

[ 8238.042418] NVRM: None of the NVIDIA graphics adapters were initialized!

[ 8238.042419] [drm] Module unloaded

[ 8238.042511] NVRM: NVIDIA init module failed!

[ 8238.073394] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none

[ 8238.073424] NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:0fd1)

NVRM: installed in this system is not supported by the 334.21

NVRM: NVIDIA Linux driver release.  Please see 'Appendix

NVRM: A - Supported NVIDIA GPU Products' in this release's

NVRM: README, available on the Linux driver download page

NVRM: at www.nvidia.com.

[ 8238.073434] nvidia: probe of 0000:01:00.0 failed with error -1

[ 8238.074473] NVRM: The NVIDIA probe routine failed for 1 device(s).

[ 8238.074474] NVRM: None of the NVIDIA graphics adapters were initialized!

[ 8238.074475] [drm] Module unloaded

[ 8238.074541] NVRM: NVIDIA init module failed!

```

I guess there was no problem on gentoo-sources-3.10.25 and some older nvidia-drivers.

Also there are some ACPI warnings at startup:

```

ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20130725/nsarguments-95)

```

Thanks for the suggestion to blacklist nvidia, will see if it helps.

----------

## Yuriy Skvortsov

After blacklisting nvidia module things gone better, not perfect though. Sometimes nvidia just loads somehow and bbswitch turns on totally on its own. Do you have guys any ideas how can one figure out what kind of stuff pushes it on? lsmod shows "0" in "used by" column about nvidia module, btw.

----------

## steveL

If you're blacklisting it, why build it at all?

Nvidia modules tend not to work well with other video things going on, ime.

----------

## Yuriy Skvortsov

 *steveL wrote:*   

> If you're blacklisting it, why build it at all?

 

It kind of works with the optirun thing and I feel it just ok to have a possibility to run something on nvidia in case I really need it (a rare-to-no case, honestly). What I do not want to happen is the bb switching ON without my explicit will. So the question is who and why touches bbswitch or bumblebee or whatever, you know, and how could it be prevented.

----------

## Yuriy Skvortsov

With bumblebee daemon stopped i can manually rmmod nvidia; echo OFF > /proc/acpi/bbswitch and it does switch the nvidia off. But then *somehow* in a few hours it suddenly switches ON again and loads nvidia module. The bumblebee stays stopped (I've checked). This behaviour really confuses me.

----------

## cyberjun

@Yuriy: Does this happen when you run youtube videos? https://forums.gentoo.org/viewtopic-t-989048.html

--cyberjun

----------

## Yuriy Skvortsov

 *cyberjun wrote:*   

> @Yuriy: Does this happen when you run youtube videos?

 

I had the same suspicion but I definitely can not reproduce it in a controllable way.

And why should it be related to the thread on vlc you've provided?

----------

## Yuriy Skvortsov

Just noticed the same effect again and it was for sure not during youtubing or any other video activity..

----------

## cyberjun

my mistake. posted the wrong link. please check this one instead: https://forums.gentoo.org/viewtopic-t-988732.html

--cyberjun

----------

## Yuriy Skvortsov

 *cyberjun wrote:*   

> please check this one instead: https://forums.gentoo.org/viewtopic-t-988732.html

 

Oh, thank you so much! It was really the reason. After disabling the "hardware acceleration" checkbox in flash player, everything went the right way, finally!

----------

## RayDude

I'd like to post an update and thank you all for continuing this thread.

By blacklisting nvidia, configuring flash to not use hw_acceleration (stupid flash dialog was unclickable, I'm not sure how I fixed it), the nvidia module is not loading so my system is running much cooler.

Thanks much!

----------

