Raspberry Pi GPIO support in Ubuntu

We are proud to announce that Ubuntu 21.04 includes support for the GPIO pins on the Raspberry Pi. This has been a long time coming. We know. With support for the camera modules and Bluetooth added last year GPIO was the obvious next step. But with our Raspberry Pi focused engineers working to make sure there was Pi support for the Ubuntu Core 20 launch earlier this year, GPIO got pushed back. But not longer.

What’s changed?

As of the Linux Kernel 5.11, the old methods of communicating with the header pins on the Raspberry Pi no longer work. Even in Raspberry Pi OS. This means that packages such as RPi.GPIO no longer function properly with the newer kernels. Fortunately, there is a new package in Ubuntu 21.04 called LGPIO that allows full control over the header pins with the latest kernel version. 

Now you might be thinking, ‘Wait, Ubuntu 21.04 released last month, why is this blog post so late?’ Well, it’s because we opened the doors to community members first, and I wanted to organise a community stream over on UbuntuOnAir

What next?

We published a tutorial on Ubuntu dot com where users can follow along and test the GPIO pins for themselves and let us know what they think. The tutorial covers some basic functionality of LGPIO, including examples using basic GPIO control, I²C, PWM, and SPI. I wrote a brief note in the Raspberry Pi forum Ubuntu sub-category to see if there was interest over there too, and, as a part of our (the Ubuntu Community team’s) initiative to restart UbuntuOnAir we’ve scheduled a live stream.   

This is all because we want to build a more interactive community around Ubuntu on the Raspberry Pi. A big part of building a community like this is starting conversations. That started with our call for feedback and to ‘try things out’, and continues next week (June 1st) when Will Wilson (jawn-smith, the author of the tutorial), Dave Jones (waveform and long time Ubuntu Pi guy), and I sit down on a YouTube and Twitch live stream to talk about Ubuntu on Raspberry Pi, the past, the future, and the community. 

Set yourself a reminder and come along. We’ll be answering all the questions and talking more about how you can get involved. 

rapsberry pi logo

Ubuntu Desktop for Raspberry Pi

Watch the live event of the 20.10 launch the and find out all the news about the new Ubuntu Desktop image for Raspberry Pi.

Discover more ›

Newsletter signup

Select topics you're
interested in

In submitting this form, I confirm that I have read and agree to Canonical's Privacy Notice and Privacy Policy.

Related posts

How to use the Raspberry Pi High Quality camera on Ubuntu Core

The new High Quality (HQ) camera from the people over at Raspberry Pi is now available. And as they say, it is really rather good. It has the option for...

How to install Ubuntu with the new Raspberry Pi Imager

The Raspberry Pi Foundation recently released their new “Raspberry Pi Imager” and we love it.  It’s a new tool that makes getting going with the Raspberry Pi...

The new Ubuntu membership process

Applying for Ubuntu membership just became a  lot easier. After a long discussion on Discourse, we’ve made the necessary changes to lower the technical...