Use Optimus in Fedora 30 on Predator Helios 300

Linux

NVIDIA Optimus is an optimization technology created by NVIDIA which, depending on the resource load generated by client software applications, will transparently and seamlessly switch between two graphics adapters within a computer system in order to provide either maximum performance or minimum power draw from the system’s graphics rendering hardware. From Bumblebee’s FAQ: Bumblebee is a effort to make NVIDIA Optimus enabled laptops work in GNU/Linux systems. Such feature involves two graphics cards with two different power consumption profiles plugged in a layered way sharing a single framebuffer.

The discrete GPU (NVIDIA) is turned off when not in use and activated and turned on though ACPI calls when demanding OpenGL applications require the extra power the discrete GPU can give.

Demanding OpenGL applications might include such things as 3D games or 3D rendering software but would not include such things as a web browser or a video playback program like mplayer or VLC.


To install the NVIDIA drivers, first add the RPM Fusion repository:

sudo dnf install fedora-workstation-repositories
sudo dnf config-manager rpmfusion-nonfree-nvidia-driver --set-enabled

Then, install the necessary packages:

sudo dnf install akmod-nvidia acpi

To get Bumblebee, we first need to enable the https://copr.fedorainfracloud.org/coprs/chenxiaolong/bumblebee/ chenxiaolong/bumblebee[Copr repository]:

sudo dnf copr enable chenxiaolong/bumblebee

Next, install the bbswitch driver, and the bumblebee and primus packages.

sudo dnf install akmod-bbswitch bumblebee primus

For the optirun and primusrun commands to work, the current user must be added to the bumblebee group.

sudo gpasswd -a $USER bumblebee

Enable the bumblebeed service and disable the nvidia-fallback service. This service comes from the packaged drivers and will attempt to load nouveau if nvidia fails to load. However, when using Bumblebee, neither one should load at boot.

sudo systemctl enable bumblebeed
sudo systemctl mask nvidia-fallback

Finally, reboot and bumblebee should be ready to go.

To check everything is running try Nidia settings panel:

optirun -b none nvidia-settings


Source: https://docs.fedoraproject.org/en-US/quick-docs/bumblebee/index.html


Now to make sure the games you want to play use the right video card run with the optirun command.


I made this for the War Thunder game on Linux, change the name as you need. Add a new launcher to the game you want with the optirun command:

sudo nano ~/.local/share/applications/WarThunder.desktop

The file should have the below in it:

[Desktop Entry]
Comment=
Terminal=false
Name=War Thunder
Exec=optirun -b primus -c :8 /usr/games/WarThunder/launcher %U
Type=Application
Icon=/usr/games/WarThunder/war-thunder.png


I use Windows on one SSD and Fedora on the other SSD as my main OS. I keep Windows for the occasional Windows only needs like updating the BIOS.
With the last BIOS update Secure Boot was enabled and bbswitch (part of Bumblebee) failed to load so optirun would not work.
Go to the BIOS by pressing F2 soon as you turn on the laptop and change Secure Boot to Disabled to get Bumblebee to work again.