[solved]Primus not working after nvidia update

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Oygron

[solved]Primus not working after nvidia update

Post by Oygron »

Hi all,

Last week, there was an update of nvidia-331. Since this update, primusrun (and optirun) won't work anymore:

Code: Select all

primus: fatal: Bumblebee daemon reported: error: Could not load GPU driver
When I restart bumblebeed, I get this message in dmesg:

Code: Select all

ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131115/nsarguments-95)
I tried to reinstall nvidia-331, primus and bumblebee, but for the moment, nothing helps.

Does anyone have an idea?

Thanks in advance,

Edit: Forgot to precise my config:
I'm on mint 17 64bits with a nvidia geforce GT 645M, and Mate 1.8.1 as graphical environment
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
PatH57

Re: Primus not working after nvidia update

Post by PatH57 »

check in driver manager and revert back to a previous driver.
Didn't notice any updates for 331, did you install a ppa for nvidia drivers?
Oygron

Re: Primus not working after nvidia update

Post by Oygron »

Hi,

Thanks for your answer. Unfortunately, same problem with nvidia-304.
I don't have any ppa for nvidia. The upgrade was between the 01-08-2014 and the 08-08-2014 (appeared on my upgrade list the 8th, and my previous upgrade was the 1st) and it upgraded from 331.38-0ubuntu7 to 331.38-0ubuntu7.1 . At the update time, I was on nvidia-331-updates, but since nvidia-331 changed its version number too, I think that it has updated too.
PatH57

Re: Primus not working after nvidia update

Post by PatH57 »

let's see what this gives.

Code: Select all

primusrun clementine

Code: Select all

sudo cat /proc/acpi/bbswitch
Oygron

Re: Primus not working after nvidia update

Post by Oygron »

Hi,

Just before my last manip' the result was

Code: Select all

0000:01:00.0 ON
(and OFF before launching primusrun).

But meanwhile, I tried to reinstall 331 with the driver manager, and now (even after a restart and driver réinstall), the whole thing is worse : bumblebeed won't launch anymore:

Code: Select all

[   79.610868] [ERROR]Module 'nvidia-current' is not found.
(or 'nvidia' if I try with this version).
The result of primusrun clementine ; sudo cat /proc/acpi/bbswitch is still ON.

I'll try complete unistall of everything linked to nvidia, primus, and bumblebee, reinstall everything and I'll tell you if it is any better.

Thanks
PatH57

Re: Primus not working after nvidia update

Post by PatH57 »

beofe doing so read this, you may have to purge a couple of things.
https://wiki.ubuntu.com/Bumblebee
Oygron

Re: Primus not working after nvidia update

Post by Oygron »

Everything reinstalled, and back to the starting point. Bumblebeed starts correctly, but primusrun won't run:

Code: Select all

primus: fatal: Bumblebee daemon reported: error: Could not load GPU driver
Same as earlier, after trying to launch primusrun, the card is on:

Code: Select all

sudo cat /proc/acpi/bbswitch
0000:01:00.0 ON
and off again if I restart bumblebeed.
Oygron

Re: Primus not working after nvidia update

Post by Oygron »

Following your wiki link, I had some hints on why things don't work now:
When I have a look at /etc/bumblebee/bumblebee.conf, I do have:

Code: Select all

KernelDriver=nvidia-current
LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current
XorgModulePath=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules
But when I list /usr/lib/nvidia*, I to have only "nvidia" and "nvidia-304", although I installed nvidia-current (that installed 304).

I tried changing all occurences of "nvidia-current" to "nvidia" or "nvidia-304" as suggested in your wiki link, but still the same problem.
PatH57

Re: Primus not working after nvidia update

Post by PatH57 »

best is to revert to nouveau, clear all nvidia and bumblebee leftovers and install again.
Oygron

Re: Primus not working after nvidia update

Post by Oygron »

That's what I did several times today, now. Taking care each time to clean all leftovers for bumblebee and nvidia.

What I just found is that bumblebeed made a "Could not load GPU driver" error because it launched with nouveau. If I force it to use nvidia (Driver=nvidia), bumblebeed fails to start:

Code: Select all

[  968.136868] [ERROR]Module 'nvidia-304' is not found.
I wondered, how can I know under which name the module nvidia is registered? I tried "nvidia-304", "nvidia-current", "nvidia" and "nv", no success.

EDIT:

Code: Select all

sudo find /lib/modules/$(uname -r) -name 'nvidia*.ko*'
gives me only:

Code: Select all

/lib/modules/3.13.0-34-generic/kernel/drivers/video/nvidia/nvidiafb.ko
According to the wiki, it means that the module does not exists for my current kernel. And when I install the driver, I can see the line where the module is built for the current kernel and…

Code: Select all

Error! Bad return status for module build on kernel: 3.13.0-34-generic (x86_64)
EDIT2:
By looking on logs, I can now see where the error is. I changed my system compiler to clang instead of gcc/g++. And nvidia module was built with clang…
I'll revert to gcc and tell you.

EDIT3:
Now it works. That was it.
Bonus question: As I build all my project with clang, I'd like to be able to use clang by default (using "sudo update-alternatives --config c++"). Is it possible to do that and configure somewhere that kernel modules must be compiled with g++, or must I take care to revert to g++ each time that I see a new kernel / nvidia update?

Thanks a lot for your time and your advices.
Locked

Return to “Hardware Support”