Wayland on eGPU: NVIDIA driver failing to provide buffers

Hi.

Recently, I got a problem where plasmashell would not start on Wayland when using the NVIDIA proprietary driver on an eGPU. After some help at the KDE support forum (check topic here), we detected a bug in the NVIDIA driver where it fails to provide buffers usable on the Intel GPU.

Quoting the KDE developer:

importing the supplied dmabufs failed
The driver is supposed to make sure that can’t happen, so that should be a bug in the driver.

And:

But the NVidia driver failing to provide buffers usable on the Intel GPU is definitely a NVidia driver bug.

I have a laptop with an Intel integrated card + NVIDIA RTX 3080 eGPU. My Linux distro is KDE Neon. I did install the NVIDIA driver from the Canonical Proprietary GPU Drivers ppa. Tested with:
nvidia-driver-535
nvidia-driver-545
nvidia-driver-545-open
nvidia-driver-535-open

All of them give me the same results. I am uploading the result of nvidia-bug-report.sh to this topic so you check the logs.

nvidia-bug-report.log.gz (369.5 KB)