[T400 4GB] [LX2160ARDB]: Observing "MMU Fault: ENGINE HOST3 HUBCLIENT_HOST FAULT_PDE ACCESS_TYPE_VIRT_READ with T400 card on LX2160

We are using T400 pcie card connected to our LX2160 layerscape board. We intend to utilize T400 hardware encoders on Debian running on our LX platform.

kernel - 6.6.52-rt43-ga24fad0ebb9a

Proprietary driver didn’t work for us as our platform is not supported, and we faced the following error while running ‘nvidia-smi’:-

NVRM: nvAssertOkFailedNoLog: Assertion failed: Generic Error: Invalid state [NV_ERR_INVALID_STATE] (0x00000040) returned from sysmemData == vidmemData

to override this, we had installed MIT/GPL open-gpu-kernel-modules and commented this specific line complaining about the sysmem and vidmem Data:-

NV_ASSERT_TRUE_OR_GOTO(status, sysmemData == vidmemData, NV_ERR_INVALID_STATE, failed) in src/nvidia/src/kernel/gpu/mem_mgr/mem_mgr.c

Also we have added our platform’s vendor and device id in the allowed arm list so that it doesn’t give any platform related warnings.
After this change, we were able to get nvidia system management interface

±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.95.05 Driver Version: 580.95.05 CUDA Version: 13.0 |
±----------------------------------------±-----------------------±---------------------+
| 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 T400 4GB Off | 00000001:01:00.0 Off | N/A |
| 36% 36C P0 N/A / 31W | 0MiB / 4096MiB | 0% Default |
| | | N/A |
±----------------------------------------±-----------------------±---------------------+

±----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
±----------------------------------------------------------------------------------------+

we tried running basic ffmpeg test using the below command:-

ffmpeg -f lavfi -i testsrc=duration=10:size=640x480:rate=30 -c:v h264_nvenc test_small.mp4

this throws the following error:-

libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, lavfi, from ‘testsrc=duration=10:size=640x480:rate=30’:
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480 [SAR 1:1 DAR 4:3], 30 tbr, 30 tbn
Stream mapping:
Stream #0:0#0:0 (rawvideo (native) → h264 (h264_nvenc))
Press [q] to stop, [?] for help
[ 1591.936510] NVRM: GPU at PCI:0001:01:00: GPU-c323c8b4-123e-a085-7121-70832466670e
[ 1591.944007] NVRM: GPU Board Serial Number: 1421123024548
[ 1591.949314] NVRM: Xid (PCI:0001:01:00): 31, pid=1482, name=ffmpeg, channel 0x0800001e, intr 00000000. MMU Fault: ENGINE HOST9 HUBCLIENT_HOST faulted @ 0x8c_042a1000. Faul
t is of type FAULT_PDE ACCESS_TYPE_VIRT_READ
[h264_nvenc @ 0xaaab0e0abd40] InitializeEncoder failed: generic error (20): EncodeAPI Internal Error.
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
Conversion failed!

can you help us resolve this issue?