Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
prime-run not using my hybrid gpu
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Wed Jul 10, 2024 6:16 am    Post subject: prime-run not using my hybrid gpu Reply with quote

so hello i started using laptopt recently for my gentoo, my first time laptopt i have some issues using that dedictated nvidia gpu
i red this guide
file:///usr/share/doc/nvidia-drivers-550.90.07/html/primerenderoffload.html
didnt helped, even with their command the vkcude still runs on 100% cpu

i tried
Code:
prime-run glxinfo | grep "OpenGL renderer string"

and to ym suprise it said my gpu
Code:

$ prime-run glxinfo | grep "OpenGL renderer string"
OpenGL renderer string: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2



also this xorg error log
Code:

 grep -E 'WW|EE' /var/log/Xorg.0.log
[    19.863] Current Operating System: Linux gentoo-work 6.6.35-gentoo-dist #1 SMP PREEMPT_DYNAMIC Fri Jun 21 15:41:29 -00 2024 x86_64
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    19.864] (WW) The directory "/usr/share/fonts/misc" does not exist.
[    19.864] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[    19.864] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    19.864] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    19.864] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[    19.864] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[    19.891] (WW) Warning, couldn't open module intel
[    19.891] (EE) Failed to load module "intel" (module does not exist, 0)
[    19.892] (WW) Warning, couldn't open module nouveau
[    19.892] (EE) Failed to load module "nouveau" (module does not exist, 0)
[    19.892] (WW) Warning, couldn't open module nv
[    19.892] (EE) Failed to load module "nv" (module does not exist, 0)
[    19.893] (WW) Warning, couldn't open module fbdev
[    19.893] (EE) Failed to load module "fbdev" (module does not exist, 0)
[    19.893] (WW) Warning, couldn't open module vesa
[    19.893] (EE) Failed to load module "vesa" (module does not exist, 0)
[    20.386] (WW) NVIDIA(G0): Unable to get display device for DPI computation.
[    20.683] (II) Initializing extension MIT-SCREEN-SAVER


i even put this stuff into enviroment
Code:

__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia


i fell like this could be the issue it said providers - and outputs 0

Code:

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x46 cap: 0x2, Sink Output crtcs: 4 outputs: 4 associated providers: 0 name:modesetting
Provider 1: id: 0x256 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0


so my displays are not probably using my gpu? but how would i do that?

i only have this in make.conf
Code:
VIDEO_CARDS="nvidia"


what other optiosn should i try? i think i should just boot off with my nvidia gpu, because even my windows and browser is tearing and lagging, but how would i do that?
couldnt find anything relevant here

i am using KDE5 plasma on gentoo, with systemd

also in my kde system info it said its using llvmpipe for its graphic processing

also have noticed that my performance on gpu vs cpu is gpu way worse
Back to top
View user's profile Send private message
Cruslan
n00b
n00b


Joined: 06 Jan 2024
Posts: 26

PostPosted: Wed Jul 10, 2024 3:55 pm    Post subject: Reply with quote

In MUXless systems, you cant use your dGPU for direct output. You should only use PRIME Render Offload on games and apps that requires dGPU acceleration. Use iGPU on KDE, most times only option is iGPU. You can force Vulkan by "__VK_LAYER_NV_optimus=NVIDIA_only" variable.
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Fri Jul 12, 2024 1:47 pm    Post subject: Reply with quote

Cruslan wrote:
In MUXless systems, you cant use your dGPU for direct output. You should only use PRIME Render Offload on games and apps that requires dGPU acceleration. Use iGPU on KDE, most times only option is iGPU. You can force Vulkan by "__VK_LAYER_NV_optimus=NVIDIA_only" variable.


i fixed llvmpipe driver by adding this to make.conf
Code:
VIDEO_CARDS="intel i965 nvidia"

i still have to offload to nvidia gpu using prime-run but at least it works now, i still have som issues with denoiser and blender crash, othjerwise system seems fine,

denoiser problem is here
and on the crash i tried asking here so far nothing
not sure if related but moonlight doesnt use hardware necoding either so i asked here
Back to top
View user's profile Send private message
Cruslan
n00b
n00b


Joined: 06 Jan 2024
Posts: 26

PostPosted: Sat Jul 13, 2024 2:00 am    Post subject: Reply with quote

As i said you can't get direct output from your NVIDIA GPU, you have to use iGPU as always. First remove "__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia" if you declared those as constant environmental variable. Don't use those while running any program except you need OpenGL and Vulkan like games. Also don't use any of prime-run or bumblebee stuff, they are abandoned and unmaintained. NVIDIA's own PRIME Render Offload is works best in performance and compatibility both. In Blender, you can select any CUDA device(your NVIDIA GPU) in Preferences > System tab, it actually accelerates your workflow. You can select NVENC in OBS or any program that supports NVENC or NVDEC without PRIME Render Offload. CUDA and NVENC/NVDEC are indepentent from PRIME Render Offload, you can use them. "__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only" is only should be used on OpenGL and Vulkan output if required. It may wont work or work but not as expected on Wayland, you should use without problems in XWayland or Native X applications.
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Tue Jul 16, 2024 1:51 pm    Post subject: Reply with quote

Cruslan wrote:
As i said you can't get direct output from your NVIDIA GPU, you have to use iGPU as always. First remove "__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia" if you declared those as constant environmental variable. Don't use those while running any program except you need OpenGL and Vulkan like games. Also don't use any of prime-run or bumblebee stuff, they are abandoned and unmaintained. NVIDIA's own PRIME Render Offload is works best in performance and compatibility both. In Blender, you can select any CUDA device(your NVIDIA GPU) in Preferences > System tab, it actually accelerates your workflow. You can select NVENC in OBS or any program that supports NVENC or NVDEC without PRIME Render Offload. CUDA and NVENC/NVDEC are indepentent from PRIME Render Offload, you can use them. "__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus=NVIDIA_only" is only should be used on OpenGL and Vulkan output if required. It may wont work or work but not as expected on Wayland, you should use without problems in XWayland or Native X applications.

i did remove stuff from enviroment, and i tried not using prime-run, and ye blender works without it , i feel like viewer is more laggy but rendering htere is no difference, and the issue with opening some old project i just solved by installing binary build from blenders website, somehow the gentoo provided version doesnt work correctly, i tired allowing all use options everything the issues remained, so i just gave up and tried downloading and unpacking from site and it works flawlessy, then i just found and merge blender-bin from hossie repo.
Back to top
View user's profile Send private message
Cruslan
n00b
n00b


Joined: 06 Jan 2024
Posts: 26

PostPosted: Tue Jul 16, 2024 2:49 pm    Post subject: Reply with quote

You have to enable "cuda" USE flag for using GPU acceleration on Blender.
Back to top
View user's profile Send private message
picarica
Guru
Guru


Joined: 11 Aug 2018
Posts: 326

PostPosted: Wed Jul 17, 2024 6:01 am    Post subject: Reply with quote

Cruslan wrote:
You have to enable "cuda" USE flag for using GPU acceleration on Blender.

well duh, thats not the problem, it crashes on my old projects and denoising is resulting in black image
i have more info here
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum