Confused about Nvidia Prime

I’m using Manjaro 20.1.1 on my Dell XPS 15 9500 with XFCE4. Proprietary Nvidia drivers (450.XX) are installed and nvidia-smi shows, that Xorg is running on dedicated GPU already.
I’m a bit confused how Prime is really working in Manjaro.

On Ubuntu 20 there was an extra tab in nvidia-settings to switch between different operation modes (Intel only, Nvidia only, on demand). There was a tool called prime-select too, which I miss in Manjaro.
What I’ve read so far is, that installed “extra/nvidia-prime” is able to auto switch to GPU, isn’t it? But apps are not running on GPU automatically, ex. glxgears and steam are not listed in process list of nvidia-smi, unless I start them explicitly via prime-run.

$ inxi -G
Graphics:  Device-1: Intel UHD Graphics driver: i915 v: kernel 
           Device-2: NVIDIA TU117M [GeForce GTX 1650 Ti Mobile] driver: nvidia v: 450.66 
           Device-3: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo 
           Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia unloaded: intel,nouveau resolution: 1920x1200~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.1.8 


$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
     video-modesetting            2020.01.13                true            PCI
video-hybrid-intel-nvidia-450xx-prime            2019.10.25               false            PCI


$ nvidia-smi
Fri Oct  2 11:56:39 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66       Driver Version: 450.66       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 165...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   47C    P8     3W /  N/A |      5MiB /  3914MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1189      G   /usr/lib/Xorg                       4MiB |
+-----------------------------------------------------------------------------+

So my questions are:

  1. Do I really have to start every app with prime-run explicitely, when I want to run it on GPU?
  2. Is there an easy way (like in nvidia-settings on Ubuntu or via nvidia-prime-applet) to set fixed operation mode (Intel-only, Nvidia-only, on-demand)?
  3. When on-demand is the default operation mode in ArchLinux now, why do I have to start Steam via prime-run then?

EDIT: Are the closed source drivers the reason, that GPU offload does not work? So do I have to use nouveau driver just to have some comfort but with less performance?

Just reading your post.

1 if you have hybrid graphics setup and use nvidia hybrid drivers then yes all applications use the intergrated graphics by default

2 There’s optimus manager and optimus switch which work very similar to Ubuntu implementation where you can switch to whichever you want for that session

3 Yes the open source drivers will take care of everything for you but if you are gaming the nouveau drivers will give pretty bad performance.

What I personally do is use lutris to launch all my game’s and enable prime render offload in lutris settings so all games run on nvidia card

4 Likes

Thanks a lot. I think I’d go with non-free driver and calling prime-run manually. That’s a pity.

Do you have an explanation, why glmark2 runs better on internal graphic than on Nvidia GPU?

$ glmark2
=======================================================
    glmark2 2014.03
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel
    GL_RENDERER:   Mesa Intel(R) UHD Graphics (CML GT2)
    GL_VERSION:    4.6 (Compatibility Profile) Mesa 20.1.8
=======================================================
[build] use-vbo=false: FPS: 4642 FrameTime: 0.215 ms
[build] use-vbo=true: FPS: 4679 FrameTime: 0.214 ms
[texture] texture-filter=nearest: FPS: 4283 FrameTime: 0.233 ms
[texture] texture-filter=linear: FPS: 4298 FrameTime: 0.233 ms
[texture] texture-filter=mipmap: FPS: 4383 FrameTime: 0.228 ms
=======================================================
                                  glmark2 Score: 3162 
=======================================================


$ prime-run glmark2
=======================================================
    glmark2 2014.03
=======================================================
    OpenGL Information
    GL_VENDOR:     NVIDIA Corporation
    GL_RENDERER:   GeForce GTX 1650 Ti/PCIe/SSE2
    GL_VERSION:    4.6.0 NVIDIA 450.66
=======================================================
[build] use-vbo=false: FPS: 2133 FrameTime: 0.469 ms
[build] use-vbo=true: FPS: 2659 FrameTime: 0.376 ms
[texture] texture-filter=nearest: FPS: 2594 FrameTime: 0.386 ms
[texture] texture-filter=linear: FPS: 2646 FrameTime: 0.378 ms
[texture] texture-filter=mipmap: FPS: 2649 FrameTime: 0.378 ms
=======================================================
                                  glmark2 Score: 2356 
=======================================================

It looks a bit like try & error when to use prime-run and when not!?

Tbh I thought a bit like that at first but I know prefer prime-run over optimus switch or optimus manager (the Ubuntu way). Other than games (which automatically use my nvidia card in lutris) the only other thing I’d need my nvidia card for is blender or video editing. Its very easy to edit your desktop launcher icons and put prime-run in front of the launch command.

What sort of things do you use your pc for is probably the better question. On my old laptop I was running mint with neaveau drivers because I didn’t game on it. I tried the optimus switch on manjaro but honestly I only ever switched to nvidia when gaming so prime works fine for me

1 Like

The 450 series is a dog. Try the 440 series and see if you can get better performance out of that.

We’d need the CPU model number so an inxi --admin --verbosity=7 --filter --no-host would be the minimum required information… (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)

The above is a small little :gem: that will make your life much easier! (for games at least) and for other applications I agree with:

:innocent:

1 Like

Thanks for all your replies. As my XPS15 9500 is very new, I had some minor issues with Ubuntu and LinuxMint, but after installing latest Manjaro I’m pretty happy now, that systems seems to run stable. So I don’t try to touch the running system and stick with 450.66 drivers and work with prime-run.
glmark2 does not seem to be an appropriate benchmark tool. Using GFXBench there is a clear difference between running on Intel graphics and running with active prime-run for its high-level tests.
Using 3D acceleration in VirtualBox is a pain still. But it is necessary for me, as I have to use some Windows programs for my daily work.
Thread can be closed.

I’ve marked the below answer as the solution to your question as it is by far the best answer you’ll get.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (I just want to avoid even more subjective opinions being posted and confusing you even more)

:innocent:
P.S. In the future, please mark a solution like this:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.