general/other cuda no longer works on blender or ffmpeg with nv-sglrun

Hi,

error with ffmpeg:
Code:
$ nv-sglrun ffmpeg -i GOLDENEYE_t00.mkv -vcodec hevc_nvenc -acodec copy test.mkv
hevc_nvenc @ 0xbd0cdade400] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_OPERATING_SYSTEM: OS call failed or operation not supported on this OS
[vost#0:0/hevc_nvenc @ 0xbd0cda35380] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Unknown error occurred
[out#0/matroska @ 0xbd0cda27a00] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.85 bitrate=   0.0kbits/s speed=33.9x    
Conversion failed!

error with blender (crashes):

Code:
$ nv-sglrun blender
shim init
GHOST/Wayland: error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Read prefs: "/home/julien/.config/blender/3.6/config/userpref.blend"
Assertion failed: ((flags & (MFD_CLOEXEC | MFD_ALLOW_SEALING)) == flags), function shim_syscall_impl, file src/libc/sys/syscall.c, line 206.
Abort trap (core dumped)
View attached file with SHIM_DEBUG=1 nv-sglrun ffmpeg

THANKS
 

Attachments

  • ffmpeg_debug.txt
    74.8 KB · Views: 17
Last edited by a moderator:
i just checked and i get the same error with that ffmpeg command

Code:
nv-sglrun ffmpeg -i input.mkv -c:v hevc_nvenc -c:a aac out.mp4

error

Code:
[hevc_nvenc @ 0x3591a2a8400] dl_fn->cuda_dl->cuInit(0) failed -> CUDA_ERROR_OPERATING_SYSTEM: OS call failed or operation not supported on this OS
[vost#0:0/hevc_nvenc @ 0x3591a374500] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Unknown error occurred
[out#0/mp4 @ 0x3591a2256c0] Nothing was written into output file, because at least one of its streams received no packets.

also obs studio gives an error when trying to use nvenc encoding
which i enable with nv-sglrun in the desktop entry for obs studio

20240419_16h03m34s_grim.png
 
Thanks for your return.
I forgot to specify my version, so:

FreeBSD version 14.0
package version -> quarterly

packages version:
linux-nvidia-libs-550.54.14
nvidia-driver-550.54.14
libc6-shim-20240106

The problem appeared since the last big update...
 
Code:
$ nv-sglrun clpeak :

shim init

Platform: NVIDIA CUDA
  Device: NVIDIA GeForce GTX 980
    Driver version  : 550.54.14 (FreeBSD)
    Compute units   : 16
    Clock frequency : 1304 MHz

    Global memory bandwidth (GBPS)
      float   : 178.16
      float2  : 185.20
      float4  : 188.74
      float8  : 157.47
      float16 : 117.25

    Single-precision compute (GFLOPS)
      float   : 4648.69
      float2  : 4819.67
      float4  : 4800.88
      float8  : 4771.46
      float16 : 4768.06

    No half precision support! Skipped

    Double-precision compute (GFLOPS)
      double   : 155.00
      double2  : 146.51
      double4  : 147.83
      double8  : 151.53
      double16 : 152.28

    Integer compute (GIOPS)
      int   : 1602.24
      int2  : 1602.07
      int4  : 1604.35
      int8  : 1502.01
      int16 : 1474.89

    Integer compute Fast 24bit (GIOPS)
      int   : 1596.49
      int2  : 1600.70
      int4  : 1600.57
      int8  : 1593.14
      int16 : 1586.24

    Transfer bandwidth (GBPS)
      enqueueWriteBuffer              : 12.12
      enqueueReadBuffer               : 11.12
      enqueueWriteBuffer non-blocking : 10.78
      enqueueReadBuffer non-blocking  : 10.69
      enqueueMapBuffer(for read)      : 12.00
        memcpy from mapped ptr        : 7.86
      enqueueUnmap(after write)       : 13.06
        memcpy to mapped ptr          : 7.94

    Kernel launch latency : 8.65 us
 
Last edited by a moderator:
freebsd 14 p6 quarterly

nv-sglrun clpeak

Code:
Yes Master ?  nv-sglrun clpeak
/usr/local/bin/with-glibc-shim:39:in `exec': No such file or directory - clpeak (Errno::ENOENT)
        from /usr/local/bin/with-glibc-shim:39:in `<main>'

nv-sglrun nvidia-smi

Code:
Yes Master ? nv-sglrun nvidia-smi
shim init
Fri Apr 19 17:08:56 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.14              Driver Version: 550.54.14      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1650        Off |   00000000:01:00.0 Off |                  N/A |
| N/A   41C    P8              1W /   50W |       0MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
 
I changed the version of both packages:
linux-nvidia-libs-550.54.14 -> linux-nvidia-libs-535.146.02
nvidia-driver-550.54.14 -> nvidia-driver-535.146.02

Now blender and ffmpeg work...
 
Here 14.0-RELEASE-p6 ; nvidia driver version = 550.54.14 ; packages = latest ; blender starts,nv-sglrun clpeak works ; nv-sglrun ffmpeg -i input.mkv -c:v hevc_nvenc -c:a aac out.mp4 --> same error as Napoleon.

Is this a bug ?
 
I compared the libcuda.so.550.54.14 and libcuda.so.535.146.02 libraries.
So the libcuda.so.550.54.14 library provided or uses a few additional functions:
Code:
alphasort64
eventfd
dup3
scandir64
cuFuncGetParamInfo
cuGreenCtxRecordEvent
cuModuleEnumerateFunctions
cuKernelGetName
cuGraphNodeGetDependentNodes_v2
cuFuncGetName
cuDevSmResourceSplitByCount
cuModuleGetFunctionCount
cuStreamGetGreenCtx
cuDeviceUnregisterAsyncNotification
cuGreenCtxCreate
cuStreamBeginCaptureToGraph
cuCtxFromGreenCtx
cuGreenCtxDestroy
cuLibraryGetKernelCount
cuStreamGetCaptureInfo_v3
cuStreamBeginCaptureToGraph_ptsz
cuDeviceGetDevResource
cuDeviceRegisterAsyncNotification
cuFuncIsLoaded
cuFuncLoad
cuGraphRemoveDependencies_v2
cuGreenCtxWaitEvent
cuDevResourceGenerateDesc
cuGraphNodeGetDependencies_v2
cuLibraryEnumerateKernels
cuGreenCtxGetDevResource
cuStreamGetCaptureInfo_v3_ptsz
cuGraphAddNode_v2
cuStreamUpdateCaptureDependencies_v2
cuGraphConditionalHandleCreate
cuCtxGetDevResource
cuKernelGetParamInfo
cuStreamUpdateCaptureDependencies_v2_ptsz
cuGraphAddDependencies_v2
cuGraphGetEdges_v2

If it helps....
 
Last edited by a moderator:
Back
Top