Some laptops comes with "Hybrid Graphics", meaning they have two GPU: one is usually "internal" (or "integrated") into the CPU, and is called IGP (Integrated Graphic Processor), and the other is "dedicated", external to the CPU, and it is called "discrete" (DGP, Discrete/Dedicated Graphics Processor). The integrated is power efficient, while the discrete is faster.
Owners of NVIDIA Optimus laptops (integrated Intel or AMD/ATI CPU+GPU, plus a discrete NVIDIA GPU) now have three ways to benefit from the power of their NVIDIA GPU:
- The free Nouveau drivers support Prime GPU offloading out of the box, which can be used via the DRI_PRIME=1 environment variable (unless the proprietary NVIDIA driver is in use by, e.g., Mageia-prime). Refer to the Nouveau documentation to see how to configure Xorg to use NVIDIA Prime with DRI3.
- The Bumblebee package can be used to bridge the monitor to the NVIDIA GPU, allowing to access its processing power albeit with some overhead.
- This new tool Mageia-prime for Optimus described on this page can be used to configure the NVIDIA Prime supported by recent Linux kernels and Xorg servers. It allows to fully switch to using the NVIDIA GPU without the overhead of Bumblebee, and is particularly suited for use with CUDA.
In all three cases, when configuring the graphics drivers, one must during install and the usual Mageia tools configure only the integrated GPU (at least in most Optimus configurations), as it is typically the only one physically connected to a monitor. (If failing, try the other way around.)
Mageia-prime is a tool which allows you to easily configure NVIDIA Prime for using the discrete graphics card with the NVIDIA proprietary drivers within the Mageia GNU/Linux distribution.
Actually there are four combinations of configurations NVIDIA/Intel. Between all the combinations, the most popular is considering the NVIDIA laptop graphics card in a way similar to a desktop card.
Using NVIDIA card alone
Quick instructions are:
- configure your card as usual as an Intel card from XFdrake (or MCC).
- run from a terminal with root privileges and then reboot:
If everything works fine, at next reboot, you'll get the Xorg configured as NVIDIA. You can check that the switch has actually been executed, running for instance one of the following utilities: glxinfo, glinfo, clinfo, nvidia-settings, cuda-z, checking /var/log/Xorg.0.log, typing "about:gpu" in chromium-browser, typing "about:support" in firefox, and some further benchmark like glxgears, glxspheres64, glmark2, etc., which should show also the increase of performance. blender should also work with CUDA rendering in Cycles.
- to go back to the integrated GPU, run:
Switching between cards
Once all the kernel modules are built, you can quickly switch back and forth between NVIDIA and the inegrated GPU, without rebooting, but just by restarting X11, using:
mageia-prime-install -z mageia-prime-uninstall -z
which will zap X11 for you.
With NVIDIA driver version >= 435.xx you can use prime render offloading, which starts X11 with the integrated GPU, and render with NVIDIA GPU:
The option for enabling it with 'mageia-prime-install -p -f' instead of just 'mageia-prime-install', and then render, is using:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia <application>
and there is a wrapper for doing the same with
Note that in this way some application would work (e.g. benchmark works), some other doesn't, e.g. if you start chromium-browser under prime offload, you get it don't starting with acceleration enabled as you can check with "about:gpu". We are not sure why this happens, probably because there aren't available all the GLX visuals in offloading mode. Also in this way the performance are not that different from the integrated card, though this might depend on which integrated and which NVIDIA card you have. If you have a GTX 3080 mobile probably the offloading is faster anyway.
Other power saving methods
See our Power saving page.
By switching from one mode to the other, you will encounter different performance level. As an example, on an Intel / Nvidia 920M configuration, the results for glxsphere64 (with vblank set to 0)are the following :
- 290Mbits / sec on Intel
- 253Mbits / sec on Intel with offloading to Nvidia
- 690Mbits / sec on Nvidia
But in game, this performance gap is not reflected and the offloading mode can be almost similar to the Nvidia mode (lutris + starcraft2)
If you are interested in gaming, Lutris can be an option.
There is an integration of the Nvidia prime offloading system available.
Select wine configuration or your game configuration. Go to System options and select both "use discret graphics" and "use Nvidia prime render offloading"
If later on you decide to switch off the offloading you will need to disable that option to play.