Bumblebee and Primus "How To" For Your Hybrid GPU (BookwormPup64 and other Puppies that have apt)

Moderator: Forum moderators

Post Reply
User avatar
jp734
Posts: 251
Joined: Fri Jul 17, 2020 10:23 pm
Has thanked: 112 times
Been thanked: 102 times

Bumblebee and Primus "How To" For Your Hybrid GPU (BookwormPup64 and other Puppies that have apt)

Post by jp734 »

A quick note:
- You might have to remove ALL configurations you may have pertaining to your discrete nvidia gpu in /etc/X11/xorg.conf and /etc/X11/xorg.conf.d
- Steps mentioned here are for BookwormPup64 but might still work on any debian based distro OR other distros if you can install the applications using your package manager
- Other handy resources: https://wiki.debian.org/Bumblebee and https://wiki.archlinux.org/title/Bumblebee

Now let's get to it!

1. BIOS Setting

You need to set the gpu setting in bios to hybrid mode. NOT discrete.

2. GPU Driver

For nouveau driver, no further step necessary. If planning on using the BookwormPup64 proprietary NVidia driver, you can follow the steps here to properly install: viewtopic.php?t=12134 (WARNING: FOR BOOKWORMPUP64 ONLY). For other OS, install the driver using your package manager.

3. Bumblebee and Primus

For nouveau users, you will need to install bumblebee and primus

Code: Select all

#apt install bumblebee primus

For nvidia, you will have to install bumblebee-nvidia and primus-nvidia

Code: Select all

#apt install bumblebee-nvidia primus-nvidia 

4. Bumblebee configuration

Bumblebee installation will create an empty folder /etc/bumblebee/xorg.conf.d. You need to create a dummy file in this folder. Example “10-dummy.conf”. Once created, open a terminal window and run:

Code: Select all

#touch /etc/bumblebee/xorg.conf.d/10-dummy.conf

By default, configuration files under /etc/bumblebee should work the way it is but if you encounter some problems, here are a few things you can check

/etc/bumblebee/bumblebee.conf configuration file

Code: Select all

line 32: Bridge=auto; you can change to Bridge=primus
lines 38, 60 and 63: Double check all library paths are correct. I’m using bookwormpup64 10.0.7 and the default settings worked for me

/etc/bumblebee/xorg.conf.nvidia configuration file

Code: Select all

line 19: #BusID "PCI:01:00:0"  -  The BusID is commented out by default, you can manually set this if the server is having trouble detecting your device


5. Bumblebee Group User

Not sure if this step is really needed since puppy is “root”, unless you set an app to be ran as spot. You’ll need to add a user to the bumblebee group. (I personally added root and spot. Wanted to be sure)

Code: Select all

#gpasswd -a “username” bumblebee

6. START/STOP Bumblebeed Daemon

Now that all configurations are set, you need to restart the daemon for all the changes to take effect.

Code: Select all

 #/etc/init.d/bumblebeed stop
 #/etc/init.d/bumblebeed start

7. Time to test.

For testing purposes, I installed mesa-utils. Also installed nvtop and nvidia-smi (System Management Interface) to monitor. (NOTE: I find mesa-utils glxgears AND opening nvidia-settings with optirun more assuring.)

Code: Select all

#apt install mesa-utils nvtop nvidia-smi

Do the test. (At this point, you will probably need to reboot your PC after installing nvidia driver if you haven't done so yet)

Code: Select all

#primusrun glxgears -info OR #optirun glxgears -info

If everything is properly configured, and I believe it should work for both nouveau and nvidia drivers though I have not tested nouveau, you should see something like the one below and a window with spinning wheels/gears

Code: Select all

# primusrun glxgears -info
GL_RENDERER	= Quadro M1200/PCIe/SSE2
GL_VERSION	= 4.6.0 NVIDIA 535.183.01
GL_VENDOR	= NVIDIA Corporation

If you have nvtop up and running, you should see a usage percentile and the temperature rising for nvidia gpu (I have not tested nvtop and nvidia-smi using nouveau driver)

For the proprietary nvidia driver, you can also test by opening two terminal windows and doing the following:

first window, execute:

Code: Select all

#nvidia-settings

second window, execute nvidia-settings with optirun

Code: Select all

#optirun -b none nvidia-settings -c :8

Now compare and you should see a difference between the two. nvidia-settings window executed with optirun should display more information compared to the one without.

8. Time To Run A Program

You can use primusrun or optirun to launch a program. With optirun, you will need to call the bridging option (-b) and the acceleration rendering bridge (primus)

Code: Select all

#primusrun defaultbrowser

OR
	
#optirun -b primus defaultbrowser
Last edited by bigpup on Sat Jul 20, 2024 3:33 am, edited 1 time in total.
Reason: Added Puppy versions to subject

The Art of Magic and The Magic of Art

Post Reply

Return to “Graphics/Video”