nvidia-bumblebee does not install in tumbleweed latest snapshot

After “zypper up” my laptop (dual graphics, intel+nvidia) did not boot properly into a desktop anymore. I removed all the nvidia-bumblebee stuff. Then it rebooted. Trying to re-install nvidia-bumblebee with “zypper in nvidia-bumblebee” resulted in compiler errors.

I believe that nvidia-bumblebee needs to be patched for kernel 4.11.0

Here is some more info:
After doing a: “zypper in nvidia-bumblebee”, the following errors show:

Building module:
cleaning build area...
'make' KERNEL_UNAME=4.11.0-1-default modules............(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.11.0-1-default (x86_64)
Consult /var/lib/dkms/nvidia/375.39/build/make.log for more information.
+ /usr/sbin/dkms install -m nvidia -v 375.39
 
Kernel preparation unnecessary for this kernel.  Skipping...
 
Building module:
cleaning build area...
'make' KERNEL_UNAME=4.11.0-1-default modules.........(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.11.0-1-default (x86_64)
Consult /var/lib/dkms/nvidia/375.39/build/make.log for more information.
+ popd

If I then do cat /var/lib/dkms/nvidia/375.39/build/make.log

/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nvidia_cpu_callback’:
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:213:14: error: ‘CPU_DOWN_FAILED’ undeclared (first use in this function)
case CPU_DOWN_FAILED:
^~~~~~~~~~~~~~~
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:213:14: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:220:14: error: ‘CPU_DOWN_PREPARE’ undeclared (first use in this function)
case CPU_DOWN_PREPARE:
^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:15:0:
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nv_init_pat_support’:
/var/lib/dkms/nvidia/375.39/build/common/inc/nv-linux.h:391:34: error: implicit declaration of function ‘register_cpu_notifier’ -Werror=implicit-function-declaration]
#define register_hotcpu_notifier register_cpu_notifier
^
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:258:17: note: in expansion of macro ‘register_hotcpu_notifier’
if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nv_teardown_pat_support’:
/var/lib/dkms/nvidia/375.39/build/common/inc/nv-linux.h:388:36: error: implicit declaration of function ‘unregister_cpu_notifier’ -Werror=implicit-function-declaration]
#define unregister_hotcpu_notifier unregister_cpu_notifier
^
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:283:9: note: in expansion of macro ‘unregister_hotcpu_notifier’
unregister_hotcpu_notifier(&nv_hotcpu_nfb);
^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-4.11.0-1/scripts/Makefile.build:296: /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.o] Error 1
make[2]: *** [/usr/src/linux-4.11.0-1/Makefile:1502: module/var/lib/dkms/nvidia/375.39/build] Error 2
make[2]: Leaving directory ‘/usr/src/linux-4.11.0-1-obj/x86_64/default’
make[1]: *** [Makefile:152: sub-make] Error 2
make[1]: Leaving directory ‘/usr/src/linux-4.11.0-1’
make: *** [Makefile:81: modules] Error 2

There was a bug in kernel 4.11 which has been fixed. It now allows the Nvidia blob to be installed.
The kernel is in Factory and should be available in the next build for download.

I would use kernel 4.10 for now until the other build is available.

That’s what I’ve also read. Hopefully 4.11.1 will be rolled out soon.

Thank you for this reply. I was already afraid that I could not do updates for my spiffy new laptop anymore, and Tumbleweed was the only distro that runs on it.

How do I know when the next build is available? Or should I just try to occasionally update and then do a snapper rollback if it does not work?

4.11.1 is currently in staging and it should be available in snapshot 0518.

I always create a pre and post snapshot when I do a kernel update.
Then, if I’m in trouble I’ll do a rollback.

NB I would recommend reading on how to do a rollback in the console (without the gui).

Update

A regression in openQA caused some failures that needed to be understood.
Due to the nature of the breakage, some test suites could not be run.

There was also an issue with changes in openSSL packaging, making 1.0 and 1.1 able to co-exist nicely,
caused a failure in bind, the major DNS server software used. Bind refused to start in the current setup.

A solution to both issues is expected early next week. Stay tuned and subscribe to the openSUSE Factory ML.

opensuse-factory@opensuse.org

I just updated Tumbleweed. This version includes the new kernel (4.11.1-1-default) . But I get the same results with the nvidia-bumblebee package:

After zypper in nvidia-bumblebee:

Output of nvidia-bumblebee-375.39-1.1.x86_64.rpm %posttrans script:
+ ‘’ -x /usr/sbin/dkms ‘]’
+ /usr/sbin/dkms add -m nvidia -v 375.39 --rpm_safe_upgrade

Creating symlink /var/lib/dkms/nvidia/375.39/source ->
                 /usr/src/nvidia-375.39
 
DKMS: add completed.
+ /usr/sbin/dkms build -m nvidia -v 375.39
 
Kernel preparation unnecessary for this kernel.  Skipping...
 
Building module:
cleaning build area...
'make' KERNEL_UNAME=4.11.1-1-default modules.............(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.11.1-1-default (x86_64)
Consult /var/lib/dkms/nvidia/375.39/build/make.log for more information.
+ /usr/sbin/dkms install -m nvidia -v 375.39
 
Kernel preparation unnecessary for this kernel.  Skipping...
 
Building module:
cleaning build area...
'make' KERNEL_UNAME=4.11.1-1-default modules.........(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.11.1-1-default (x86_64)
Consult /var/lib/dkms/nvidia/375.39/build/make.log for more information.
+ popd

This is the contents of /var/lib/dkms/nvidia/375.39/build/make.log

CC [M] /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.o
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nvidia_cpu_callback’:
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:213:14: error: ‘CPU_DOWN_FAILED’ undeclared (first use in this function)
case CPU_DOWN_FAILED:
^~~~~~~~~~~~~~~
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:213:14: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:220:14: error: ‘CPU_DOWN_PREPARE’ undeclared (first use in this function)
case CPU_DOWN_PREPARE:
^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:15:0:
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nv_init_pat_support’:
/var/lib/dkms/nvidia/375.39/build/common/inc/nv-linux.h:391:34: error: implicit declaration of function ‘register_cpu_notifier’ -Werror=implicit-function-declaration]
#define register_hotcpu_notifier register_cpu_notifier
^
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:258:17: note: in expansion of macro ‘register_hotcpu_notifier’
if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nv_teardown_pat_support’:
/var/lib/dkms/nvidia/375.39/build/common/inc/nv-linux.h:388:36: error: implicit declaration of function ‘unregister_cpu_notifier’ -Werror=implicit-function-declaration]
#define unregister_hotcpu_notifier unregister_cpu_notifier
^
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:283:9: note: in expansion of macro ‘unregister_hotcpu_notifier’
unregister_hotcpu_notifier(&nv_hotcpu_nfb);
^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-4.11.1-1/scripts/Makefile.build:296: /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.o] Error 1
make[2]: *** [/usr/src/linux-4.11.1-1/Makefile:1502: module/var/lib/dkms/nvidia/375.39/build] Error 2
make[2]: Leaving directory ‘/usr/src/linux-4.11.1-1-obj/x86_64/default’
make[1]: *** [Makefile:152: sub-make] Error 2
make[1]: Leaving directory ‘/usr/src/linux-4.11.1-1’
make: *** [Makefile:81: modules] Error 2

This repository was dated today:

http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_Tumbleweed/

If this still doesn’t work, I would highly recommend installing suse-prime.

First, you must remove bumblebee.** It allows you to use the drivers provided by Nvidia**.
Many people have switched to suse-prime. However, you must patch the driver.

Patch: http://img.susepaste.org/25062161

See: https://software.opensuse.org/package/suse-prime

Update
**
The patch is no longer needed**. It’s the kernel that was patched.

This is the driver that I just installed in Tumbleweed.

To install, type:

su -

To install driver

sh /home/username/NVIDIA-Linux-x86_64-381.22.run -aq

Instructions on setting up and using suse-prime

 **SUSE Prime**

 nvidia-prime like package for OpenSUSE

Assumptions:

After install please do:

  1. Add the following lines

    if -f /etc/X11/xinit/xinitrc.d/prime-offload.sh ];
    then
    . /etc/X11/xinit/xinitrc.d/prime-offload.sh
    fi

    To /etc/X11/xdm/Xsetup after the line “. /etc/sysconfig/displaymanager”

  2. Run “prime-select nvidia” log out and login again, hopefully you are using nvidia GPU. To switch back to intel GPU run “prime-select intel” Remember to run as root.

Installing Suse-prime, and the nvidia drivers worked only partly. The nvidia drivers (381.22) installed fine from a console, using the nvidia install program. When installing suse-prime, yast complained about some url not being reachable. I installed the suse-prime scripts from github. Then it worked after the first reboot. Resume from suspend did not work, and subsequent reboots dit not work.

Installing nvidia-bumblebee (381.22) from someones personal repo via software.opensuse.org worked fine. I could run glxgears on the nvidia card.

BUT: It did not solve my particular problem. The reason I needed the nvidia drivers installed is that otherwise I cannot change the brightness on my laptop. It worked with kernel 4.10.13 + nvidia-bumblebee 375.39. But with any other combination my laptop goes to maximum brightness and stays there.