Uninstall bumblebee and nvidia driver from rpmfusion if installed.
$ sudo dnf remove *nvidia* akmod-bbswitch bumblebee primus
Add negativo17’s repo:
$ sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
Install NVIDIA driver:
$ sudo dnf install nvidia-driver nvidia-driver-libs.i686
Create wrapper script /usr/local/bin/prime
:
#!/bin/bash
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
$@
To run a program with NVIDIA card:
$ prime <program>
Let’s check if it works:
$ glxinfo | grep vendor # run with igpu
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel Open Source Technology Center
$ prime glxinfo | grep vendor # run with NVIDIA
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation