How to install and use bumblebee on dual graphics laptop

Hello
I got a Dell Precision 7710 laptop with Intel + Quadro gpu.
I installed tumpleweed.
I want to install the bumblebee (i don’t want to use PRIME render as it has limits that make it not useful to my needs).
I am trying the instructions here: SDB:NVIDIA Bumblebee - openSUSE Wiki
But the instructions are not up to date probable.
mkinitrd command doesn’t exist. What should i run instead? make modules_install doesn’t run either.
And although i follow all other commands, bumblebee says that can’t find module nvidia.
dkms status says: nvidia/450.66: added

Nvidia settings don’t run too, give errors:

ERROR: libnvidia-gtk3.so.450.66: cannot open shared object file: No such file or directory
       libnvidia-gtk3.so: cannot open shared object file: No such file or directory
       libnvidia-gtk2.so.450.66: cannot open shared object file: No such file or directory
       libnvidia-gtk2.so: cannot open shared object file: No such file or directory

What am i missing, or bumblebee is not anymore supported on opensuse?

UPDATE

i just tried reinstalling nvidia-bumblebee and saw the following build error:

 CONFTEST: drm_alpha_blending_available
  CC [M]  /var/lib/dkms/nvidia/450.66/build/nvidia/nv-frontend.o
In file included from /var/lib/dkms/nvidia/450.66/build/nvidia/nv-frontend.c:12:
/var/lib/dkms/nvidia/450.66/build/common/inc/os-interface.h:27:10: fatal error: stdarg.h: Δεν υπάρχει τέτοιο >
   27 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-6.4.6-1/scripts/Makefile.build:253: /var/lib/dkms/nvidia/450.66/build/nvidia/nv->
make[2]: *** [/usr/src/linux-6.4.6-1/Makefile:2049: /var/lib/dkms/nvidia/450.66/build] Error 2
make[1]: *** [Makefile:226: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-6.4.6-1'
make: *** [Makefile:81: modules] Error 2

@gerstavros Hi, What desktop, are you running X11 or Wayland?

You need to look at suse-prime and see if that works not bumblebee…

The module your using is old for that GPU, can you post the output from inxi -Gxxz?

You can also likely run the open source driver as well…

Yes, mkinitrd is long gone, dracut -f (–regenerate-all can be added AFAIK) instead, but should not be needed these days…

See https://en.opensuse.org/SDB:NVIDIA_SUSE_Prime

Hello, i just updated op with the problem. driver building fails. That’s why module is not found.
I will try nouveau, but 3d acceleration is usually bad with it.
suse-prime needs relogin on every gpu change, doesn’t support dynamic change as bumblebee, according to wiki, so it’s not suitable for my use.

Graphics:
  Device-1: Intel HD Graphics 530 vendor: Dell driver: i915 v: kernel
    arch: Gen-9 ports: active: eDP-1 empty: DP-1, DP-2, DP-3, HDMI-A-1,
    HDMI-A-2, HDMI-A-3 bus-ID: 00:02.0 chip-ID: 8086:191b
  Device-2: NVIDIA GM204GLM [Quadro M3000M] vendor: Dell driver: N/A
    arch: Maxwell pcie: speed: Unknown lanes: 63 bus-ID: 01:00.0
    chip-ID: 10de:13fa
  Device-3: Sunplus Innovation Dell E5570 integrated webcam driver: uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-11:5
    chip-ID: 1bcf:2b91
  Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_wayland driver: X: loaded: modesetting unloaded: fbdev,vesa
    alternate: intel dri: iris gpu: i915 display-ID: 0
  Monitor-1: eDP-1 res: 1920x1080 size: N/A
  API: OpenGL v: 4.6 Mesa 23.1.4 renderer: Mesa Intel HD Graphics 530 (SKL
    GT2) direct-render: Yes

##UPDATE##
With nouveau i get [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "nouveau" (module does not exist, 0)

@gerstavros your card is supported with the latest G06 AFAIK…

You can run offload with suse-prime, but again Prime Render Offload may be better to deploy a task with the nvidia gpu?

Are you using the repo or the run file?

Quadro M3000M is a 2015 model, is supported by nvidia-bumblebee. The problem is that driver package doesn’t install. Something like stdarg.h doesn’t exist. Where could i file a bug for this?

I installed it from the repo mentioned on wiki. Is there other source probable uptodated?

What do you mean suse-prime? To uninstall bumblebee and follow this → SDB:NVIDIA SUSE Prime - openSUSE Wiki ?

@gerstavros See https://www.nvidia.com/Download/driverResults.aspx/209261/en-us/ Nvidia supports GPU’s for 10 years, so still have a few more to got with that model and the G06 driver… the 450 one is not supported with the kernel in Tumbleweed, 470 series yes.

The G06 should work with bumblebee, but that is getting old, suse-prime or Prime Render Offload (which is what bumblebee does?).

Well, installed G06 and tried suse-prime: It’s really much unpractical as bumblebee, as it actually needs a whole REBOOT to switch gpu (restarting X server doesn’t switch gpu, as mentioned on the wiki!).
Tried bumblebee again but doesn’t find GPU with the G06. Any clue how to make it see G06 driver?

@gerstavros remove the suse-prime stuff and make sure there is no nvidia xorg.conf file left. Suggest switch back to intel, then remove.

Then once that’s done, reboot, so you don’t have any xorg type file related to nvidia, then run the command xrandr --listproviders does this show both cards?

yes

Providers: number : 2
Provider 0: id: 0x48; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 3; outputs: 7; associated providers: 1; name: modesetting
    output eDP-1
    output DP-1
    output HDMI-1
    output DP-2
    output HDMI-2
    output DP-3
    output HDMI-3
Provider 1: id: 0x2a2; cap: 0x2 (Sink Output); crtcs: 4; outputs: 7; associated providers: 1; name: NVIDIA-G0
    output VGA-1-0
    output DP-1-0
    output DP-1-1
    output DP-1-2
    output DP-1-3
    output DP-1-4
    output DP-1-5

also driver seems installed now

~> inxi -G
Graphics:
  Device-1: Intel HD Graphics 530 driver: i915 v: kernel
  Device-2: NVIDIA GM204GLM [Quadro M3000M] driver: nvidia v: 535.86.05
  Device-3: Sunplus Innovation Dell E5570 integrated webcam driver: uvcvideo
    type: USB
  Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,vesa dri: iris gpu: i915
    resolution: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 23.1.5 renderer: Mesa Intel HD Graphics 530 (SKL
    GT2)

I just installed again bumblebee without it’s driver. I fixed the nvidia driver’s libraries locations on bumblebee.conf and now optirun seems to work.
Glmark2 doesn’t run ([VGL] /usr/lib64/libvglfaker.so: undefined symbol: glXGetProcAddressARB error which seems it’s an old opensuse problem not fixed yet) but glxgears work.
However seems nvidia is always on. also primus-32bit doesn’t install.
I ll try to figure these out and try some steam games

Nothing actually runs…

Loading "libGPUMonitor_x64.so"...
Loading "libGL.so.1"...
GLWrapper::init(): can't find "glCullFace" function in "libGL.so.1" library
GLWrapper::init(): can't find "glFrontFace" function in "libGL.so.1" library
GLWrapper::init(): can't find "glHint" function in "libGL.so.1" library
GLWrapper::init(): can't find "glLineWidth" function in "libGL.so.1" library
GLWrapper::init(): can't find "glPointSize" function in "libGL.so.1" library
GLWrapper::init(): can't find "glPolygonMode" function in "libGL.so.1" library
GLWrapper::init(): can't find "glScissor" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexParameterf" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexParameterfv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexParameteri" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexParameteriv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexImage1D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexImage2D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glClear" function in "libGL.so.1" library
GLWrapper::init(): can't find "glClearColor" function in "libGL.so.1" library
GLWrapper::init(): can't find "glClearStencil" function in "libGL.so.1" library
GLWrapper::init(): can't find "glClearDepth" function in "libGL.so.1" library
GLWrapper::init(): can't find "glStencilMask" function in "libGL.so.1" library
GLWrapper::init(): can't find "glColorMask" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDepthMask" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDisable" function in "libGL.so.1" library
GLWrapper::init(): can't find "glEnable" function in "libGL.so.1" library
GLWrapper::init(): can't find "glBlendFunc" function in "libGL.so.1" library
GLWrapper::init(): can't find "glLogicOp" function in "libGL.so.1" library
GLWrapper::init(): can't find "glStencilFunc" function in "libGL.so.1" library
GLWrapper::init(): can't find "glStencilOp" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDepthFunc" function in "libGL.so.1" library
GLWrapper::init(): can't find "glPixelStoref" function in "libGL.so.1" library
GLWrapper::init(): can't find "glPixelStorei" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetError" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetTexImage" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetTexParameterfv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetTexParameteriv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetTexLevelParameterfv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetTexLevelParameteriv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glIsEnabled" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDepthRange" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDrawArrays" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDrawElements" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGetPointerv" function in "libGL.so.1" library
GLWrapper::init(): can't find "glPolygonOffset" function in "libGL.so.1" library
GLWrapper::init(): can't find "glCopyTexImage1D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glCopyTexImage2D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glCopyTexSubImage1D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glCopyTexSubImage2D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexSubImage1D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glTexSubImage2D" function in "libGL.so.1" library
GLWrapper::init(): can't find "glBindTexture" function in "libGL.so.1" library
GLWrapper::init(): can't find "glDeleteTextures" function in "libGL.so.1" library
GLWrapper::init(): can't find "glGenTextures" function in "libGL.so.1" library
GLWrapper::init(): can't find "glIsTexture" function in "libGL.so.1" library
Loading "libopenal.so.1"...
Set 1920x1080 fullscreen video mode
[VGL] ERROR: Could not load GLX/OpenGL functions
[VGL]    /usr/lib64/libvglfaker.so: undefined symbol: glXGetProcAddressARB

I cannot find any solution for these.

@gerstavros So you don’t need Bumblebee to use the Nvidia card with Prime Render Offload.

All you need is to install switcheroo-control, start and enable the switcheroo-control.serviceand use switcherooctl to start the applications your wanting to use the nvidia GPU, or applications that autodetect it’s presence…

 switcherooctl list
Device: 0
  Name:        NVIDIA Corporation TU117GLM [Quadro T400 Mobile]
  Default:     yes
  Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only

Device: 1
  Name:        NVIDIA Corporation GP104GL [Tesla P4]
  Default:     no
  Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only


glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA T400/PCIe/SSE2

switcherooctl glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Tesla P4/PCIe/SSE2

FWIW, I’ve done the above with also an intel/amd/(multiple) nvidia card setup on other hardware and been able to switch cards without issues.

1 Like

Thanks. switcherooctl works fine on what i tried now (haven’t 32bit apps yet). I think that it should be the standard option on wiki. Someone with better knowledge over dual gpu setups should update the wiki, which is old and has some things that exist on SLE and not on Opensuse too.

Steam seems that uses nvidia anyway, without running with switcheroo, is that true?

@gerstavros could very well be the case of auto detection, alas I don’t use steam…