Score:1

Ubuntu Desktop 21.10 freezes when interacting with GUI (desktop environment) on Raspberry Pi 400

us flag

I have created SD card with Ubuntu Desktop 21.10 using Pi Imager. It boots fine but when I interact with desktop environment, e.g. re-arrange the icons, the desktop environment freezes. When it's frozen, I can still ssh into it from another device on the same network and use anything that does not require graphical environment (e.g. I can use htop to see that the system is actually running as usual and the issue is with GUI).

Initially, I used the default DE this Ubuntu image comes with (Gnome shell) and when it got frozen, I was able to ssh into Pi and kill gnome-shell process which got me back to log in screen. I was also able to change some display-related settings (resolution, scaling, etc.) without it freezing but eventually some interaction with the environment is always making it unresponsive.

I figured that maybe a different desktop environment would solve the issue so I installed MATE desktop through tasksel. After re-boot, I started using MATE, but it was even worse: I wasn't even able to change screen resolution, because when I clicked on the menu and then "Preferences", it froze. In this case I was not able to locate the process which I could kill to restore the environment without a reboot.

In both cases, I can use GUI apps (such as Chromium or kdenlive video editor) as long as I launch them from terminal (in the case of MATE, I was able to right-click on the desktop and select "open in terminal", in the case of the default Gnome shell, I was even able to launch terminal from the usual menu and "Add to favourites").

It's challenging to determine what exactly triggers the freeze because when I use GUI applications launched via terminal, I will eventually click something that freezes everything.

How can I troubleshoot what part of the desktop environment causes the issue (so I can eventually fix it)? Also, since with the default image it's gnome-shell that seems to be freezing, what are some good alternatives proven to work on Pi 4 (I am used to Unity on Ubuntu and also Gnome, but I can switch to anything to have Ubuntu working)?

Raspbian 32-bit and its LXDE environment work just fine (so the issue is Ubuntu-specific and not related to power supply or SD card reader) but I need 64-bit system, preferably Ubuntu, for better performance and some software which only runs on 64-bit systems (e.g. Sublime Text 4).

David avatar
cn flag
21.10 uses the Gnome 40 DE. Possible issue on your setup?
us flag
'screenfetch' shows me I am using Gnome 40 and Mutter window manager. The issue seems to be general for Ubuntu / all desktop environments since MATE with Metacity WM behaves in similar matter (even worse).
David avatar
cn flag
21.10 was the first to use Gnome 40 by default.
Score:2
au flag

I confirm the same issue (random hangs in GUI after clicking) is happening for me too. I have tested Ubuntu Desktop 21.10 both on a Raspberry Pi 4 (4Gb), a Raspberry Pi 4 (8Gb) and the Raspberry Pi 400 (4Gb) all booted from SDCards (SanDisk Ultra 16Gb or 64Gb), USB Stick (SanDisk Extreme Pro 128Gb) or from external USB 3.0 to SSD adapter (with 1Tb Samsung EVO 860 SSD inside). I'm using the latest firmware and the original power supply.

If I can help with more testing to isolate and maybe fix the problem please let me know.

Hope this gets fixed soon as I'm really looking forward to use this release.

***Update 1:

I downloaded and wrote UBUNTU-21.20-PREINSTALLED-SERVER-ARM64-RASPI image to a Corsair GTX (128Gb) USB Stick.

As there is no desktop environment by default in the server edition I ran the following commands to install it:

apt update && apt dist-upgrade -y && apt install ubuntu-desktop -y

I rebooted the system and I now have a perfectly working desktop environment. System About displays the following:

OS Name: Ubuntu 21.10 | OS Type: 64-bit | GNOME Version: 40.4.0 | Windowing System: X11

To my surprise it doesn't freeze anymore so I'm not sure what causes the problems in the default Ubuntu 21.10 Desktop release but I suspect it's not GNOME 40.

I'm open for more suggestions as to what else can I test/try.

*** Update 2:

According to this site: a temporary fix would be changing in /boot/firmware/config.txt

the following line:

dtoverlay=vc4-kms-v3d

to:

dtoverlay=vc4-fkms-v3d

us flag
If you could test different desktop environments (other than the default Gnome and MATE, which I already confirmed to be causing issues), that would be useful so we know if it's system or DE issue. I would do it myself but I am currently on a metered mobile Internet and have only two SD cards at hand: one with Raspbian 32-bit on which I rely on for work and the other with Ubuntu. So far it seems that if I am using only one window (e.g. video editor) nothing freezes ever, but when I am using two windows (browser and text editor) I get seemingly out of nowhere freeze after an hour or so.
us flag
I think it would be worth checking out 20.04 LTS server with desktop environment installed on top of it, though, as that might be the easiest way to get working Ubuntu desktop on Pi. Not sure if there is anything special about 21.10 except that it has Desktop image 'out of the box' and 20.04 requires a bit more work to have GUI.
us flag
Direct link to a bug: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/1946368
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.