NVIDIA Bumblebee on my notebook would get broken from time to time (WITH NVIDIA DRIVERS). After that happens I would always get the famous:
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
or
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied
And after this I had to remove all nvidia and bumblebee stuff and hope I can get a working setup again (the only solution I found online that worked for me). Today I finally tried again after having it broken for months (I think it can break for me if losing power while nvidia is off (on shutdown it would turn it on normally), or if one of many other things go wrong (e.g. for me today while testing: running optirun -b primus)).
But what atm restores it for me is this:
#WHILE NVIDIA IS RUNNING:
zypper in -f bbswitch-kmp-desktop-0.8_k3.16.6_2-22.1 bbswitch && depmod -a && mkinitrd && reboot
I use ‘bbswitch-kmp-desktop-0.8_k3.16.6_2-22.1’ to be sure I get the version from Bumblebee repo, change the version to the current one! Make sure you get both of these from Bumblebee repo!!!
The important thing is that nvidia must be running while you do that!!! E.g. call the following first:
tee /proc/acpi/bbswitch <<<ON
modprobe nvidia_drm
modprobe nvidia_modeset
modprobe nvidia_uvm
modprobe nvidia
Hope this can help someone.