Closed am-silex closed 4 months ago
Was there anything logged to dmesg when that fails?
Unfortunately, I haven't captured it if there were any.
I faced the same issue with GT 710 on Arch Linux. My configuration:
$ nvidia-smi
Tue Jan 23 10:41:05 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.223.02 Driver Version: 470.223.02 CUDA Version: 11.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 ... Off | 00000000:03:00.0 N/A | N/A |
| 50% 53C P8 N/A / N/A | 390MiB / 972MiB | N/A Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$ NVD_LOG=1 vainfo
Trying display: wayland
Trying display: x11
libva error: vaGetDriverNames() failed with unknown libva error
2112.181239814 [46312-46312] ../src/vabackend.c:2154 __vaDriverInit_1_0 Initialising NVIDIA VA-API Driver: 10
2112.181261395 [46312-46312] ../src/vabackend.c:2163 __vaDriverInit_1_0 Now have 0 (0 max) instances
2112.181268728 [46312-46312] ../src/vabackend.c:2189 __vaDriverInit_1_0 Selecting Direct backend
2112.188908482 [46312-46312] ../src/direct/direct-export-buf.c: 66 direct_initExporter Searching for GPU: 0 0 128
2112.188941796 [46312-46312] ../src/direct/direct-export-buf.c: 88 direct_initExporter Found NVIDIA GPU 0 at /dev/dri/renderD128
2112.188950457 [46312-46312] ../src/direct/nv-driver.c: 254 init_nvdriver Initing nvdriver...
2112.189014851 [46312-46312] ../src/direct/nv-driver.c: 272 init_nvdriver NVIDIA kernel driver version: , major version: 0, minor version: 0
2112.189026794 [46312-46312] ../src/direct/nv-driver.c: 279 init_nvdriver Got dev info: 300 1 0 fe
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
2112.301236097 [46312-46312] ../src/vabackend.c:2064 nvTerminate Terminating 0x5fd132601660
2112.301388423 [46312-46312] ../src/vabackend.c:2078 nvTerminate Now have 0 (0 max) instances
Although, I haven't saved dmesg logs, I can confirm that error was the same
Failed to import NVKMS memory to GEM object
As far as I can tell the GT710 isn't supported by nvenc/nvdec. (at least the matrix posted on the nvidia site doesn't mention the GT710)
NVENC: No Support NVDEC: 1st Gen PureVideo HD: VP5 VDPAU: Feature Set D
https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new#geforce doesn't mention it. I'd trust nvidia as a source more than a third party for this. edit I suspect that former versions of the nvidia-driver/cuda/ffnvcodecs combination might have supported the GT710, but current versions don't. You might get lucky when downgrading the nvidia-driver
That page displays only currently supported GPUs GT710 is outdated and only supported by 470 driver series
Does mpv work with --hwdev=nvdec
? Also, you might also try removing this code DRF_DEF(OS32, _ATTR, _PAGE_SIZE, _BIG) |
from the nv-driver.c file.
Removed and recompiled as suggested by @elFarto DRF_DEF(OS32, _ATTR, _PAGE_SIZE, _BIG) |
from nv-driver.c file.
Unfortunately, the result is the same - dmesg produces this
[ 185.750207] [drm:nv_drm_gem_import_nvkms_memory_ioctl [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to import NVKMS memory to GEM object
Yes, mpv works as well as other apps utilizing vdpau and nvdec directly, like Kodi
mpv --hwdec=nvdec 720.mp4 (+) Video --vid=1 () (h264 1280x720 25.000fps) (+) Audio --aid=1 () (aac 2ch 48000Hz)
Shouldn't this be titled "problems with driver 470" perhaps? Does that 2021 driver still actually work with other cards and newer nvidia-vaapi?
Ok, can you try rerunning with NVD_BACKEND=egl
set?
Ok, can you try rerunning with
NVD_BACKEND=egl
set?
No errors and no hw offload, cpu utilization is as high as usual
Shouldn't this be titled "problems with driver 470" perhaps? Does that 2021 driver still actually work with other cards and newer nvidia-vaapi?
Although, the root cause might be to the NVIDIA driver version, the driver itself works perfectly. All the other apps can offload supported video decoding through VDPAU API to NVDEC.
Does mpv work with --hwdev=nvdec
Yes, it works. NVENC is also working (limited by H.264), I tested NVENC in the NoMachine remote access app. The latest Linux driver version for GT 710 is 470.223.02.
It's interesting, this specs claims that NVENC not supported on GK208B
My NVIDIA GeForce GT 710 1 GB DDR3 (GK208B) supports both NVENC and NVDEC.
$ sudo lshw -class display
*-display
description: VGA compatible controller
product: GK208B [GeForce GT 710]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:03:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:49 memory:fa000000-faffffff memory:e8000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:fb000000-fb07ffff
Just stop using those awful compilation websites https://www.nvidia.com/en-us/geforce/forums/geforce-graphics-cards/5/280359/does-the-geforce-gt-710-have-nvenc/
With this said, I just installed 470.223.02 on my 2080S and yes I'm getting the same error OP has. Meanwhile the egl backend is giving me #218
Actually this is too a regression caused by bb7752d37412b05f0151e60904f5e743d08ec297
@mirh all right, such mashup sites are not reliable. However, NVENC support for the matter of this project is irrelevant, I believe. Main use case implementing VA-API is to comfortably watch online videos in Firefox.
Ok, found the issue. It seems the 470 series has changed how it returns the version number. I've push a fix for it to master.
Should I worry about this?
[ 41.790153] NVRM: API mismatch: the client has the version , but NVRM: this kernel module has the version 470.223.02. Please NVRM: make sure that this kernel module and all NVIDIA driver NVRM: components have the same version.
And I can't confirm that it works. Here is a comparison in CPU usage while playing the same sample in h264 format | mpv | Firefox Nightly | Firefox (snap) |
---|---|---|---|
~5% | ~15% | ~20% |
Firefox Nightly uses slightly less in CPU in other scenarios (YouTube with h264ify, other streaming web sites)
Hmm, the error isn't really a problem, it's a result of me having to call the check version function in a different way. I don't think I'll be able to work around it on the 470 drivers, but I should be able to do on the 500+ series.
To check if the GPU is being used for decode, use something like nvidia-smi pmon
, and look in the dec
column.
With you last commit I can confirm that the driver works, despite dmesg log.
Even Kodi now switched to ff-h264-vaapi (HW)
when playing videos or watching DVB channels, CPU utilization is the same as with vdpau
.
However, FIrefox uses a higher percentage playing the same sample. I reckon it is due to some overhead in its internal implementation and has nothing to do with the driver. When starting playing something, dmesg spits this info, too.
nvidia-smi pmon
isn't supported on GT710
Not supported on the device(s) Failed to process command line
Thank you for you work!
I also confirm that VA-API is now functional on my GT 710 on the latest (master) driver version built with nv-codec-headers v11.1. I check the GPU usage using NVIDIA's nvidia-settings GUI tool and get about the same video engine utilization when using both NVDEC and the VA-API, when playing a H.264 video using the mpv player. Here's how I installed the driver with the correct nv-codec-headers version for GT 710 on Arch Linux:
paru -S aur/ffnvcodec-headers-11-1 aur/libva-nvidia-driver-git
Thank you for your hard work!
Hi Sorry to bother you, just playing with your project and have this issue. My config:
lshw -class display
vainfo
Firefox vaapi log