-
-
Notifications
You must be signed in to change notification settings - Fork 164
Description
I've been following this project since its early days with the CM4 and Jeff's first video on the long and hard fight with the Pi 4's broken PCIe bus. I only recently ordered an eGPU dock, and am waiting for it to arrive. I'm well aware of the existing rm_init_adapter failed!
issues on NVIDIA's proprietary ARM64 drivers, but I have an idea of my own. What if I make an x64 VM on this Pi, PCIe passthrough the GPU to the VM, and use the NVIDIA proprietary drivers from there? It doesn't have to work well; I can afford an RX 580 or just use my ancient Radeon HD 7870 on this thing. I'm legitimately just curious to see just how much can I do, short of active kernel patching, to get this awful idea to work.
I've already set up the VM, with active VirGL rendering (Emulation is slow enough that software rendering the desktop really hurts (kde was not usable but did run with the vga fb device) and I wanted to see how viable 3D acceleration really was on the VM in the first place), the NVIDIA proprietary drivers installed, and a basic DE (LXDE).

The emulated x64 machine runs... not amazingly, but it is somewhat usable surprisingly. It's about on par with a stock Pi 3 with near VC7 rendering capability. Modprobing the NVIDIA drivers works as expected, with it not detecting the card, as there is no card even plugged in yet.

I'll update later when the dock arrives and send a screenshot of the card being recognised if it does end up working. I did realize when writing this issue that an x64 VM only solves the issue of "code optimised for x64 not working right on ARM" and not the PCIe quirks (which will still be present bc PCIe passthrough just passes through the host interface), but hopefully I can help get us closer to a possible solution with NVIDIA cards.
If this works, I'll then test out using VirtualGL to render to an x-server on the VM and display it via the GPU video out ports. I can then test some native ARM OpenGL apps, and have them render on the NVIDIA card. It probably won't be amazing, and Vulkan likely won't work, but I'll at least be able to run the apps on the ARM side, so we're not slowed down by the emulated OS.