A Dedicated GPU For Your Favorite SBC

The Raspberry Pi is famous for its low cost, versatile and open Linux environment, and plentiful I/O, making it a perfect device not only for its originally-intended educational purposes but for basically every hobbyist from gardeners to roboticists to amateur radio operators. Most builds tend to make use of the GPIO pins which allow easy connections to various peripherals and sensors, but the Pi also supports PCI devices which means that, in theory, it could use a GPU in much the same way that a modern computer would. After plenty of testing and development, [Jeff Geerling] brings us this custom graphics card interface for the Raspberry Pi.

The testing for all of these graphics cards has been done with a Pi Compute Module 4 and the end result is an interface device which looks much like a graphics card itself. It splits the PCI bus out onto a more familiar x16 slot connector and adds physical connections for power, USB, and Ethernet. When plugged into the carrier board, the Compute Module can be attached to any of a number of graphics cards, including the latest and highest-end of Nvidia and AMD offerings.

Perhaps unsurprisingly, though, the 4090 and 7900 cards don’t work with the Raspberry Pi. This is partially due to the 32-bit limitations of the Pi and other memory mapping issues, but even after attempting some workarounds Nvidia’s cards aren’t open-source enough to test properly (although the card is recognized by the Pi) and AMD’s drivers crash the system even after compiling a custom kernel. [Jeff] did find an Nvidia card that worked, although it requires using the USB interface and second-hand cards are selling for around $3000 USD. For a more economical choice there are some other graphics cards that he was eventually able to get working, albeit not with perfect performance, including some of the ones we’ve seen him test already.

35 thoughts on “A Dedicated GPU For Your Favorite SBC

        1. I honestly think raspberry pi is what options traders call “out of the money” for the price they are asking, I think you can do better with le-potato or better yet the risc-v chips si-five are about to make pi’s a novelty anyways just run armbian. Sometimes in life we must step outside the comfort zone and abandon companies that have abandoned us. I support le-potato

          1. Yes… it’s not like there are no other options. The RPi is in a niche’ and supporting many well there. There are many, many options for education and small (and individual) developers out there now and more economical at that. Good call, on supporting le-potato!

      1. What was raspberry pis original purpose? Education, not commercial use but they have shifted now and prioritise commercial or industrial customers.

        1. Oh noes, new markets opened up that are more critical to support than the original purpose, but I’m gonna keep whining that it wasn’t intended for that, so they should just deny a bunch of people their livelihood so that people can keep using their products as toys!

          Get over it. Plenty of products were created for one thing and ultimately ended up being used for others. I don’t hear you whining about makers using super glue as a general purpose adhesive when it was originally intended to close up wounds, and I don’t hear your bawling about how duct tape was intended for ducts but is used for everything but ducts now days.

          When your livelihood depends on access to Raspberry Pis, then you can whine this all you want. Otherwise, you are acting like a selfish, entitled brat who doesn’t care about anyone but himself. I would love to get my hands on more Pis, but unlike you, I recognize that education doesn’t matter to people who are starving to death, because “education” is being put ahead of their ability to earn a living. It’s true that Pis were originally intended as educational products. Then a bunch of stuff happened, including industries being built around Pis, and poorly thought out COVID response leading to long term supply line issues. Things change. The Pi is an awesome educational product, but it has become far more than that, and the Pi Foundation now has to choose between education, for which their product sparked a massive explosion in other products for, and parents and their children earning enough money to feed themselves. Change can be hard, but if you can’t see that they made the right choice, you are part of the problem.

          I, on the other hand, have decided to use those other products that don’t have industries and individuals relying on them for their very survival to educate my kids. Adafruit has a bunch of absolutely lovely options that are, quite frankly, a lot less intimidating than a full SBC, where I can teach my kids much lower level stuff on much less complex platforms. The RP2040 (also made by the Pi Foundation, in case you weren’t aware) is still very much available, and in my opinion, it is a better starting educational platform than the Pi anyway. If you can’t find the official RP2040 board (or just don’t like the form factor that much, like me), Adafruit has done absolutely awesome work producing their own boards around the chip, with very simple connector based interfaces integrated right in. CircuitPython is excellent for learning, but you can also use Arduino, and even C++ or C are options for more advanced educational use or for professional uses even. Furthermore, the size of the Adafruit offerings (the QT Py 2040, especially) makes them ideal for very small embedded uses, which is absolutely great for educational projects, especially for children.

          The fact is, the Pi Foundation is doing an absolutely epic job of providing for the educational space. If you want education, the RP2040 is the ideal educational board. It so much cheaper. It’s easier to use. And you can take it to a similar depth. Raspberry Pis might seem pretty reasonable classroom education devices at ~$35 a pop, but the truth is, they are pretty heavy weight. For a school with 1,000 students, you are looking at $35,000, just for the Pis. More affluent schools have been able to afford Pis for pilot classes and some even for a regular elective course with a size limit, but the dream of giving every kid a Pi has turned out to be pretty hard even at that price point. And that isn’t even considering the peripherals. I actually taught a college course for ARM assembly programming, using Pis, and it was a real challenge, due to lack of peripheral availability. For one term, I had to spend a few class periods teaching my students how to setup PAN networks between their Pis and their laptops, so they could SSH into the Pis and use them that way. Another term, we managed to get the electronics lab for our classroom, which had several full peripheral setups (except SD card) that students could share (but we also had to share the lab with students working on other projects). And that’s a fairly well funded college! The truth is, the Raspberry Pi was an absolutely awesome starting place for the Foundation, not because it was the ideal learning machine, but because it was the perfect price point for commercial uses. This made it a viral product that provided plenty of funding for the Foundation to make something better for education. But it never was an ideal learning product. It requires a lot of peripherals to be useful, even if you can just SSH into it from a computer you already own. The minimum price you are going to pay for a Pi is around $60, because you need that SD card and a power supply. It’s popularity has always made getting Pis difficult, even when the Foundation wasn’t prioritizing businesses, and that made it a poor choice for classroom use. Every semester that I taught the ARM assembly course, students struggled to find Pis, and my class size ranged between 10 and 20 students. Imagine public school classes with 30+ students trying to get Pis for all of the students. Sorry, but the Pi has never been a viable option for large scale educational use. The Foundation has just never been able to get it manufactured at the scale necessary for it to be a valid educational tool on the scale they intended. It failed its intended purpose. That’s just a fact. So they adapted, very wisely, moving it to a business product where surplus is sold to the hobby market, and they gave their original goal another go.

          The RP2040 is the educational product the Foundation was originally going for. The Pico only costs $4 on Adafruit. That takes the $35 price point of the Pi and beats it by almost 9 times. For 1,000 students, that’s only $4,000. Peripherals are also much cheaper. For the Pico, all you need is a USB cable. Sure, you’ll probably want additional peripherals to attach to the GPIO, but you would have needed that for the Pi as well. In addition, where $35 will add up very fast to replace Pis that students break, $4 is much more reasonable. In addition (something the Raspberry Pi doesn’t have), Adafruit’s QT Py 2040 has a Stemma connector, which is better for younger students who may struggle with GPIO pins. Adafruit has plenty of peripherals that use the Stemma connector (and they aren’t the only ones). The QT Py 2040 will cost you ~$10, so the expense is a bit higher, but the safer interface makes it an excellent choice for schools that can afford it, and it’s still a third the price of a Pi. (Also, it comes with an RGB LED, providing more capability without additional components.) Basically, for the $35 you would pay for a Pi with none of the required peripherals, you can get a QT Py 2040, a USB cable for it, and several peripheral boards. For the $60+ that you would pay for the most basic usable Pi setup, you can get the QT Py 2040 and enough additional stuff to do a whole complete project with it. I know this, because I’m actually doing this with my kids. The most project cost around $90 total. The least expensive project cost under $30! (So actually, you can do a whole project with a QT Py 2040 for less than just the Pi and nothing else. It’s essentially a “mood” amulet, with a temperature/humidity sensor and some of those circular Neopixel boards. You can do a digital compass project with circular Neopixel boards for ~$40.)

          If you want the Foundation’s educational product, you are looking in the wrong place. The Pi is their money maker, to fund the educational stuff. The educational product is the RP2040. If you don’t like that, tough. I too wish Pis were readily available, but they aren’t, and the most critical market for them is the business market. I understand the wisdom in the Foundation’s decision to move the Pi to a business product and produce a better educational product in its place. If you don’t, you might just be an extremely selfish person who is incapable of thinking about the well being of others. Don’t be like that. It makes the world worse for everyone.

          1. Sure that’s why anyone can still find raspberry Pis if they are willing to spend 200plus for a bunch of extra crap you don’t need. Companies definitely aren’t buying them so they can turn large profits with bundles

        1. We use the RPi Compute Module in several high-end lab products. The Compute Module was designed specifically for commercial applications and is at the heart of over one hundred commercial products. They have eMMC Flash (no CF card), ethernet, PCIe interface, 2X HDMI/DVI video, 2X CSI/DSI interfaces. What’s not to like? These modules are used in products produced by people like Sharp, Berghoff and others. I’m curious to know what factual information you base your statement on?

          1. And when you need 40,000 you can get them? I’m basing mostly on availability, and a little on proprietary chip. The feature are pretty standard. What do they cost in volume and what is delivery date these days?

          2. And high-end lab products aren’t high volume products, so you’ll never need anywhere near say, 40,000 RPi Compute Modules at a time, or maybe even over the entire lifetime production of the lab product. Sounds pretty ideal to me!

            No, the Pi actually failed as an educational product, because the Pi Foundation never managed to mass produce them on the necessary scale, and even $35 is too expensive when you are talking about school districts with thousands of students. It was an awesome proof-of-concept, but it’s real success was always in commercial applications. Instead of being the educational flagship product of the Foundation, it ended up being the money maker that ultimately produced the funding for the real educational product: The RP2040.

      2. they were originally made for education and not stupid flashy advertisements on the side of a highway that just suck power and contribute light pollution

        sod off.

        1. Made for education, or it was a tax dodge. People from Broadcom working for free and supplying hardware, tax exemptions, grants from government. Followed by dumping below cost in the US and other markets. Why the hacker press put on a full blitz in favor of the RPi I have never figured. It certainly stifled dozens or hundreds of small developers and their innovations.

        2. And they failed in that purpose, because the Foundation never managed to mass produce them at the necessary scale, and even $35 is too expensive for large scale educational use.

          Only a selfish, entitled jerk would endorse education ahead of people’s livelihood. Starving kids don’t need Pis. Plenty of products were made for a particular purposed, failed in that purpose, and were ultimately used for some other purpose. The Pi is the Foundations funding provider. If you want an educational product, they made the RP2040 for that, when they finally realized what a failure the Pi was in that space.

          1. Methinks thou dost protest too much (based on your earlier massive screed). And I take issue with your statement that seems to diminish the importance of education. Anyone who can scrape $35 together should be able to buy a Pi and learn, but they can’t because they’re all being used for in-store advertising by slick marketing professionals.

    1. Strange, I’m not using any for industrial applications and I’ve purchased 8 CM4s in the past year. Sure I can’t just buy one on the spot, when I want, but using rpilocator’s rss feed I’ve still been able to get them. Although one technically is industrial like being it’s Seeed’s HMI.

    2. Based on checking rpilocator over the last 2 weeks, I think that’s starting to change. Pi Zero Ws are popping up almost daily from multiple suppliers and Pi 4s every few days. A month or two ago it was *much* less frequent.

      1. When AdaFruit and the PI Shop have them ‘in stock’ with maximum of 5 and no two factor authentication to order to keep out the bots…. Then I’ll believe they are finally ‘back’ in circulation. So far the well is ‘dry’ with max of 1, ‘in stock’ 0.

  1. If there were 32bit address problems, I would have thought it logical to go with the last GPUs that supported winXP like a Fermi core GF108 which still appear to be available new in GT730. Of course you still have a problem that the video BIOS is x86 code, so probably need a wrapper to handle it. This still gets you fairly advanced video codecs that Linux has(had?) support for.

    Wishful fanboi thinking aside, the Pi CPU is barely able to take full advantage of something several generations older than that really, i.e. something along the lines of a HD2400 or 7300GT. Then anything less than 16 lanes of PCIe is gonna make anything above HD6450/GT440 not worth it on the pixel pushing front, even if the core octuples it’s FLOPs and MIPs. Though OpenCU/CUDA etc might be somewhat functional, and codecs get better.

    1. > Of course you still have a problem that the video BIOS is x86 code

      Doesn’t matter unless you want to use the display on bootup.

      I pulled an ATI pcie video card from a Sun workstation (that I ran headless anyway) to add a second monitor to my x86 box. It had firmware with sparc code. But, it “just worked” once X was started on the x86 linux box.

    2. Making use of a GPU doesn’t always need much in PCIe bus speed or CPU performance – what tasks are you sending the GPU really matters there, and if you are SERIOUSLY putting a GPU on a tiny low power arm chip it is presumably because you need lots of GPU style compute or vast GPU memory but not much else… We all know why its really being done is just to prove it can really, but maybe somebody will find a valid use case…

      As I do agree in general, with the relatively low cost and availability of recent AMD APU if you want low power and good graphics crunching you likely get better perfomance than the pi with a dedicated graphics card, or if space was the primary concern I guess the Nvidia embedded systems and things like the Steamdeck or framework motherboard would make valid if more costly choices. But pairing a Pi4 SOC or any of the similar little ARM SBC’s out there with a GPU really doesn’t make sense most of the time.

  2. It’s not so much a 32-bit address problem from my experience. its a non-aligned DMA problem. Tons of PCIe devices don’t work right on ARM boards because of trying to do non-aligned 32-bit DMA. I even experienced it with USB devices on ARM before. Sticking a USB network device downstream of a hub used to be a real problem, suddenly the buffers weren’t aligned and DMA would fail in spectacular ways.

Leave a Reply to Conor A StewartCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.