Run h264_nvenc.mp4 ...
 
Notifications
Retirer tout

Run h264_nvenc.mp4 via Nvidia GPU in Nvidia Prime mode (GPU offload)

3 Posts
2 Utilisateurs
0 Likes
2,215 Vu
0
Début du sujet

Hi,
i'm runing my laptop in Nvidia Prime (Nvidia On Demand, Hybrid graphics) mode and trying to run nvenc in CinGG via GPU Offload.

Here is my start command:

export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __VK_LAYER_NV_optimus=NVIDIA_only
export LIBVA_DRIVER_NAME=nvidia

firejail --env=__NV_PRIME_RENDER_OFFLOAD=1 --env=__GLX_VENDOR_LIBRARY_NAME=nvidia --env=__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 --env=__VK_LAYER_NV_optimus=NVIDIA_only --env=LIBVA_DRIVER_NAME=nvidia --env=DESKTOPINTEGRATION=appimaged --noprofile --appimage /home/user/Downloads/CinGG-20230331-x86_64.AppImage

And i can't get Nvidia GPU utilization.
The render runs via CPU.

Here is the information that proves I can run applications through the Nvidia GPU:

export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __VK_LAYER_NV_optimus=NVIDIA_only
export LIBVA_DRIVER_NAME=nvidia

inxi -Gxx

Graphics:
Device-1: Intel HD Graphics 630 vendor: Dell driver: i915 v: kernel ports:
active: eDP-1 empty: DP-1 bus-ID: 00:02.0 chip-ID: 8086:591b
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Dell
driver: nvidia v: 545.29.06 pcie: speed: 2.5 GT/s lanes: 16 ports:
active: none empty: HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:1c8d
Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
driver: uvcvideo bus-ID: 1-12:4 chip-ID: 1bcf:28c1
Display: x11 server: X.Org v: 1.21.1.3 compositors: 1: xfwm v: 4.18.0
2: Picom v: git-31727 driver: X: loaded: modesetting,nvidia
unloaded: fbdev,nouveau,vesa gpu: i915 display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96
Monitor-1: eDP-1 model: AU Optronics res: 1920x1080 dpi: 142
diag: 394mm (15.5")
OpenGL: renderer: NVIDIA GeForce GTX 1050/PCIe/SSE2
v: 4.6.0 NVIDIA 545.29.06 direct render: Yes

 I can successfully run apps with Nvidia GPU utilization, e.g. games on Wine.
But CinGG doesn't utilize the Nvidia GPU in Nvidia Prime mode via GPU offload if i run the render via h264_nvenc.mp4 profile

 

Ce message a été modifié Il y a 11 mois 2 fois par cinuzer
phylsmith2004 28/12/2023 5:11
Ce message a été modifié Il y a 11 mois parphylsmith2004

@cinuzer 

@andreapaz

Did you build/compile CinGG yourself or are you using an AppImage or one of the package files at:

     https://github.com/einhander/cin-gg-packages/releases

Unfortunately, I have not found a computer to test nvenc here yet but have 1 more I can look at.  I am hoping that Andrea has tested this since we upgraded to ffmpeg 6.1 recently and can verify that it is working.

 

When you say it is not using the GPU, have you also looked at the startup window where you started CinGG to see if there is the error message: "Cannot load libcuda.so.1" ?

Étiquettes du sujet
2 Réponses
0
Début du sujet

@phylsmith2004
No, i'm using appimage.

Today I ran the CineGG render (after rebooting my laptop).
And as far as I can tell from the preview of the rendering process in the Compositor window (it's going fast) - Nvidia GPU encoding is working again for me

Here is the stdout of a successful render via nvenc:

Spoiler
log
export __NV_PRIME_RENDER_OFFLOAD=1
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __VK_LAYER_NV_optimus=NVIDIA_only
export LIBVA_DRIVER_NAME=nvidia
firejail --env=__NV_PRIME_RENDER_OFFLOAD=1 --env=__GLX_VENDOR_LIBRARY_NAME=nvidia --env=__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 --env=__VK_LAYER_NV_optimus=NVIDIA_only --env=LIBVA_DRIVER_NAME=nvidia --env=DESKTOPINTEGRATION=appimaged --noprofile --appimage /home/user/Downloads/CinGG-20230331-x86_64.AppImage

Parent pid 89472, child pid 89473

** Warning: dropping all Linux capabilities and setting NO_NEW_PRIVS prctl **

Mounting appimage type 2
Warning: NVIDIA card detected, nogroups command ignored
Child process initialized in 51.93 ms
Cinelerra Infinity - built: Mar 31 2023 08:26:24
git://git.cinelerra-gg.org/goodguy/cinelerra.git
(c) 2006-2019 Heroine Virtual Ltd. by Adam Williams
2007-2020 mods for Cinelerra-GG by W.P.Morrow aka goodguy
Cinelerra is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for Cinelerra.

audio0 pad 64 0 (64)
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Failed HW device create.
dev:vdpau
err: Unknown error occurred
HW device init failed, using SW decode.
file:/home/user/Video/1-bad-lightbulb.mp4
err: Operation not permitted
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Failed HW device create.
dev:vdpau
err: Unknown error occurred
HW device init failed, using SW decode.
file:/home/user/Video/1-bad-lightbulb.mp4
err: Operation not permitted
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Failed HW device create.
dev:vdpau
err: Unknown error occurred
HW device init failed, using SW decode.
file:/home/user/Video/1-bad-lightbulb.mp4
err: Operation not permitted
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Failed HW device create.
dev:vdpau
err: Unknown error occurred
HW device init failed, using SW decode.
file:/home/user/Video/1-bad-lightbulb.mp4
err: Operation not permitted
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Failed HW device create.
dev:vdpau
err: Unknown error occurred
HW device init failed, using SW decode.
file:/home/user/Video/1-bad-lightbulb.mp4
err: Operation not permitted
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Failed HW device create.
dev:vdpau
err: Unknown error occurred
HW device init failed, using SW decode.
file:/home/user/Video/1-bad-lightbulb.mp4
err: Operation not permitted
Render::render_single: Session finished.
** rendered 3722 frames in 22.803 secs, 163.224 fps
Total excess of backups: -50
Session time: 0:02:37
Cpu time: user: 0:01:03.442 sys: 0:00:03.304

Parent is shutting down, bye...
AppImage detached

So i can't reproduce nvenc fail to render for now

0

@cinuzer

@Andrew_r

So i can't reproduce nvenc fail to render for now

Interesting, I am at a loss for an explanation.

"Failed to open backend VDPAU" as well as all of the other errors would be due to the AppImage being created on a computer with different graphics hardware that does not have that capability.

Share: