-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Using 57a476b on a Intel HD 620 iGPU / Nvidia 940MX setup.
$ grep -3 nvidia_drv ~/.local/share/xorg/Xorg.1.log
[ 24.929] (==) Matched vesa as autoconfigured driver 4
[ 24.929] (==) Assigned the driver to the xf86ConfigLayout
[ 24.929] (II) LoadModule: "nvidia"
[ 24.929] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so
[ 24.930] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 24.930] compiled for 1.6.99.901, module version = 1.0.0
[ 24.931] Module class: X.Org Video Drive
$ ls -laht /usr/lib/x86_64-linux-gnu/*/*so|grep nvidia
-rwxr-xr-x 1 root root 569K nov. 17 18:53 /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
lrwxrwxrwx 1 root root 27 sept. 28 05:20 /usr/lib/x86_64-linux-gnu/gbm/nvidia-drm_gbm.so -> ../libnvidia-allocator.so.1
lrwxrwxrwx 1 root root 29 sept. 28 05:20 /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_nvidia.so -> libvdpau_nvidia.so.535.274.02
-rw-r--r-- 1 root root 50K janv. 28 2023 /usr/lib/x86_64-linux-gnu/stubs/libnvidia-ml.so
-rw-r--r-- 1 root root 6400168 sept. 28 05:20 /usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so
$ NVD_BACKEND=egl NVD_LOG=1 LIBVA_DRIVER_NAME=nvidia strace vainfo --display drm 2>&1|grep dri/nvidia
write(2, "libva info: Trying to open /usr/"..., 77libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so", O_RDONLY|O_CLOEXEC) = 4
$ lspci |grep -i nvidia
01:00.0 3D controller: NVIDIA Corporation GM107 [GeForce 940MX] (rev a2)
$ NVD_BACKEND=egl NVD_LOG=1 LIBVA_DRIVER_NAME=nvidia vainfo --display drm --device /dev/dri/renderD128
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
860.425150595 [7350-7350] ../src/vabackend.c:2263 __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
860.425161653 [7350-7350] ../src/vabackend.c:2271 __vaDriverInit_1_0 Got DRM FD: 1 3
860.425170781 [7350-7350] ../src/vabackend.c:2283 __vaDriverInit_1_0 Now have 0 (0 max) instances
860.425175416 [7350-7350] ../src/vabackend.c:2307 __vaDriverInit_1_0 Selecting EGL backend
860.456237652 [7350-7350] ../src/export-buf.c: 144 findGPUIndexFromFd Looking for DRM device index: 128
860.459851505 [7350-7350] ../src/export-buf.c: 158 findGPUIndexFromFd Found 4 EGL devices
860.459984059 [7350-7350] ../src/export-buf.c: 167 findGPUIndexFromFd Got EGL_CUDA_DEVICE_NV value '0' for EGLDevice 0
860.459993918 [7350-7350] ../src/export-buf.c: 173 findGPUIndexFromFd Found drmDeviceIndex: 128
860.460009712 [7350-7350] ../src/export-buf.c: 188 findGPUIndexFromFd Selecting EGLDevice 0
860.461735985 [7350-7350] ../src/export-buf.c: 257 egl_initExporter Driver supports 16-bit surfaces
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: VA-API NVDEC driver [egl backend]
vainfo: Supported profile and entrypoints
860.531790136 [7350-7350] ../src/vabackend.c:2171 nvTerminate Terminating 0x55987bb234d0
860.531800270 [7350-7350] ../src/export-buf.c: 63 egl_releaseExporter Releasing exporter, 0 outstanding frames
860.531807348 [7350-7350] ../src/export-buf.c: 80 egl_releaseExporter Done releasing frames
860.531814267 [7350-7350] ../src/vabackend.c:2185 nvTerminate Now have 0 (0 max) instances
$ NVD_LOG=1 LIBVA_DRIVER_NAME=nvidia vainfo --display drm --device /dev/dri/renderD128
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver 'nvidia'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
841.485495787 [7172-7172] ../src/vabackend.c:2263 __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver
841.485509367 [7172-7172] ../src/vabackend.c:2271 __vaDriverInit_1_0 Got DRM FD: 1 3
841.485523157 [7172-7172] ../src/vabackend.c:2283 __vaDriverInit_1_0 Now have 0 (0 max) instances
841.485528998 [7172-7172] ../src/vabackend.c:2310 __vaDriverInit_1_0 Selecting Direct backend
841.516139316 [7172-7172] ../src/direct/nv-driver.c: 305 init_nvdriver Initing nvdriver...
841.516199978 [7172-7172] ../src/direct/nv-driver.c: 323 init_nvdriver NVIDIA kernel driver version: 535.274.02, major version: 535, minor version: 274
841.516208287 [7172-7172] ../src/direct/nv-driver.c: 330 init_nvdriver Got dev info: 100 1 0 fe
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
841.614762836 [7172-7172] ../src/vabackend.c:2171 nvTerminate Terminating 0x5799beea44d0
841.614857326 [7172-7172] ../src/vabackend.c:2185 nvTerminate Now have 0 (0 max) instances
$ nvidia-smi
Mon Nov 17 19:50:51 2025
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.274.02 Driver Version: 535.274.02 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| 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 940MX Off | 00000000:01:00.0 Off | N/A |
| N/A 58C P8 N/A / 200W | 2MiB / 2048MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 3909 G /usr/bin/gnome-shell 0MiB |
+---------------------------------------------------------------------------------------+
https://developer.nvidia.com/video-encode-decode-support-matrix shows that this card supports multiple H.264 profiles but none are provided by vainfo
$ ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128,driver=nvidia
[VAAPI @ 0x570edd5804c0] libva: VA-API version 1.20.0
[VAAPI @ 0x570edd5804c0] libva: User requested driver 'nvidia'
[VAAPI @ 0x570edd5804c0] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
[VAAPI @ 0x570edd5804c0] libva: Found init function __vaDriverInit_1_0
[VAAPI @ 0x570edd5804c0] libva: va_openDriver() returns 0
[VAAPI @ 0x570edd5804c0] Initialised VAAPI connection: version 1.20
[VAAPI @ 0x570edd5804c0] VAAPI driver: VA-API NVDEC driver [direct backend].
[VAAPI @ 0x570edd5804c0] Driver not found in known nonstandard list, using standard behaviour.
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
No error.
$ /usr/lib/firefox/vaapitest -d /dev/dri/renderD128 # nvidia
VAAPI_SUPPORTED
FALSE
$ /usr/lib/firefox/vaapitest -d /dev/dri/renderD129 # intel
VAAPI_SUPPORTED
TRUE
VAAPI_HWCODECS
12784
(unrelated, but I can't get Intel-accelerated enc/dec either anyway and... I don't have the required skills to make any sense of contemporary FF about:support page)