OBS with NVENC doesn't work with nVidia driver 470+

Quite some time ago the nVidia driver available in the repositories was 460. At that time, recording with OBS using the NVENC encoder worked just fine. The repositories then updated to 470 and recording with NVENC no longer worked, instead spitting out this message:

[NVENC encoder: ‘recording_h264’] Failed to open NVENC codec: Unknown error occurred

I got around this by uninstalling the Manjaro driver and downloading and installing the 460 driver from nVidia manually. This worked fine until this recent major Manjaro update.

As of the recent update, xorg will no longer work with the 460 driver, complaining about ABI changes, so I’ve had to install the latest nVidia driver available, which now is 495. And once again, I’m back to the above error message, taken from the OBS logs, where OBS will no longer record using NVENC.

Is this a known issue of some sort? Or is there any other guidance?

To be clear I’m on a desktop with a dedicated nVidia GPU. No other GPUs in the system and OBS is correctly recognizing and running on the nVidia card. It even states in the logs that NVENC is available, which of course I would expect it to be considering I’ve been using it this whole time.

490, 470, 390 or nouveau are available as you know, or entirely unsupported hacky workarounds.
(yeah xorg conflict sounds about right)
Otherwise cite the famous linus finger for nvidia.

I honestly hope there is a fix for you … its just that breakage or abandonment is a dime a dozen in terms of nvidias ‘support’.

@linuxtinker

For clarification: You don’t use a flapak or snap package of obs? So it is the native package?

I don’t think the 390 driver has support for NVENC so that would be an issue, and 470 and 490 plop out that error I talked about.

It might be possible to reinstall the 460 driver manually and get xorg to ignore the ABI differences but I’d really rather get this working properly with the latest nVidia driver if I can.

I’ve tried it with both the native package from the repositories and the flatpak. The results are the same.

Try to stick to the native version for testing purposes.

I may suggest trying some other kernels as well.

I’ve worked on the issue trying a variety of combinations with both the 5.13 and 5.14 kernels. And now, as of today, the 5.15 kernel.

Go lower … 5.10 and 5.4 maybe ?
(all the others you mentioned are EOL and 5.15 is rather new)

Hek … while we are poking around it makes sense to include an inxi:

It could be possible that ffmpeg parameters in obs for nvenc are faulty. Try it with a custom profile.

I could, though to be fair considering it seems to work regardless of kernel with driver 460 and then stops with 470+ regardless of which kernel I’ve tried so far, it seems like the issue might be in another direction.

I just tried and NVENC recording works, with Nvidia 495, on a GTX 1060.

I suppose that’s possible, however the same OBS / FFMPEG / NVENC combo works with nVidia 460 and doesn’t work with anything newer so that makes me think it might not be that.

I’m using a GTX 750 Ti. If you’d like to send me your card I’d be happy to test it in my system :wink: .

Note that I’m on Testing branch, so maybe something is different currently but I doubt it.

Just note this: I believe the problem lies between ffmpeg and nvidia driver. Not OBS itself. So it could be possible that obs set some parameters on ffmpeg which is not supported on your older GPU with a newer module or sort of. Just a thought.

It’s true my card is just a teeny tiny little bit out of date, by something like, what, 10 years?

Is there a way to modify which commands or configurations FFMPEG uses, so that if I can figure out the proper configuration that actually works with my card I can adjust things to try to match that?

Also, I think with 460 and before nVidia was providing its own built-in NVENC libraries, but after 460 it relies on system NVENC libraries and maybe my card doesn’t like that.

As I said:

A custom encoder profile can be set in obs at the Input section. It is called “advanced”.