You are not logged in.

#1 2018-09-12 18:00

DorianDotSlash
Member
Registered: 2018-09-12
Posts: 34

Installing bumblebee for Nvidia Optimus dual GPU's

I never saw a direct reference to this document, so I thought I would post it here.

I was able to easily use these instruction to get my Optimus hybrid graphics up and running in Q4OS 2.6.

It's as simple as executing these two commands:

sudo apt-get install bumblebee-nvidia primus 
sudo adduser $USER bumblebee

The adduser command notified me that my username was already in the group, but it doesn't hurt to do it just to confirm.

Optimus graphics sometimes have ACPI issues with certain laptop models in Linux which causes booting problems.  So before rebooting, edit the /etc/default/grub file (sudo required) and search for the line that starts with "GRUB_CMDLINE_LINUX_DEFAULT="

At the end of that line but before the closing double-quote ", add

acpi_osi=! aspi_osi='Windows 2009'

Save the file and perform a

sudo update-grub

Then reboot.  Once up and running again, you should be using the Intel GPU, and can execute application and games under the Nvidia GPU by preceeding a command with optirun or primusrun (I get a warning using primusrun even though it works, so I use optirun).

All my Steam games work great, and Blender can now run using my Nvidia GPU.  Note that in order to get Steam running, I installed it from the repos as per normal, but I had to run the following to get it to actually start:

sudo apt install libgl1-glvnd-nvidia-glx:i386

I plan to also try this with 3.3 for testing purposes, and I hope that Optimus/bumblebee is still supported in Buster since most distros don't support it anymore.  More and more laptops are coming with dual GPU's to extend battery life, so this is an important feature to keep.

Everything is running great now!  I hope this helps out anyone else with the Optimus graphics.

Cheers!
-Dorian

Last edited by DorianDotSlash (2018-09-16 03:48)

Offline

#2 2018-09-16 03:55

DorianDotSlash
Member
Registered: 2018-09-12
Posts: 34

Re: Installing bumblebee for Nvidia Optimus dual GPU's

(EDIT/UPDATE)

Got bumblebee working in 3.3 with the same steps as above, however, before installing libgl1-glvnd-nvidia-glx:i386 I had to run the following:

sudo dpkg --add-architecture i386

I also had to create symlinks for the following libs;

/usr/lib/x86_64-linux-gnu/libGL.so.1 --> /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1
/usr/lib/i386-linux-gnu/libGL.so.1 --> /usr/lib/i386-linux-gnu/nvidia/libGL.so.1

Running "optirun glxgears" only brings up a black window.  In order to run applications on the Nvidia GPU using optirun, you need to use the following:

__GLVND_DISALLOW_PATCHING=1 optirun glxgears

NOTE that the code above starts with TWO underscores before GLVND which doesn't show well in this forum post.
Replace "glxgears" with whatever application you're trying to run.

EDIT #2 : Edit /etc/environment and add the following;

__GLVND_DISALLOW_PATCHING=1

Then logout and log back in.  Now you can simply run "optirun glxgears" (and replace glxgears with whichever program you want to run).

Last edited by DorianDotSlash (2018-09-25 04:57)

Offline

#3 2018-09-19 16:44

DorianDotSlash
Member
Registered: 2018-09-12
Posts: 34

Re: Installing bumblebee for Nvidia Optimus dual GPU's

I've encountered some issues with optirun in 3.3 after running some games.  Issue is not game-specific and doesn't happen every time.

The games run well under the Nvidia GPU, however, sometimes after exiting to the desktop, all the window decoration/titlebars of any open programs are gone, and the task manager (taskbar/panel) is frozen.  Logging out and back in restores them.

Still looking into the cause.  I'm aware that this is still all unstable at this point so I may have to wait until further updates come down upstream.  I'm assuming I would file a bug report on the Debian side?

Last edited by DorianDotSlash (2018-09-19 16:44)

Offline

#4 2018-09-19 17:32

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,223
Website

Re: Installing bumblebee for Nvidia Optimus dual GPU's

Did you encounter issues in Trinity, Plasma or another DE ? Reporting could be helpful, please post the link, if proceeded.

Offline

#5 2018-09-19 19:19

DorianDotSlash
Member
Registered: 2018-09-12
Posts: 34

Re: Installing bumblebee for Nvidia Optimus dual GPU's

q4osteam wrote:

Did you encounter issues in Trinity, Plasma or another DE ? Reporting could be helpful, please post the link, if proceeded.

The issue was in KDE Plasma.  I haven't been able to replicate it in Trinity, but will keep trying since as I said, it doesn't happen every time.

I haven't reported anything yet on the Debian side, but when I do I will post a link here.

Offline

#6 2018-09-25 05:02

DorianDotSlash
Member
Registered: 2018-09-12
Posts: 34

Re: Installing bumblebee for Nvidia Optimus dual GPU's

Haven't had issues in several days.

Added an update to post #2 to edit /etc/environment.

Offline

#7 2019-01-26 21:55

sickpig
Member
Registered: 2019-01-08
Posts: 52

Re: Installing bumblebee for Nvidia Optimus dual GPU's

thanks for this tip
i was thinking of installing nvidia drivers the other day
this could be helpful

would u guys know if browsers use nvidia gpu for video or graphics in linux?
my main use is browser, if it doesn't then for me there is no point in installing something extra

thanks.

Offline

#8 2019-02-22 15:16

DorianDotSlash
Member
Registered: 2018-09-12
Posts: 34

Re: Installing bumblebee for Nvidia Optimus dual GPU's

Sorry for the late reply, I've been quite busy the past few months...

The only way for a browser to use the Nvidia GPU is by running it with optirun.  For example "optirun firefox".  You can also change the firefox shortcuts in your OS to automatically do this when you launch it.

Stating that, I don't do this, which means my browsers use the Intel GPU, and it works perfectly fine.  I've never had any issues nor have I found that the performance is impacted in any way.

Offline

Board footer

Powered by FluxBB