NVENC works on win10 but not on Linux

I have a GTX 1050ti which should be able to run NVENC perfectly, it runs flawlessly on windows but when i switched to Linux i couldn’t use it, tried so many fixes but got no results. I’m now on Arch but a few months ago i tried using Pop!OS and got the same error. The reason might be my mobo being too old, but i don’t know why would it work on windows and not on Linux

FFMPEG Output when using nvenc

[h264_nvenc @ 0x55829c2ea380] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_SYSTEM_NOT_READY: system not yet initialized
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x55829c312f00] Qavg: 19418.006
[aac @ 0x55829c312f00] 2 frames left in the queue on closing
Conversion failed!

nvidia-bug-report.log.gz (307.6 KB)

Your mainboard has a nvidia chipset which the linux driver mistakes for a nvswitch system.
https://forums.developer.nvidia.com/t/gtx1070-doesnt-work-with-cuda-465-24-02-and-newer-when-it-is-in-motherboard-based-on-nvidia-chipset/205250
https://forums.developer.nvidia.com/t/envec-h264-encoding-does-not-work-with-gtx-1660ti-1660-super-with-ubuntu-linux-22-04/223440/7

Are the results the same when you apply this patch - GitHub - keylase/nvidia-patch: This patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs. ?

yup

yeah, i think that’s the problem, hope they fix it and ty for your support