Prime-run not firing app with Nvidia - AMD hybrid graphics

Hi All,
I have installed prime by installing video-hybrid-amd-nvidia-prime.
Everything looks fine, see below, but yet, prime-run does not use Nvidia
Any idea / suggestion on what I could check, as I do not have any error that appears ?
Thanks

my config:
ASUS GA401I (Zen G14)

inxi -Fxx

*Graphics: Device-1: NVIDIA TU117M vendor: ASUSTeK driver: nvidia v: 460.39 bus ID: 01:00.0 chip ID: 10de:1f99 *

  •       Device-2: Advanced Micro Devices [AMD/ATI] Renoir vendor: ASUSTeK driver: amdgpu v: kernel bus ID: 04:00.0 *
    
  •       chip ID: 1002:1636 *
    
  •       Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: loaded: modesetting,nvidia *
    
  •       resolution: 1920x1080~60Hz s-dpi: 96* 
    

xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:modesetting
Provider 1: id: 0x248 cap: 0x2, Sink Output crtcs: 4 outputs: 2 associated providers: 1 name:NVIDIA-G0

mhwd -l -d
PCI Device: /devices/pci0000:00/0000:00:01.1/0000:01:00.0 (0300:10de:1f99)
Display controller nVidia Corporation TU117M


INSTALLED:

NAME: video-hybrid-amd-nvidia-prime
ATTACHED: PCI
VERSION: 2020.11.30
INFO: Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source amd driver.
PRIORITY: 7
FREEDRIVER: false
DEPENDS: video-linux
CONFLICTS: videonvidia
CLASSIDS: 0300 0302 0300
VENDORIDS: 10de 1002

NAME: video-linux
ATTACHED: PCI
VERSION: 2018.05.04
INFO: Standard open source drivers.
PRIORITY: 2
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300 0380 0302
VENDORIDS: 1002 8086 10de

glxinfo | grep “OpenGL renderer”
OpenGL renderer string: AMD RENOIR (DRM 3.40.0, 5.10.15-1-MANJARO, LLVM 11.0.1)

prime-run glxinfo | grep “OpenGL renderer”
OpenGL renderer string: GeForce GTX 1650/PCIe/SSE2

prime-run kate
nvidia-smi
±----------------------------------------------------------------------------+
| NVIDIA-SMI 460.39 Driver Version: 460.39 CUDA Version: 11.2 |
|-------------------------------±---------------------±---------------------+
| 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 1650 Off | 00000000:01:00.0 Off | N/A |
| N/A 41C P8 1W / N/A | 5MiB / 3911MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1001 G /usr/lib/Xorg 4MiB |
±----------------------------------------------------------------------------+

Xorg.conf:
Section “Device”
Identifier “iGPU”
Driver “modesetting”
BusID “PCI:4:0:0”
EndSection

Section “Screen”
Identifier “iGPU”
Device “iGPU”
EndSection

Section “Device”
Identifier “dGPU”
Driver “nvidia”
BusID “PCI:1:0:0”
EndSection

/etc/X11/xorg.conf.d/10-prime.conf
Section “ServerLayout”
Identifier “layout”
Screen 0 “iGPU”
Option “AllowNVIDIAGPUScreens”
EndSection

Section “Device”
Identifier “iGPU”
Driver “modesetting”
BusID “PCI:4:0:0”
EndSection

Section “Screen”
Identifier “iGPU”
Device “iGPU”
EndSection

Section “Device”
Identifier “dGPU”
Driver “nvidia”
BusID “PCI:1:0:0”
EndSection

glxinfo | grep “OpenGL renderer”
OpenGL renderer string: AMD RENOIR (DRM 3.40.0, 5.10.15-1-MANJARO, LLVM 11.0.1)

prime-run glxinfo | grep “OpenGL renderer”
OpenGL renderer string: GeForce GTX 1650/PCIe/SSE2

It seems to work tho, did you try other applications other than kate?
Try running the Steam runtime through prime-run if you have it and check nvidia-smi to see if anything Steam related is there.

Hi there,
Thank you so much …
it seems to work …

prime-run steam
±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1145 G /usr/lib/Xorg 24MiB |
| 0 N/A N/A 32528 G …e/Steam/ubuntu12_32/steam 15MiB |
| 0 N/A N/A 32535 G ./steamwebhelper 1MiB |
±----------------------------------------------------------------------------+

I had tried with Firefox, LibreOffice, but it would not work.
Any reason why it will work with some program and other not ?

Thanks

I am not sure, I assume they do not use hardware acceleration ¯\_(ツ)_/¯.

If you use cat on /usr/bin/prime-run

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"

It literally only sets some flags.

Hi, sorry for the late reply
Many thanks for your time and help
I will test deeper running some games then :slight_smile:
Cheers

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