Trying (And Failing) To Use GPUs With The Compute Module 4

The Raspberry Pi platform grows more capable and powerful with each iteration. With that said, they’re still not the go-to for high powered computing, and their external interfaces are limited for reasons of cost and scope. Despite this, people like [Jeff Geerling] strive to push the platform to its limits on a regular basis. Unfortunately, [Jeff’s] recent experiments with GPUs hit a hard stop that he’s as yet unable to overcome.

With the release of the new Compute Module 4, the Raspberry Pi ecosystem now has a device that has a PCI-Express 2.0 1x interface as stock. This lead to many questioning whether or not GPUs could be used with the hardware. [Jeff] was determined to find out, buying a pair of older ATI and NVIDIA GPUs to play with.

Immediate results were underwhelming, with no output whatsoever after plugging the modules in. Of course, [Jeff] didn’t expect things to be plug and play, so dug into the kernel messages to find out where the problems lay. The first problem was the Pi’s limited Base Address Space; GPUs need a significant chunk of memory allocated in the BAR to work. With the CM4’s BAR expanded from 64MB to 1GB, the cards appeared to be properly recognised and ARM drivers were able to be installed.

Alas, the story ends for now without success. Both NVIDIA and ATI drivers failed to properly initialise the cards. The latter driver throws an error due to the Raspberry Pi failing to account for the I/O BAR space, a legacy x86 feature, however others suggest the problem may lay elsewhere. While [Jeff] may not have pulled off the feat yet, he got close, and we suspect with a little more work the community will find a solution. Given ARM drivers exist for these GPUs, we’re sure it’s just a matter of time.

For more of a breakdown on the Compute Module 4, check out our comprehensive article. Video after the break.

Continue reading “Trying (And Failing) To Use GPUs With The Compute Module 4”

Getting Over 4Gbps Out Of A Compute Module 4

For the average home gamer, good old fashioned Ethernet at 100 Mbit/s is only just starting to become a bottleneck as things like 4K video streaming begin to demand more bandwidth. As always, though, there are those who wish to push the limits of what is possible. [Jeff Geerling] is one such operator, who set out to maximise the network throughput on the Raspberry Pi Compute Module 4. 

The build began by taking advantage of the PCI-Express 2.0 single lane interface on the new Raspberry Pi Compute Module. Hooked up to an Intel four-port Gigabit Ethernet card, and in combination with the onboard Gigabit-E port, [Jeff] was able to get 3.0 Gbit/s out of the setup without too much fuss. However, he wanted more, and set about finding where he was being held back. It turned out that ksoftirqd, a daemon that handles network packets, can only run on one core on the Raspberry Pi 4, and it was getting maxed out at this data rate. Overclocking the CPU helped, getting the max rate up to 3.4 Gbit/s.

Further analysis showed that the onboard interface was only contributing 200 Mbit/s, with the Intel card maxing out at 3.2 Gbit/s. In the case of the latter, this was due to the limits of the PCI-E interface. In the case of the former, however, [Jeff] knew that more was available. The trick turned out to be recompiling the Linux kernel to allow the internal interface to be able to set to use a higher Maximum Transmission Unit. This allows each network transmission to carry more data without extra CPU load. With the internal interface and the external card all set to an MTU of 9000, the Pi was able to spit out a scorching 4.15 Gbit/second. Details of the hack are available on Github for the curious.

It’s a hack that doesn’t offer a lot to the average user, though [Jeff] states he has some interesting applications in mind. He’s also contemplating what can be achieved with a 10 Gbit card, which we can’t wait to see. If you want to learn more about the Compute Module’s features, including a couple of tips for laying out yor own board, check out our review. Video after the break.

Continue reading “Getting Over 4Gbps Out Of A Compute Module 4”

Ethernet Goes To The Ether

Since the ether is an old term for the fictitious space where radio waves propagate, we always thought it was strange that the term ethernet refers to wired communication. Sure, there are wireless devices, but that’s not really ethernet. [Jacek] had the same thought, but decided to do something about it.

What he did is use two different techniques to alter the electromagnetic emission from an ethernet adapter on a Raspberry Pi. The different conditions send Morse code that you can receive at 125 MHz with a suitable receiver.

Practical? Hardly, unless you are looking to exfiltrate data from an air-gapped machine, perhaps. But it does have a certain cool factor. The first method switches the adapter between 10 Mbps and 100 Mbps. The second technique uses a stream of data to accomplish the modulation. The switching method had a range of around 100 meters while the data-based method topped out at about 30 meters. The code is on GitHub if you want to replicate the experiment.

There is plenty of precedent for this sort of thing. In 1976 Dr. Dobb’s Journal published an article about playing music on an Altair 8800 by running code while an AM radio was nearby. We’ve seen VGA adapters forced to transmit data, too.

Continue reading “Ethernet Goes To The Ether”

A Super UPS For The Pi

One of the problems with using a Raspberry Pi or most other systems in a production environment is dealing with sudden shutdowns due to power loss. Modern operating systems often keep data in memory that should be on disk, and a sudden power cycle can create problems. One answer is an uninterruptible power supply, but maintaining batteries is no fun. [Scott] wanted to do better, so he built a UPS using supercapacitors.

A supercapacitor UPS is nearly ideal. The caps charge quickly and don’t wear out as a battery does. The capacitors also don’t care if they stay in storage for a long time. The only real downside is they don’t have the capacity that batteries can have, but for a small computer like a Pi Zero it is pretty easy to gang up enough capacitors to do the job.

Continue reading “A Super UPS For The Pi”

E-Paper Weather Display Is A Great Base To Build From

As e-paper modules have become more affordable, we’ve started to see them pop up more and more in hacker projects. It used to be that you had to force a second-hand Kindle to do your bidding, but now you can buy just the screen itself complete with a header to plug right into your Raspberry Pi. It will still cost you as much as a used Kindle…but at least it comes with some documentation and there are Python libraries to talk to it.

But where to start? If you need some inspiration, and perhaps a little source code, this very slick weather display put together by [James Howard] is a great as baseline. Not that it really needs any additional refinement, as we think it already looks gorgeous. But rather than starting from scratch for your own project, it would be much easier to graft some additional functionality onto his code.

A lot of that has to do with how concise and well commented his code is. We’ve seen enough of these projects to know the kind of spaghetti that’s often running on the backend, but there’s none of that here. [James] assembles the display using the powerful Pillow graphics library, which lets you draw primitives and drop in text and icons with just a couple lines of code.

Once all the data is plugged in, the entire screen is saved as an image file which is then opened up on the e-paper display. Even if you aren’t a Python expert, you should be able to understand what’s happening and how to bend it to your will.

We’ve always had high hopes for electronic paper, and it seems the technology might finally be hitting critical mass. While it’s still a bit expensive, we’ve started seeing it pop up in unexpected places to great effect. Hopefully projects like this one will inspire others to take the B&W plunge.

New Raspberry Pi 400 Is A Computer In A Keyboard For $70

The newest Raspberry Pi 400 almost-all-in-one computer is very, very slick. Fitting in the size of a small portable keyboard, it’s got a Pi 4 processor of the 20% speedier 1.8 GHz variety, 4 GB of RAM, wireless, Ethernet, dual HDMI outputs, and even a 40-pin Raspberry Standard IDE-cable style header on the back. For $70 retail, it’s basically a steal, if it’s the kind of thing you’re looking for because it has $55 dollars worth of Raspberry Pi 4 inside.

In some sense, it’s getting dangerously close to fulfilling the Raspberry Pi Dream. (And it’s got one more trick up it’s sleeve in the form of a huge chunk of aluminum heat-sinked to the CPU that makes us think “overclocking”.)

We remember the founding dream of the Raspberry Pi as if it were just about a decade ago: to build a computer cheap enough that it would be within everyone’s reach, so that every school kid could have one, bringing us into a world of global computer literacy. That’s a damn big goal, and while they succeeded on the first count early on, putting together a $35 single-board computer, the gigantic second part of that master plan is still a work in progress. As ubiquitous as the Raspberry Pi is in our circles, it’s still got a ways to go with the general population.

By Gareth Halfacree  CC BY-SA 2.0

The Raspberry Pi Model B wasn’t, and isn’t, exactly something that you’d show to my father-in-law without him asking incredulously “That’s a computer?!”. It was a green PCB, and you had to rig up your own beefy 5 V power supply, figure out some kind of enclosure, scrounge up a keyboard and mouse, add in a monitor, and only then did you have a computer. We’ve asked the question a couple of times, can the newest Raspberry Pi 4B be used as a daily-driver desktop, and answered that in the affirmative, certainly in terms of it having adequate performance.

But powerful doesn’t necessarily mean accessible. If you want to build your own cyberdeck, put together an arcade box, screw a computer into the underside of your workbench, or stack together Pi Hats and mount the whole thing on your autonomous vehicle testbed, the Raspberry Pi is just the ticket. But that’s the computer for the Hackaday crowd, not the computer for everybody. It’s just a little bit too involved.

The Raspberry Pi 400, in contrast, is a sleek piece of design. Sure, you still need a power supply, monitor, and mouse, but it’s a lot more of a stand-alone computer than the Pi Model B. It’s made of high-quality plastic, with a decent keyboard. It’s small, it’s light, and frankly, it’s sexy. It’s the kind of thing that would pass the father-in-law test, and we’d suggest that might go a long way toward actually realizing the dream of cheaply available universal (open source) computing. In some sense, it’s the least Hackaday Raspberry Pi. But that’s not saying that you might not want one to slip into your toolbag.

Continue reading “New Raspberry Pi 400 Is A Computer In A Keyboard For $70”

Raspberry PI 4 Now Supported By Risc OS In Latest Update

Students of ARM history will know that the origins of the wildly popular processor architecture lie in the British computer manufacturer Acorn (the original “A” in “ARM”). The first mass-market ARM-based products were their Archimedes line of desktop computers. A RISC-based computer in a school or home was significantly ahead of the curve in the mid 1980s and there was no off-the-shelf software, so alongside the new chips came a new operating system that would eventually bear the name Risc OS.

It’s since become one of those unexpected pieces of retrocomputing history that refuses to die, and remains in active development with a new version 5.28 of its open-source variant just released. Best of all, after supporting the Raspberry Pi since the earliest boards, it now runs on a Raspberry Pi 4. The original ARM operating system has very much kept up with the times, and can now benefit from the extra power of the latest hardware from Cambridge. The new release deals with a host of bugs, as well as bringing speed increases, security fixes, and other improvements. For those whose first experience of a GUI came via the Archimedes in British schools, the news that the built-in Paint package has received a thorough update will bring a smile.

The attraction of Risc OS aside from its history and speed lies in its being understandable in operation for those wishing to learn about how an OS works under the hood. It’s likely that for most of us it won’t replace our desktops any time soon, but it remains an interesting diversion to download and explore. If you’d like to read more about early ARM history then we’d like to point you at our piece on Sophie Wilson, the originator of the ARM architecture.