From Mageia wiki
Jump to: navigation, search
(-3 option no more mandatory)
m (Using Nvidia card alone)
Line 20: Line 20:
 
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.
 
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 Intel graphics card, run:
+
* to go back to the Intel graphics card, run:
 
  mageia-prime-uninstall
 
  mageia-prime-uninstall
  

Revision as of 08:03, 5 February 2021

this page is a draft.
It requires improvements. If you want to improve it, simply log in and click on the Edit tab.

Please remove this {{Draft}}template, when you're sure the page is complete and correct.


View the other draft pages, or other pages to improve and maintain.

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.

Most of nowadays laptops have a graphic subsystem called "Hybrid-Graphics", i.e they come with two graphics cards: 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).

So a typical laptop configuration could have two cards: an internal Intel graphics card (e.g. Intel HD Graphics 530), and a discrete NVidia graphics card (e.g. NVidia GeForce GTX 960M), even though other configurations could be also possible.

The default X11 installation is typically using the internal graphics card, which is usually slower (though it consumes less energy power) than the discrete one.

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:
mageia-prime-install
reboot
Note:
The option '-3' (i.e. mageia-prime-install -3') will force using the nvidia390, but normally it is detected. This driver is yet untested on a real "390.xx" card. Feedback is welcome.

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 Intel graphics card, run:
mageia-prime-uninstall

Switching between cards

Once all the kernel modules are built, you can quickly switch back and forth between NVidia and Intel, without rebooting, but just by restarting X11, using:

mageia-prime-install -z
mageia-prime-uninstall -z

which will zap X11 for you.

Offloading

With NVIDIA driver version >= 435.xx you can use prime render offloading, which starts X11 with intel and render with nvidia GPU:

https://download.nvidia.com/XFree86/Linux-x86_64/460.39/README/primerenderoffload.html

The option for enabling it with 'mageia-prime-install -p' 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

mageia-prime-offload-run <application>

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 Intel card, though this might depend on which Nvidia card you have. If you have a GTX 3080 mobile probably the offloading is faster anyway.