Jeff Geerling Shows Off an AMD Radeon GPU Running on the Raspberry Pi CM4 — After a Fashion

Two years in the making, Geerling is now able to show working video output and 3D acceleration from an external GPU on a CM4 — sort of.

Gareth Halfacree
2 years agoHW101

Jeff Geerling is celebrating a major milestone in a near two-year project: getting a high-performance external graphics card working on a Raspberry Pi Compute Module 4, via its PCI Express slot — after a fashion, at least.

"In October 2020, after Raspberry Pi introduced the Compute Module 4, I started out on a journey to get an external graphics card working on the Pi," Geerling explains. "At the time, it'd been over a decade since the last time I'd built a PC, and I had a lot to learn about PCI Express, the state of graphics card drivers in Linux, and PCI Express support on various ARM SoCs."

Jeff Geerling's two-year quest to run an external GPU on a Raspberry Pi has hit a major milestone, with partial success. (📹: Jeff Geerling)

The initial stages of the project were beset with failure: Multiple graphics cards, from NVIDIA and its rival AMD, were tried without success — primarily due to just how different the Raspberry Pi 4 hardware is when compared to the traditional computers for which the graphics cards were designed.

"Along the way, dozens of people (from AMD engineers, to ARM enthusiasts, to fellow hobbyists like me) helped explore the dark, dusty corners of the BCM2711 — Broadcom's ARM SoC that powers the Raspberry Pi Compute Module 4," Geerling recounts. "What we found is the BCM2711's PCIe root complex is fundamentally broken, at least when it comes to some memory operations on 64-bit Linux."

That doesn't mean the mission was impossible, however, as proven by Geerling's latest, albeit limited, success — thanks to the development of a patch to the Linux kernel from Coreforge, designed to work around the aforementioned memory operation issues.

While the patches make things functional, though, they're still not exactly perfect. "DisplayPort, VGA, HDMI, and DVI ports [all work]," Geerling notes. "The command line (console), Xorg, and Weston (a reference implementation of Wayland), as well as some 3D benchmarks and applications that use OpenGL [also work]. But Xorg especially shows a lot of 'glitches' in its output, especially when interacting with different screen elements."

"Weston didn't have the same glitchy behavior, but ran a bit sluggish and would often lock up after a while (necessitating a soft reboot). glmark2-drm and glxgears usually ran all the way through, but sometimes would lock up in the middle of a run. I won't say never, but it's highly unlikely a Compute Module 4 will do anything outside of highly specialized external-GPU-related tasks — and that's assuming we haven't hit a dead end already."

Geerling's full write-up is available on his website, along with links to the patches and instructions for getting up and running with a Radeon 5xxx, 6xxx, or 7xxx series GPU on the Raspberry Pi Compute Module 4.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles