NVIDIA Bumblebee problme

Good evening, Community.

The system was clean and fresh installed(42.1).
After fallowing this manual(as observation: all times [maybe 5-7 times] this worked flawlessly):
https://en.opensuse.org/SDB:NVIDIA_Bumblebee

I didn’t received any error, but when tried to run optirun glxgears Gnome went in to logout right away. And this repeated all the time.

After, I tried to fallow this manual:
https://forums.opensuse.org/showthread.php/505270-ultimate-tutorial-installing-Bumblebee-driver-for-SUSE/page2?highlight=Bumblebee

Firstly removed all nvidia related packages and then installed all over again.
Received same thing: Black screen -> logoff

After doing times mkinitrd and adding

options nouveau modeset=0

to

/etc/modprobe.d/50-blacklist.conf

I finally managed to stop logoffs, but instead all the time I start to receive this:


igor@phoenix:~> optirun glxspheres 
  749.879415] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied


  749.879447] [ERROR]Aborting because fallback start is disabled.

Already added this:

Section "Screen" 
   Identifier "Default Screen"
    Device "DiscreteNvidia" 
EndSection

to /etc/bumblebee/xorg.conf.nvidia.
Didn’t see any result.

Some output before run command:


phoenix:/home/igor # optirun --status
Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.


phoenix:/home/igor # systemctl status bumblebeed
bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
   Active: active (running) since Mon 2016-07-18 22:13:02 BRT; 11min ago
 Main PID: 1289 (bumblebeed)
   CGroup: /system.slice/bumblebeed.service
           └─1289 /usr/sbin/bumblebeed


Jul 18 22:13:02 phoenix systemd[1]: Started Bumblebee C Daemon.
Jul 18 22:13:02 phoenix bumblebeed[1289]:     5.846475] [INFO]/usr/sbin/bumblebeed 3.2.1 started
phoenix:/home/igor #

Some output after run command:

igor@phoenix:~> optirun --status
Bumblebee status: Error (3.2.1): [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
phoenix:/home/igor # systemctl status -l bumblebeedbumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled)
   Active: active (running) since Mon 2016-07-18 22:13:02 BRT; 14min ago
 Main PID: 1289 (bumblebeed)
   CGroup: /system.slice/bumblebeed.service
           └─1289 /usr/sbin/bumblebeed


Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.044986] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045032] [ERROR][XORG] (EE) [drm] KMS not enabled
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045039] [ERROR][XORG] (EE) No devices detected.
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045045] [ERROR][XORG] (EE)
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045051] [ERROR][XORG] (EE) no screens found(EE)
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045056] [ERROR][XORG] (EE)
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045065] [ERROR][XORG] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045071] [ERROR][XORG] (EE)
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045077] [ERROR][XORG] (EE) Server terminated with error (1). Closing log file.
Jul 18 22:27:22 phoenix bumblebeed[1289]:   866.045082] [ERROR]X did not start properly

Thanks for any help.

Setting modeset=0 to the nouveau module is not sufficient.
You have to blacklist this module and run mkinitrd afterwards and reboot.

Please make also sure that your user has been also added to the bumblebee group.

Yes yes, it was done.

Please post output of

zypper lr -d
sudo lspci
rpm -qa | grep nvidia
ls -l /etc/modprobe.d/*blacklist*

Here you are:
**zypper lr -d
**


#  | Alias                               | Name                                    | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                          | Service
---+-------------------------------------+-----------------------------------------+---------+-----------+---------+----------+--------+------------------------------------------------------------------------------+--------
 1 | Bumblebee                           | Bumblebee                               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_Leap_42.1/ |        
 2 | MEGAsync                            | MEGAsync                                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://mega.nz/linux/MEGAsync/openSUSE_Leap_42.1/                            |        
 3 | ftp.gwdg.de-suse                    | Packman Repository                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/packman/suse/openSUSE_Leap_42.1/                |        
 4 | http-download.opensuse.org-2730695d | Education                               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/Education/openSUSE_Leap_42.1/      |        
 5 | http-download.opensuse.org-a5ed8daa | games:tools                             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/games:/tools/openSUSE_Leap_42.1/   |        
 6 | repo-debug                          | openSUSE-Leap-42.1-Debug                | No      | ----      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/distribution/leap/42.1/repo/oss/          |        
 7 | repo-debug-non-oss                  | openSUSE-Leap-42.1-Debug-Non-Oss        | No      | ----      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/distribution/leap/42.1/repo/non-oss/      |        
 8 | repo-debug-update                   | openSUSE-Leap-42.1-Update-Debug         | No      | ----      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/update/leap/42.1/oss                      |        
 9 | repo-debug-update-non-oss           | openSUSE-Leap-42.1-Update-Debug-Non-Oss | No      | ----      | Yes     |   99     | NONE   | http://download.opensuse.org/debug/update/leap/42.1/non-oss/                 |        
10 | repo-non-oss                        | openSUSE-Leap-42.1-Non-Oss              | No      | ----      | Yes     |   99     | NONE   | http://download.opensuse.org/distribution/leap/42.1/repo/non-oss/            |        
11 | repo-oss                            | openSUSE-Leap-42.1-Oss                  | Yes     | (r ) Yes  | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/leap/42.1/repo/oss/                |        
12 | repo-source                         | openSUSE-Leap-42.1-Source               | No      | ----      | Yes     |   99     | NONE   | http://download.opensuse.org/source/distribution/leap/42.1/repo/oss/         |        
13 | repo-update                         | openSUSE-Leap-42.1-Update               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/42.1/oss/                           |        
14 | repo-update-non-oss                 | openSUSE-Leap-42.1-Update-Non-Oss       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/42.1/non-oss/                       |        

sudo lspci


00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)
00:1f.6 Signal processing controller: Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 640M] (rev ff)
07:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)
08:00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)
09:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI Express Card Reader (rev 01)

rpm -qa | grep nvidia


nvidia-bumblebee-367.27-2.1.x86_64
nvidia-bumblebee-32bit-367.27-2.1.x86_64

ls -l /etc/modprobe.d/blacklist


-rw-r--r-- 1 root root 4628 Jul 18 19:57 /etc/modprobe.d/50-blacklist.conf
-rw-r--r-- 1 root root   35 Jun 25 11:20 /etc/modprobe.d/51-blacklist-nouveau.conf

Just a wild guess since you are getting “permission denied” errors.
Try opening a terminal and issue:


:~> su -
Password: <root password>
:~ # optirun glxspheres

If it works and you see the spheres, open another terminal, issue the following command and check if the result is similar or not to what I see here:


:~> ls -l /dev/nvi*
crw-rw---- 1 root video 195,   0 19 lug 17.02 /dev/nvidia0
crw-rw---- 1 root video 195, 255 19 lug 17.02 /dev/nvidiactl
crw-rw---- 1 root video 248,   0 19 lug 16.11 /dev/nvidia-uvm
:~> 

Your “regular” user must be a member to both the “bumblebee” and the “video” groups.
Occasionally on test or beta installs I saw the /dev/nvidia* files being created with different permissions and that led to “permission denied” and similar errors.

Just for the records, I’m using driver version 364.19 here, not tried 367.27 yet.

No, its dont work…


phoenix:/home/igor/Documents/nvidia # optirun glxgears 
[17012.228165] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied


[17012.228209] [ERROR]Aborting because fallback start is disabled.

And the output is blank:


igor@phoenix:~> ls -l /dev/nvi*
ls: cannot access /dev/nvi*: No such file or directory

mmmm… are you sure the kernel modules were correctly built and loaded? Please check the following:


LT_B:~ # lsmod |grep nvi
nvidia_uvm            757760  0 
nvidia              10223616  19 nvidia_uvm
LT_B:~ # ls /lib/modules/4.1.27-24-default/updates/nvi*
/lib/modules/4.1.27-24-default/updates/nvidia-uvm.ko
/lib/modules/4.1.27-24-default/updates/nvidia.ko
LT_B:~ #

(feel free to adjust the latter command if you are not yet running the latest kernel)

Here it is again blank:
lsmod |grep nvi


phoenix:/home/igor # lsmod | grep nvi
phoenix:/home/igor # 

And here /lib/modules/4.1.27-24-default/updates/nvi* I have this situation:


phoenix:/lib/modules # ls
4.1.12-1-default  4.1.26-21-default  4.1.27-24-default  4.1.27-24-pv  4.1.27-24-xen

But only 4.1.12-1-default contains “update” and its without nvidia:


phoenix:/lib/modules # ls 4.1.12-1-default/updates/nvi*
ls: cannot access 4.1.12-1-default/updates/nvi*: No such file or directory

The Nvidia modules were not even built; please check again the steps you apparently followed at:
https://en.opensuse.org/SDB:NVIDIA_Bumblebee#OPTIONAL:_Install_NVIDIA_driver

In particular, check that you have installed:
linux-glibc-devel
kernel-devel
kernel-default-devel
dkms

and that “install recommended packages” is set in Yast2-Software if you reinstall something.
If everything goes well, you should see at least the following:


LT_B:~ # ls /usr/src/ |grep NVIDIA-Linux-x86_64-367
NVIDIA-Linux-x86_64-367.27
NVIDIA-Linux-x86_64-367.27.run
NVIDIA-Linux-x86_64-367.27.usage
LT_B:~ # 

If not so, the source Nvidia package has not been even downloaded for some reason.

I also have kernel 4.1.27-24-pv x86_64 installed and though I use nvidia-prime, my nvidia kernel modules ar found at:
/lib/modules/4.1.27-24-pv/weak-updates/updates/
and at:
/lib/modules/4.1.27-24-default/weak-updates/updates/
There I find these modules:
bbswitch.ko nvidia-drm.ko nvidia.ko nvidia-modeset.ko nvidia-uvm.ko

I think the problem is here:


Output of nvidia-bumblebee-367.27-2.1.x86_64.rpm %posttrans script:
    + '' -x /usr/sbin/dkms ']'
    + /usr/sbin/dkms add -m nvidia -v 367.27 --rpm_safe_upgrade
    
    Creating symlink /var/lib/dkms/nvidia/367.27/source ->
                     /usr/src/nvidia-367.27
    
    DKMS: add completed.
    + /usr/sbin/dkms build -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + /usr/sbin/dkms install -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + popd

This is output after:


zypper in nvidia-bumblebee

But the thing is that I already installed and then reinstalled this all:


linux-glibc-devel
kernel-devel
kernel-default-devel
dkms
zypper in -t pattern devel_kernel

Apparently the system tries to build modules for the 4.1.12-1-default kernel, but that kernel (and/or its -devel counterparts) are no more there after recent kernel updates.
Please try:


LT_B:~ # dkms status

Then if modules with version 4.1.12-1-default show up, try:


LT_B:~ # dkms remove -k 4.1.12-1-default

and possibly repeat that for any kernel (or kernel-devel) version that is no more on your system but shows up in the “dkms status” results.
Then force-reinstall nvidia-bumblebee and this time the modules for the existing kernel(s) should be built.
Be aware that building modules may take 3-5 minutes or so. A reboot fits well after all that, don’t panic if you are met by a black screen for a few minutes while modules are being built.

If that doesn’t work, hope that members with better insight are reading and willing to answer this thread :wink:

Okay, I dont sure that I did things right, but here what I recieved:

When I ran dkms status:


phoenix:/home/igor # dkms status 
nvidia, 367.27: added

Then, I deleted all of nvidia:


phoenix:/home/igor # dkms remove nvidia/367.27 --all


------------------------------
Deleting module version: 367.27
completely from the DKMS tree.
------------------------------
Done.

Command:


dkms remove -k 4.1.12-1-default

Does not worked…
I used it like this:


dkms remove nvidia/367.27 -k 4.1.12-1-default

But it returned with error:


phoenix:/home/igor # dkms remove nvidia/367.27 -k 4.1.12-1-default
Error! There is no instance of nvidia 367.27
for kernel 4.1.12-1-default (x86_64) located in the DKMS tree.

After this, I reinstalled nvidia-bumblebee with:


zypper in -f nvidia-bumblebee

And again received this:


Output of nvidia-bumblebee-367.27-2.1.x86_64.rpm %posttrans script:
    ln: failed to create symbolic link '/usr/share/licenses/nvidia-utils/nvidia': File exists
    + '' -x /usr/sbin/dkms ']'
    + /usr/sbin/dkms add -m nvidia -v 367.27 --rpm_safe_upgrade
    
    Creating symlink /var/lib/dkms/nvidia/367.27/source ->
                     /usr/src/nvidia-367.27
    
    DKMS: add completed.
    + /usr/sbin/dkms build -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + /usr/sbin/dkms install -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + popd



Nothing really wrong on your side. Long story short, “nvidia, 367.27: added” means that the driver has been added to the DKMS pipeline for building and installing, but unfortunately the next steps fail…


    DKMS: add completed.
    + /usr/sbin/dkms build -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + /usr/sbin/dkms install -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.

so that building and installing for the 4.1.12-1-default kernel fails and apparently no attempt is made to build and install for other kernel versions that are installed on your system.
I don’t know enough of the DKMS process to debug this (and it is very late at night here BTW).
All I might suggest right now is to check:


LT_B:~ # zypper se -si kernel-de

Maybe you have kernel-default version 4.1.12-1 installed, but not the matching version of kernel-devel and kernel-default-devel : if you did “zypper in -t pattern devel_kernel” only in the last few days, chances are that you only have version 4.1.27-24.1 of the devel packages.

You might try building and installing manually at least for the latest kernel, with:


# /usr/sbin/dkms build -k 4.1.27-24.1-default
# /usr/sbin/dkms install -k 4.1.27-24.1-default

allow a few minutes for the process, then rebuild the initrd, just to keep to the safe side (and does no harm anyway…)


# dracut --host-only --force

then reboot with your fingers crossed.
No blame accepted on my side, I’m just falling asleep :wink:

I am already very thankful for you help!
For me, it is no problem to destroying the system. Its fresh and if needed I will just format “/” partition and start again.

Will fallow your tips and post results.

Installed nvidia-bumblebee 367.27 myself without problems.
Kernel modules were built and installed for the running kernel (4.1.27-24-default) and weak-installed (installed symlinks) for the other kernels still on the system.
So I wonder if you are still running the former 4.1.12 kernel (please check “uname -r” in a terminal) but don’t have the matching -devel packages installed?

This seems to be a problem.
Yesterday I broke my system trying to update kernel.
Today installed fresh image updated and checked kernel, it was:


linux-xnd2:/home/igor # uname -r
4.1.12-1-default

And when I was trying to install bublebee it gave same error…:


Output of nvidia-bumblebee-367.27-2.1.x86_64.rpm %posttrans script:
    + '' -x /usr/sbin/dkms ']'
    + /usr/sbin/dkms add -m nvidia -v 367.27 --rpm_safe_upgrade
    
    Creating symlink /var/lib/dkms/nvidia/367.27/source ->
                     /usr/src/nvidia-367.27
    
    DKMS: add completed.
    + /usr/sbin/dkms build -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + /usr/sbin/dkms install -m nvidia -v 367.27
    Error! echo
    Your kernel headers for kernel 4.1.12-1-default cannot be found at
    /lib/modules/4.1.12-1-default/build or /lib/modules/4.1.12-1-default/source.
    + popd

There is some way to discover why my kerner wont update itself?

Did you reboot after the kernel update? Can you force booting to the 4.1.27 kernel (in the advanced options at the grub bootloader screen)?
Please show result of:


# zypper se -si kernel-de

Yep, I rebooted, I think twice and checked if there are some additional updates, then run “uname -r” and kernel was 4.1.12…

In GRUB I have only two options:
1.Default
2.4.1.12 kernel

And the output:


linux-xnd2:/home/igor # zypper se -si kernel-de
Loading repository data...
Reading installed packages...

S | Name                 | Type    | Version     | Arch   | Repository               
--+----------------------+---------+-------------+--------+--------------------------
i | kernel-default       | package | 4.1.27-24.1 | x86_64 | openSUSE-Leap-42.1-Update
i | kernel-default       | package | 4.1.12-1.1  | x86_64 | openSUSE-Leap-42.1-Oss   
i | kernel-default-devel | package | 4.1.27-24.1 | x86_64 | openSUSE-Leap-42.1-Update
i | kernel-devel         | package | 4.1.27-24.1 | noarch | openSUSE-Leap-42.1-Update

Maybe there is some problem with this Oss repo? Can it obstruct updates?