OBS gives an error using NVIDIA’s Hardware encoder and decoder NVDEC and NVENC under Wayland using KDE as the desktop environment, whenever OBS is minimized and the plasmashell’s bottom panel is hidden using the “Dodge windows” option while recording, it shows an error saying:
“An encoder error occurred while recording:
Encoder NVIDIA NVENC H.264 (FFmpeg) is taking too long to encode (timeout: 5 seconds)”
It might also be the same Bug but whenever the Panel is hidden the shell stops working completely, notifications, widgets, apps, copying, pasting and deleting on dolphin, dragging icons, and any other process that requires plasmashell or similar stops working when the panel is hidden, showing the panel with the cursor resumes all processes and the desktop functions as normal
Using Software/ CPU recording or using X11 when recording doesn’t give any errors.
Here’s my Wayland’s summary output generated by the NVIDIA bug report system: nvidia-bug-report.log.gz (1.6 MB)
I saw you are using Arch Linux. Do you have all the packages installed? From where did you install the packages? What about OBS logs? (You can find the OBS logs in ~/.config/obs-studio/logs/)
What’s the output of cat /sys/module/nvidia_drm/parameters/modeset? (If it says permission denied, you can use sudo)
Okay so this is the log i get every time i try to record using NVIDIA Graphics on Wayland with OBS: 2024-06-14 16-06-56.txt (10.1 KB)
$ sudo pacman -Qs | grep nvidia
This is the output i get when i enter that command. Notice that i’m not using Arch’s official packages or the Beta packages given in the AUR, I’m using NVIDIA-TKG’s ones, and from what I’ve seen, i neither have NVIDIA-tweaks or NVIDIA-system-monitor-qt which i assume they’re not necessary:
local/lib32-nvidia-utils-tkg 555.52.04-254
NVIDIA driver utilities and libraries for 'nvidia-tkg' (32-bit)
local/lib32-opencl-nvidia-tkg 555.52.04-254
NVIDIA's OpenCL implemention for 'lib32-nvidia-utils-tkg'
local/libva-nvidia-driver 0.0.12-1
local/nvidia-dkms-tkg 555.52.04-254
local/nvidia-egl-wayland-tkg 555.52.04-254
NVIDIA EGL Wayland library (libnvidia-egl-wayland.so.1.1.13) for 'nvidia-utils-tkg'
local/nvidia-settings-tkg 555.52.04-254
local/nvidia-utils-tkg 555.52.04-254
NVIDIA driver utilities and libraries for 'nvidia-tkg'
local/opencl-nvidia-tkg 555.52.04-254
NVIDIA's OpenCL implemention for 'nvidia-utils-tkg'
I also enabled DRM modeset through a kernel parameter in GRUB so I’m pretty sure it’s enabled.
And about Arch packages… How do i know i have all the required packages for the proper function of OBS? I also installed the Sandboxed version of OBS from Discover and it still says the same error, so i’m almost sure it’s not a dependency problem, though you never know. I thought Arch installs all the required dependencies before installing OBS, i also made sure to install the Optional dependencies as well.
But i have to make sure… Are you using Pipewire on Wayland? Because i know OBS works just fine using XComposite on X11 with the same drivers. Just to make sure we are in the same page. Thanks for your answer! :D
That’s weird… Then it has to be a problem with my setup right? I just removed the NVIDIA-TKG packages and installed the NVIDIA AUR Beta packages and i still have the same error
Okay i found the problem… It’s a problem of the beta of Plasma 6.1, I presume it’s related to Kwin since they just introduced full explicit sync support in the version of Kwin 6.0.90. Downgrading to Plasma 6.0.5 solves the problem, i can record for long periods of time without any errors. I’ll report the bug to KDE and I’ll leave this post as a way of NVIDIA to see this and asses the problem. Thanks