Sunday, April 28, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3269  / 2 Years ago, sun, june 19, 2022, 2:42:04

For some flatpak applications, it is better to use the dedicated GPU but how do you ensure that PRIME is offloading correctly when you cant run the usual testing commands inside the sandboxed applciations?


More From » nvidia-prime

 Answers
3

Check that PRIME offloading is working



  1. This is better answered in this question: https://askubuntu.com/a/1316539/253247

  2. Install the flatpak GPUViewer application.


Set Application for offloading


Then you must change add the required environment variables in order to activate the GPU offloading:


via cli


# for OPENGL
flatpak override --env="__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia" full.application.Name
# for vulkan
flatpak override --env="__NV_PRIME_RENDER_OFFLOAD=1" full.application.Name

# for our testing we will do OpenGL with the GPUViewer application
flatpak override --env="__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia" io.github.arunsivaramanneo.GPUViewer

Flatseal


flatseal setting GPUViewer to use PRIME offloading


Testing


Launch GPUViewer and go to the OpenGL tab, You should see the Nvidia graphics cards selected. If it still shows the Intel card then the offloading is not working.


enter image description here


[#1929] Sunday, June 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
quivedge

Total Points: 223
Total Questions: 116
Total Answers: 124

Location: Slovenia
Member since Wed, Apr 6, 2022
2 Years ago
quivedge questions
Thu, Jan 27, 22, 11:32, 2 Years ago
Tue, Dec 14, 21, 13:41, 2 Years ago
Fri, Nov 18, 22, 06:14, 1 Year ago
;