Your submission was sent successfully! Close

  1. Blog
  2. Article

Oliver Smith
on 20 October 2022

Ubuntu 22.10 on the Raspberry Pi delivers new display support and the full MicroPython stack

When it comes to Raspberry Pi support, the theme of Ubuntu 22.10 is definitely embedded devices.

In this release, Ubuntu now supports a range of embedded display HATs as well as under-the-hood improvements to the GPIO stack as we transition from RPI.GPIO to lgpio (more about that later).

In addition we’ve worked hard to support the Raspberry Pi’s even smaller cousin, the Raspberry Pi Pico W with the full MicroPython stack now available in the Ubuntu repositories.

We’ll run through these highlights and more in the rest of this post, but as usual Dave ‘Waveform’ Jones, our resident Raspberry Pi engineer at Canonical, has put together a suite of detailed blog posts to provide additional backstory to each feature. Check them out as we go through.

Get hyped for Hyperpixels

Behind the scenes, the graphics stack for the Raspberry Pi has undergone a significant transition, moving from fake KMS (or fkms) which involved closed-source firmware running on the GPU separately from the Linux kernel, to the open-source ‘full’ KMS (or, confusingly, just kms) which puts the Linux kernel directly in charge.

This migration has made supporting display HATs easier since Ubuntu can now treat them as a standard display with only minor tweaks.

It means that with Ubuntu 22.10, you can now use the Hyperpixel display range, the Raspberry Pi Official Touchscreen Display and the Inky eInk series out of the box.

Whilst it’s not the ideal way to experience Ubuntu Desktop, it’s certainly a novelty to see it running on such a small screen, with touch support. Remember to bring your reading glasses!

For more serious embedded application work, try Kivy, a python based framework for touchscreen interfaces, available in the Ubuntu archive. Or Qt, a popular framework used in Kubuntu which is able to run outside of a full windowing environment without the need for Pi-specific drivers, making it lightweight, performant and portable.

For more information on these demo projects check out Hyping Pixels on Dave’s blog.

MicroPython for Microcontrollers

If you’re struggling to get your hands on a Raspberry Pi, now might be a good time to start experimenting with the Raspberry Pi Pico W. It’s smaller, cheaper and uses less power than a Raspberry Pi Zero 2 W. For industrial and IoT use cases, porting processes over to the Pico could deliver a significant advantage.

As a microcontroller, the Pico isn’t powerful enough to run a full operating system, but with languages like MicroPython you can run Python code directly on the hardware

For Ubuntu 22.10 we’ve included the full MicroPython developer stack in the Ubuntu repositories, enabling you to apt-install all the development tools you need to get started with Microcontroller development. This includes rshell and mpremote for remote development and Thonny, a mini Python IDE for beginners.

Again, Dave’s blog has everything you need to get started.

Preparing for the future: transitioning the GPIO interface

This release we’ve also made a big change behind the scenes to move Ubuntu from relying on the now deprecated sysfs-gpio to an lgpio solution. Similar to the fkms to kms transition (do you remember which is which?) lgpio gives the kernel control of the GPIO pins rather than letting libraries interact with them directly.

In the long term, this is a significant improvement in both security and application management as it prevents two applications from trying to access the same pins simultaneously. In the short term, many key libraries that Raspberry Pi HATs rely on, such as RPi.GPIO, assume the use of sysfs-gpio.

To ensure there is no interruption in support for existing HATs, Ubuntu 22.10 now ships with a compatibility shim, the creatively named RPi.LGPIO. This allows us to boldly move forward with lgpio without fear of breakages!

To enable the shim, run:

apt install python3-rpi-lgpio

This will remove the existing python3-rpi.gpio and run in its place for packages that depend on this library

The history of this migration is so long that Dave has written not one, but two blogs about the origins of this change and his journey to achieve this migration: 

That’s all folks!

We hope you enjoy all of the new tools available for IoT developers available in this latest release of Ubuntu and look forward to seeing the creative projects and applications that these enable

Share your work in the Raspberry Pi discourse channel or check out some of our past blogs and tutorials for more inspiration on how to get started with the Raspberry Pi.



Related posts

13 October 2023

Canonical, 우분투 23.10 맨틱 미노타우르스 출시

Canonical announcements Canonical News

강화된 보안, 향상된 데스크톱 앱 검색 및 새로운 하드웨어 지원이 최신 우분투 출시를 주도합니다. 2023년 10월 12일: 오늘 Canonical은 코드명 “맨틱 미노타우르스”인 우분투 23.10의 출시를 발표하였으며,에서 다운로드하여 설치할 수 있습니다. Canonical의 우분투 수석 제품 관리자인 올리버 스미스(Oliver Smith)는 “이번 출시에서는 기본적으로 우분투의 보안의 의미에 대한 기준을 높이고 다음 장기 지원 출시를 위한 발판을 마련했습니다. ...

12 October 2023

Canonical releases Ubuntu 23.10 Mantic Minotaur

Canonical announcements Article

Fortified security, enhanced desktop app discovery and new hardware support lead the latest release of Ubuntu 23.10 Mantic Minotaur. ...

Lukas Märdian
14 November 2023

Netplan brings consistent network configuration across Desktop, Server, Cloud and IoT

Cloud and server Article

Learn how Netplan has established itself as the proven network stack across all variants of Ubuntu – Server, Cloud, Embedded and now Desktop. ...