-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comments
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:
|
selected region 0,0 0x0
[1] 27886 segmentation fault (core dumped) wf-recorder -c h264_vaapi -d /dev/dri/renderD128 Running 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) |
Does |
Results in a floating point exception: Trying display: wayland
[1] 20272 floating point exception (core dumped) vainfo |
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. |
I'm not familiar with vdpau at all, so I can't be of any particular help. Maybe:
|
|
It seems vdpau doesn't work on wayland at all--does https://aur.archlinux.org/packages/libva-vdpau-driver-wayland help? |
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? |
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 |
Here is what I did for Hyprland (according to the wiki):
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
These are the steps I followed and everything works perfectly, except for a few laggy apps that use XWayland. |
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. |
I think you should be installing: 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)
|
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. |
The reason "intel" doesn't work is the name for the intel driver is |
I see, thanks! How about for nvidia sir? |
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? |
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! |
@kRHYME7 Is it best not to use the libva drivers:
thank you |
|
Unfortunately that only supports decode, not encode. |
what about installing "xdg-desktop-portal-wlr" to activate the screen capture via pipewire |
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
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 |
Also there is gpu-screen-recorder, it works flawlessly with nvidia |
Will be fixed by #95 |
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
I also tried
wl-screenrec --dri-device /dev/dri/renderD128 --low-power off --verbose
The text was updated successfully, but these errors were encountered: