I dont know what is brooken with nvenc from the 21.10 to the 22.04LTS - its a clean install so it looks like have to use the 21.10 even if its EOL very strange the encoding is just gone away.
if [[ "$OSTYPE" == "linux-gnu" ]]; then
if command_exists "nvcc"; then
if build "nv-codec" "11.1.5.0"; then
download "https://github.com/FFmpeg/nv-codec-headers/releases/download/n11.1.5.0/nv-codec-headers-11.1.5.0.tar.gz"
execute make PREFIX="${WORKSPACE}"
execute make install PREFIX="${WORKSPACE}"
build_done "nv-codec" "11.1.5.0"
fi
CFLAGS+=" -I/usr/local/cuda/include"
LDFLAGS+=" -L/usr/local/cuda/lib64"
CONFIGURE_OPTIONS+=("--enable-cuda-nvcc" "--enable-cuvid" "--enable-nvenc" "--enable-cuda-llvm")
if [ -z "$LDEXEFLAGS" ]; then
CONFIGURE_OPTIONS+=("--enable-libnpp") # Only libnpp cannot be statically linked.
fi
# https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
CONFIGURE_OPTIONS+=("--nvccflags=-gencode arch=compute_52,code=sm_52")
fi
to
if [[ "$OSTYPE" == "linux-gnu" ]]; then
if build "nv-codec" "11.1.5.0"; then
download "https://github.com/FFmpeg/nv-codec-headers/releases/download/n11.1.5.0/nv-codec-headers-11.1.5.0.tar.gz"
execute make PREFIX="${WORKSPACE}"
execute make install PREFIX="${WORKSPACE}"
build_done "nv-codec" "11.1.5.0"
fi
CONFIGURE_OPTIONS+=("--enable-nvenc")
fi
Well it compiled OK but it did not solve the 1660 encoding problem - its like envec and or hvec is just invisible while all other parts is working fine and snappy - I will try to install 21.10 again because I need to see it work with linux maybe even windows just prove its not the hardware but a pure software problem. But still its a problem for me if my gtx 1660 is to old and EOL.
So the script is working but access to the encoder is not working. But will try the old 21.10 again but with current obs and ffmpeg maybe also recompile but one thing changed compared to the other computer currently running 21.10 with 1660 super is the ffmpeg version but I have no clue what the real problem is and maybe the nvidia driver is working fine with 21.10 but may have problems on 22.04 - every nvidia tools shows a working fine card give informations so its only when trying to do encodig else it looks nice the newer 22.04.
Later today I will try to install the old 21.10 again and se how work - the script used to work fine and so did the encoding that i need.
I’d rather try to install a recent driver, then install the matching nvidia-fabric-manager, change all failure modes in /usr/share/nvidia/nvswitch/fabricmanager.cfg to ‘1’, set log level to max, then start fabric-manager and check if the cuda driver connects to it when trying to encode, checking the log for what it wants.
Yes I remeber in the “old days” when h264_nvenc was working I dont needed the cuda stuff but then maybe now the ffmpeg and obs just demands it - the way to use the encoder without CUDA don’t work as the bug CUDA_ERROR_SYSTEM_NOT_READY: system not yet initialized is clear.
I dont know for sure if OBS depends on ffmpeg and ffmpeg now just need/demands cuda api to work it sounds possible it can also be the change from kernal used in 21.10 makes the nvidia driver 470 work while its in 22.04 is tries/demands to use cuda.
I have to ask but what driver do I need to install ?
I use the nvidia-driver-470 or the nvidia-driver-470-server ?
The stuff I would like to run is the OBS and https://datarhei.com/ restreamer with Nvidia support but its not working
to do
But the restreamer cant even see nvidia runtime - but OK can maybe just use passthru to avoid encoding but sure it would be nice to make it work when the graphics card should be anble to work.
I did try to install the nvidia-fabric-manager but no luck and it just to complicated for me to get the 1660 encoding to work on my Ubuntu 22.04 so I will go back to 21.10 were it was working or maybe even give windows 11 a try on that computer - I have used many hours and I can only say everything works but not the encoding part and it must be driver related.
Just to make sure I installed windows 10 and the current driver and the hardware works and the gpu encodning works fine with windows so the bug is related to Linux drivers with this card.
I have exactly the same error dl_fn->cuda_dl->cuInit(0) failed → CUDA_ERROR_SYSTEM_NOT_READY: system not yet initialized on my old pc on nvidia 750ti card. Everything works fine on windows 11. On linux just wont work - ubuntu 22.10 and 525 nvidia driver. No fix yet ?