Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia (vdpau) drivers gives Segmentation fault (core dumped) #14

Closed
Amir1453 opened this issue Jul 2, 2023 · 26 comments
Closed

nvidia (vdpau) drivers gives Segmentation fault (core dumped) #14

Amir1453 opened this issue Jul 2, 2023 · 26 comments

Comments

@Amir1453
Copy link

Amir1453 commented Jul 2, 2023

OS: Arch Linux
Kernel: 6.3.9-arch1-1
DE: Hyprland
GPU: NVIDIA RTX 2070 SUPER

wl-screenrec-git r85.7ceafa9-1
libva-vdpau-driver 0.7.4-6
nvidia-dkms 535.54.03-1
nvidia-utils 535.54.03-1
lib32-nvidia-utils 535.54.03-2
hyprland-nvidia-git r3023.e96fcb31-1

When running wl-screenrec --verbose

[file @ 0x563a0ecd3340] Setting default whitelist 'file,crypto,data'
[AVHWDeviceContext @ 0x563a0ecd3900] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x563a0ecd3900] libva: User environment variable requested driver 'nvidia'
[AVHWDeviceContext @ 0x563a0ecd3900] libva: Trying to open /usr/lib/dri/nvidia_drv_video.so
[AVHWDeviceContext @ 0x563a0ecd3900] libva: Found init function __vaDriverInit_1_13
[1]    104588 segmentation fault (core dumped)  wl-screenrec --verbose

I also tried wl-screenrec --dri-device /dev/dri/renderD128 --low-power off --verbose

[file @ 0x564d336fcc80] Setting default whitelist 'file,crypto,data'
[AVHWDeviceContext @ 0x564d336fd240] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x564d336fd240] libva: User environment variable requested driver 'nvidia'
[AVHWDeviceContext @ 0x564d336fd240] libva: Trying to open /usr/lib/dri/nvidia_drv_video.so
[AVHWDeviceContext @ 0x564d336fd240] libva: Found init function __vaDriverInit_1_13
[1]    104724 segmentation fault (core dumped)  wl-screenrec --dri-device /dev/dri/renderD128 --low-power off --verbose
@russelltg
Copy link
Owner

Very interesting, thank you for the report. I don't have a system with a nvidia dGPU, so I won't be able to reproduce this locally. Things that would be interesting to help diagnose this:

  • Does wf-recorder -c h264_vaapi -d /dev/dri/renderD128 work?
  • If you run DEBUGINFOD_URLS=https://debuginfod.archlinux.org gdb $(which wl-screenrec) -ex r -ex bt (make sure to respond y when prompted about debuginfod)

@russelltg russelltg changed the title Segmentation fault (core dumped) nvidia (vdpau) drivers gives Segmentation fault (core dumped) Jul 3, 2023
@Amir1453
Copy link
Author

Amir1453 commented Jul 3, 2023

wf-recorder normally works, but wf-recorder -c h264_vaapi -d /dev/dri/renderD128 returns

selected region 0,0 0x0
[1]    27886 segmentation fault (core dumped)  wf-recorder -c h264_vaapi -d /dev/dri/renderD128

Running DEBUGINFOD_URLS=https://debuginfod.archlinux.org gdb $(which wl-screenrec) -ex r -ex bt results in

GNU gdb (GDB) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/wl-screenrec...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading separate debug info for /usr/bin/wl-screenrec
(No debugging symbols found in /usr/bin/wl-screenrec)                                               
Starting program: /usr/bin/wl-screenrec 
Downloading separate debug info for /lib64/ld-linux-x86-64.so.2
Downloading separate debug info for system-supplied DSO at 0x7ffff7fc8000                           
Downloading separate debug info for /usr/lib/libavutil.so.58                                        
Downloading separate debug info for /usr/lib/libavformat.so.60                                      
Downloading separate debug info for /usr/lib/libavfilter.so.9                                       
Downloading separate debug info for /usr/lib/libavdevice.so.60                                      
Downloading separate debug info for /usr/lib/libswscale.so.7                                        
Downloading separate debug info for /usr/lib/libswresample.so.4                                     
Downloading separate debug info for /usr/lib/libavcodec.so.60                                       
Downloading separate debug info for /usr/lib/libm.so.6                                              
Downloading separate debug info for /usr/lib/libc.so.6                                              
[Thread debugging using libthread_db enabled]                                                       
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Downloading separate debug info for /usr/lib/libva-drm.so.2
Downloading separate debug info for /usr/lib/libva.so.2                                             
Downloading separate debug info for /usr/lib/libva-x11.so.2                                         
Downloading separate debug info for /usr/lib/libvdpau.so.1                                          
Downloading separate debug info for /usr/lib/libX11.so.6                                            
Downloading separate debug info for /usr/lib/libdrm.so.2                                            
Downloading separate debug info for /usr/lib/libmfx.so.1                                            
Downloading separate debug info for /usr/lib/libOpenCL.so.1                                         
Downloading separate debug info for /usr/lib/libxml2.so.2                                           
Downloading separate debug info for /usr/lib/libbz2.so.1.0                                          
Downloading separate debug info for /usr/lib/libmodplug.so.1                                        
Downloading separate debug info for /usr/lib/libopenmpt.so.0                                        
Downloading separate debug info for /usr/lib/libbluray.so.2                                         
Downloading separate debug info for /usr/lib/libgmp.so.10                                           
Downloading separate debug info for /usr/lib/libz.so.1                                              
Downloading separate debug info for /usr/lib/libgnutls.so.30                                        
Downloading separate debug info for /usr/lib/libsrt.so.1.5                                          
Downloading separate debug info for /usr/lib/libssh.so.4                                            
Downloading separate debug info for /usr/lib/libpostproc.so.57                                      
Downloading separate debug info for /usr/lib/libbs2b.so.0                                           
Downloading separate debug info for /usr/lib/libfribidi.so.0                                        
Downloading separate debug info for /usr/lib/libvmaf.so.1                                           
Downloading separate debug info for /usr/lib/libass.so.9                                            
Downloading separate debug info for /usr/lib/libvidstab.so.1.2                                      
Downloading separate debug info for /usr/lib/libzimg.so.2                                           
Downloading separate debug info for /usr/lib/libfontconfig.so.1                                     
Downloading separate debug info for /usr/lib/libfreetype.so.6                                       
Downloading separate debug info for /usr/lib/libraw1394.so.11                                       
Downloading separate debug info for /usr/lib/libavc1394.so.0                                        
Downloading separate debug info for /usr/lib/librom1394.so.0                                        
Downloading separate debug info for /usr/lib/libiec61883.so.0                                       
Downloading separate debug info for /usr/lib/libjack.so.0                                           
Downloading separate debug info for /usr/lib/libxcb.so.1                                            
Downloading separate debug info for /usr/lib/libxcb-shm.so.0                                        
Downloading separate debug info for /usr/lib/libxcb-shape.so.0                                      
Downloading separate debug info for /usr/lib/libxcb-xfixes.so.0                                     
Downloading separate debug info for /usr/lib/libasound.so.2                                         
Downloading separate debug info for /usr/lib/libGL.so.1                                             
Downloading separate debug info for /usr/lib/libpulse.so.0                                          
Downloading separate debug info for /usr/lib/libSDL2-2.0.so.0                                       
Downloading separate debug info for /usr/lib/libv4l2.so.0                                           
Downloading separate debug info for /usr/lib/libXv.so.1                                             
Downloading separate debug info for /usr/lib/libXext.so.6                                           
Downloading separate debug info for /usr/lib/libsoxr.so.0                                           
Downloading separate debug info for /usr/lib/libvpx.so.8                                            
Downloading separate debug info for /usr/lib/libwebpmux.so.3                                        
Downloading separate debug info for /usr/lib/libwebp.so.7                                           
Downloading separate debug info for /usr/lib/liblzma.so.5                                           
Downloading separate debug info for /usr/lib/libdav1d.so.6                                          
Downloading separate debug info for /usr/lib/libopencore-amrwb.so.0                                 
Downloading separate debug info for /usr/lib/librsvg-2.so.2                                         
Downloading separate debug info for /usr/lib/libgobject-2.0.so.0                                    
Downloading separate debug info for /usr/lib/libglib-2.0.so.0                                       
Downloading separate debug info for /usr/lib/libcairo.so.2                                          
Downloading separate debug info for /usr/lib/libaom.so.3                                            
Downloading separate debug info for /usr/lib/libgsm.so.1                                            
Downloading separate debug info for /usr/lib/libjxl.so.0.8                                          
Downloading separate debug info for /usr/lib/libjxl_threads.so.0.8                                  
Downloading separate debug info for /usr/lib/libmp3lame.so.0                                        
Downloading separate debug info for /usr/lib/libopencore-amrnb.so.0                                 
Downloading separate debug info for /usr/lib/libopenjp2.so.7                                        
Downloading separate debug info for /usr/lib/libopus.so.0                                           
Downloading separate debug info for /usr/lib/librav1e.so.0                                          
Downloading separate debug info for /usr/lib/libspeex.so.1                                          
Downloading separate debug info for /usr/lib/libSvtAv1Enc.so.1                                      
Downloading separate debug info for /usr/lib/libtheoraenc.so.1                                      
Downloading separate debug info for /usr/lib/libtheoradec.so.1                                      
Downloading separate debug info for /usr/lib/libvorbis.so.0                                         
Downloading separate debug info for /usr/lib/libvorbisenc.so.2                                      
Downloading separate debug info for /usr/lib/libx264.so.164                                         
Downloading separate debug info for /usr/lib/libx265.so.199                                         
Downloading separate debug info for /usr/lib/libxvidcore.so.4                                       
Downloading separate debug info for /usr/lib/libXfixes.so.3                                         
Downloading separate debug info for /usr/lib/libX11-xcb.so.1                                        
Downloading separate debug info for /usr/lib/libxcb-dri3.so.0                                       
Downloading separate debug info for /usr/lib/libicuuc.so.73                                         
Downloading separate debug info for /usr/lib/libmpg123.so.0                                         
Downloading separate debug info for /usr/lib/libvorbisfile.so.3                                     
Downloading separate debug info for /usr/lib/libp11-kit.so.0                                        
Downloading separate debug info for /usr/lib/libbrotlienc.so.1                                      
Downloading separate debug info for /usr/lib/libbrotlidec.so.1                                      
Downloading separate debug info for /usr/lib/libzstd.so.1                                           
Downloading separate debug info for /usr/lib/libidn2.so.0                                           
Downloading separate debug info for /usr/lib/libunistring.so.5                                      
Downloading separate debug info for /usr/lib/libtasn1.so.6                                          
Downloading separate debug info for /usr/lib/libnettle.so.8                                         
Downloading separate debug info for /usr/lib/libhogweed.so.6                                        
Downloading separate debug info for /usr/lib/libcrypto.so.3                                         
Downloading separate debug info for /usr/lib/libharfbuzz.so.0                                       
Downloading separate debug info for /usr/lib/libexpat.so.1                                          
Downloading separate debug info for /usr/lib/libpng16.so.16                                         
Downloading separate debug info for /usr/lib/libdb-5.3.so                                           
Downloading separate debug info for /usr/lib/libXau.so.6                                            
Downloading separate debug info for /usr/lib/libXdmcp.so.6                                          
Downloading separate debug info for /usr/lib/libGLdispatch.so.0                                     
Downloading separate debug info for /usr/lib/libGLX.so.0                                            
Downloading separate debug info for /usr/lib/pulseaudio/libpulsecommon-16.1.so                      
Downloading separate debug info for /usr/lib/libdbus-1.so.3                                         
Downloading separate debug info for /usr/lib/libv4lconvert.so.0                                     
Downloading separate debug info for /usr/lib/libsharpyuv.so.0                                       
Downloading separate debug info for /usr/lib/libcairo-gobject.so.2                                  
Downloading separate debug info for /usr/lib/libgdk_pixbuf-2.0.so.0                                 
Downloading separate debug info for /usr/lib/libgio-2.0.so.0                                        
Downloading separate debug info for /usr/lib/libpangocairo-1.0.so.0                                 
Downloading separate debug info for /usr/lib/libpango-1.0.so.0                                      
Downloading separate debug info for /usr/lib/libffi.so.8                                            
Downloading separate debug info for /usr/lib/libpcre2-8.so.0                                        
Downloading separate debug info for /usr/lib/libXrender.so.1                                        
Downloading separate debug info for /usr/lib/libxcb-render.so.0                                     
Downloading separate debug info for /usr/lib/libpixman-1.so.0                                       
Downloading separate debug info for /usr/lib/libhwy.so.1                                            
Downloading separate debug info for /usr/lib/libogg.so.0                                            
Downloading separate debug info for /usr/lib/libmvec.so.1                                           
Downloading separate debug info for /usr/lib/libpthread.so.0                                        
Downloading separate debug info for /usr/lib/libicudata.so.73                                       
Downloading separate debug info for /usr/lib/libbrotlicommon.so.1                                   
Downloading separate debug info for /usr/lib/libgraphite2.so.3                                      
Downloading separate debug info for /usr/lib/libsndfile.so.1                                        
Downloading separate debug info for /usr/lib/libsystemd.so.0                                        
Downloading separate debug info for /usr/lib/libasyncns.so.0                                        
Downloading separate debug info for /usr/lib/libjpeg.so.8                                           
Downloading separate debug info for /usr/lib/libgmodule-2.0.so.0                                    
Downloading separate debug info for /usr/lib/libtiff.so.6                                           
Downloading separate debug info for /usr/lib/libmount.so.1                                          
Downloading separate debug info for /usr/lib/libpangoft2-1.0.so.0                                   
Downloading separate debug info for /usr/lib/libthai.so.0                                           
Downloading separate debug info for /usr/lib/libFLAC.so.12                                          
Downloading separate debug info for /usr/lib/libcap.so.2                                            
Downloading separate debug info for /usr/lib/libgcrypt.so.20                                        
Downloading separate debug info for /usr/lib/liblz4.so.1                                            
Downloading separate debug info for /usr/lib/libblkid.so.1                                          
Downloading separate debug info for /usr/lib/libselinux.so.1                                        
Downloading separate debug info for /usr/lib/libdatrie.so.1                                         
Downloading separate debug info for /usr/lib/libgpg-error.so.0                                      
Downloading separate debug info for /usr/lib/libGLX_nvidia.so.0                                     
Downloading separate debug info for /usr/lib/libnvidia-glsi.so.535.54.03                            
Downloading separate debug info for /usr/lib/libnvidia-tls.so.535.54.03                             
Downloading separate debug info for /usr/lib/libnvidia-glcore.so.535.54.03                          
Downloading separate debug info for /usr/lib/libdl.so.2                                             
Downloading separate debug info for /usr/lib/librt.so.1                                             
Downloading separate debug info for /usr/lib/libnvidia-glvkspirv.so.535.54.03                       
[New Thread 0x7fffdf1ff6c0 (LWP 31255)]                                                             
Using output DP-3
Downloading separate debug info for /usr/lib/dri/nvidia_drv_video.so
                                                                                                    
Thread 1 "wl-screenrec" received signal SIGSEGV, Segmentation fault.
XDisplayString (dpy=0x0) at /usr/src/debug/libx11/libX11-1.8.6/src/Macros.c:119
Downloading source file /usr/src/debug/libx11/libX11-1.8.6/src/Macros.c
119	char *XDisplayString(Display *dpy) { return (DisplayString(dpy)); }                         
--Type <RET> for more, q to quit, c to continue without paging--RET
#0  XDisplayString (dpy=0x0) at /usr/src/debug/libx11/libX11-1.8.6/src/Macros.c:119
#1  0x00007ffff7fb4a1d in __vaDriverInit_1_13 () at /usr/lib/dri/nvidia_drv_video.so
#2  0x00007ffff7e699c3 in  () at /usr/lib/libva.so.2
#3  0x00007ffff7e6cce0 in vaInitialize () at /usr/lib/libva.so.2
#4  0x00007ffff7c43b5d in  () at /usr/lib/libavutil.so.58
#5  0x00007ffff7c2faa2 in av_hwdevice_ctx_create () at /usr/lib/libavutil.so.58
#6  0x000055555557a9d0 in  ()
#7  0x000055555558c53b in  ()
#8  0x0000555555589ff1 in  ()
#9  0x0000555555596dcb in  ()
#10 0x0000555555598751 in  ()
#11 0x0000555555598c20 in  ()
#12 0x000055555558feee in  ()
#13 0x00005555555a0ea3 in  ()
#14 0x00005555555833d9 in  ()
#15 0x0000555555621cbe in  ()
#16 0x00005555555940e5 in main ()
(gdb) 

@russelltg
Copy link
Owner

Does vainfo crash?

@Amir1453
Copy link
Author

Amir1453 commented Jul 3, 2023

Results in a floating point exception:

Trying display: wayland
[1]    20272 floating point exception (core dumped)  vainfo

@Amir1453
Copy link
Author

Amir1453 commented Jul 3, 2023

vdpauinfo results in the following:

display: :0   screen: 0
Error creating VDPAU device: 1

I am guessing the issue is related to me somehow having broken hardware acceleration. Do please tell me if you have any ideas to fix it, I would also like to test the screen recorder to help development with NVIDIA.

@russelltg
Copy link
Owner

I'm not familiar with vdpau at all, so I can't be of any particular help. Maybe:

  • Report with them (if you do, please put a link to that report here)
  • Depending on your knowledge of programming these sort of things, pop into a debugger and see why it's not working!

@jbeich
Copy link
Contributor

jbeich commented Jul 4, 2023

@russelltg
Copy link
Owner

It seems vdpau doesn't work on wayland at all--does https://aur.archlinux.org/packages/libva-vdpau-driver-wayland help?

@Amir1453
Copy link
Author

Unless there are some settings I have to change, that did not work either. It seems translation layers are broken for nvidia drivers 525 and up, so for it to work I would need to downgrade my video drivers, which I cannot do right now. Is there someone who can test with the 525 drivers and libva-vdpau-driver-wayland?

@russelltg
Copy link
Owner

russelltg commented Jul 11, 2023

I'd love to be able to work on this but I just cannot seem to get sway or Hyprland to use my nvidia GPU....what setup are y'all running that nvidia is your only hardware encoder? Are you actually able to get it working?

My setup is an optimius one, maybe that's causing issues?

It always crashes on gbm_create_device

@Amir1453
Copy link
Author

Here is what I did for Hyprland (according to the wiki):

  1. Install nvidia-dkms (if the GPU is supported by nvidia-open-dkms use that instead). Install the headers necessary for your linux kernel (linux-headers for linux kernel, linux-zen-headers for linux zen).
  2. Add nvidia_drm.modeset=1 to your kernel parameters.
  3. Add nvidia nvidia_modeset nvidia_uvm nvidia_drm to mkinitcpio MODULES
  4. Run mkinitcpio
  5. Install hyprland-nvidia or hyprland-nvidia-git
  6. Export the following to the hyprland configuration file:
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
  1. Install qt5-wayland qt5ct libva.
  2. Reboot

These are the steps I followed and everything works perfectly, except for a few laggy apps that use XWayland.

@russelltg
Copy link
Owner

Gotcha, that's exactly what I've done. I might test with a desktop computer with dedicated Nv that I have access to at work when I get time.

@5ouls3dge
Copy link

5ouls3dge commented Jan 24, 2024

I think you should be installing:
nvidia-dkms
nvidia-settings
nvidia-utils
libva
libva-nvidia-driver-git

No other DM/ WM is installed, make sure all other nvidia drivers that are not named as above are uninstalled, also hyprland-nvidia hyprland-nvidia-git hyprland-nvidia-hidpi-git should be removed and also remove and blacklist nouveau drivers:

(After all is removed, install hyprland then do the following)

nvidia_pkg=(
          nvidia-dkms
          nvidia-settings
          nvidia-utils
          libva
          libva-nvidia-driver-git
        )
        
        # Install additional Nvidia packages
        for krnl in $(cat /usr/lib/modules/*/pkgbase); do
          for NVIDIA in "${krnl}-headers" "${nvidia_pkg[@]}"; do
            install_package "$NVIDIA"
          done
        done
        
        # Check if the Nvidia modules are already added in mkinitcpio.conf and add if not
        if grep -qE '^MODULES=.*nvidia. *nvidia_modeset.*nvidia_uvm.*nvidia_drm' /etc/mkinitcpio.conf; then
          echo "Nvidia modules already included in /etc/mkinitcpio.conf" 
        else
          sudo sed -Ei 's/^(MODULES=\([^\)]*)\)/\1 nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' /etc/mkinitcpio.conf
          echo "Nvidia modules added in /etc/mkinitcpio.conf"
        fi
        
        sudo mkinitcpio -P
        printf "\n\n\n"
        
        # Additional Nvidia steps
        NVEA="/etc/modprobe.d/nvidia.conf"
        if [ -f "$NVEA" ]; then
          printf "Seems like nvidia-drm modeset=1 is already added in your system..moving on.\n"
          printf "\n"
        else
          printf "\n"
          printf "Adding options to $NVEA..."
          sudo echo -e "options nvidia-drm modeset=1" | sudo tee -a /etc/modprobe.d/nvidia.conf
          printf "\n"
        fi
        
        # Blacklist nouveau
            if [[ -z $blacklist_nouveau ]]; then
              read -n1 -rep "$(tput setaf 6)[ACTION]$(tput sgr0) Would you like to blacklist nouveau? (y/n)" blacklist_nouveau
            fi
        echo
        if [[ $blacklist_nouveau =~ ^[Yy]$ ]]; then
          NOUVEAU="/etc/modprobe.d/nouveau.conf"
          if [ -f "$NOUVEAU" ]; then
            printf "Seems like nouveau is already blacklisted..moving on.\n"
          else
            printf "\n"
            echo "blacklist nouveau" | sudo tee -a "$NOUVEAU"
            printf "$(tput setaf 3)[NOTE]$(tput sgr0) has been added to $NOUVEAU.\n"
            printf "\n"
        
            # To completely blacklist nouveau (See wiki.archlinux.org/title/Kernel_module#Blacklisting 6.1)
            if [ -f "/etc/modprobe.d/blacklist.conf" ]; then
              echo "install nouveau /bin/true" | sudo tee -a "/etc/modprobe.d/blacklist.conf"
            else
              echo "install nouveau /bin/true" | sudo tee "/etc/modprobe.d/blacklist.conf"
            fi
          fi
        else
          printf "$(tput setaf 3)[NOTE]$(tput sgr0) Skipping nouveau blacklisting.\n"
        fi`
```

@kRHYME7
Copy link

kRHYME7 commented Jan 24, 2024

Hello, in case this might help some hyprland users with multi-GPU

P/S. This comment might be dumb(I did not review other issues) but I will post this here.
In my case, setting this env variable on hyprland env = LIBVA_DRIVER_NAME,nvidia causes this error on 2 laptops with Nvidia as a dGPU and intel as iGPU.
Luckily in my case, I do not have to have use to this environment therefore I disabled it and wl-screenrec works well.

image

@russelltg
Copy link
Owner

The reason "intel" doesn't work is the name for the intel driver is iHD. You can see what drivers are present on your system with ls /usr/lib/dri/*_video.so

@kRHYME7
Copy link

kRHYME7 commented Jan 24, 2024

I see, thanks! How about for nvidia sir?

@russelltg
Copy link
Owner

My understanding is there is no libva driver for nvenc--however ffmpeg does support nvenc and hopefully supports importing dmabuf, so this is a feature that could be added.

Is there a reason you want to use your nvidia GPU for encode, especially considering your intel GPU is likely used for compositing so it would probably result in more load to copy the surfaces to the nvidia gpu for encode, considering there is a perfectly fine encoder block on the intel GPU?

@kRHYME7
Copy link

kRHYME7 commented Jan 24, 2024

I am trying to implement a bash utility on Hyprland using this package.

No reasons for using the nvidia though. I am just concerned about some Hyprland users having their env variable libva to nvidia making the wl-screenrec unusable.

I have one more question

Can I override the environment before running wl-screenrec. If I leave it black it acts like having wrong driver too. I do not know yet how to make it act like the ENV is not set at all.

BTW Thanks!

@5ouls3dge
Copy link

@kRHYME7 Is it best not to use the libva drivers:

libva libva-nvidia-driver-git

thank you

@mirh
Copy link

mirh commented Feb 25, 2024

libva-nvidia-driver should have no problem (well, at least big enough to crash badly)
OP was complaining about libva-vdpau-driver which indeed is super broken without extra patches

@russelltg
Copy link
Owner

Unfortunately that only supports decode, not encode.

@5ouls3dge
Copy link

what about installing "xdg-desktop-portal-wlr" to activate the screen capture via pipewire

@russelltg
Copy link
Owner

This project does not use xdp at all--and the issue here isn't capture, but the encode part.

I believe it is possible to support nvidia gpus, and I've started work on it--we're going to have to not use libva of course

1 similar comment
@russelltg
Copy link
Owner

This project does not use xdp at all--and the issue here isn't capture, but the encode part.

I believe it is possible to support nvidia gpus, and I've started work on it--we're going to have to not use libva of course

@DADA30000
Copy link

Also there is gpu-screen-recorder, it works flawlessly with nvidia

@russelltg
Copy link
Owner

Will be fixed by #95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants