♞ Coming up on 9TO5Linux ♞
Ubuntu 22.04 LTS Promises Performance Boost for All Raspberry Pi 4 Devices
Canonical is not giving up on Ubuntu Desktop for Raspberry Pi devices, and they promise
to give everyone a performance boost with the next major release of the popular GNU/Linux
distribution, Ubuntu 22.04 LTS.
Ubuntu Desktop on Raspberry Pi arrived officially with the Ubuntu 20.10 (Groovy Gorilla) release,
but it was only recommended for the Raspberry Pi 4 models with 4GB or 8GB RAM, Raspberry
Pi 400, as well as Raspberry Pi CM4 (Compute Module 4).
Well, that’s about to change as Canonical wants to make Ubuntu Desktop work smoothly
on the Raspberry Pi 4 model with 2GB of RAM, and the secret to this performance boost is
to enable the zswap feature in the Linux kernel.
For those not in the known, zswap is a Linux kernel feature that provides a compressed
RAM cache for swap pages.
When enabled, zswap compress a process that’s moved to the swap file.
Think of it as a write-back cache for swapped pages.
“It is much quicker to decompress a ‘zswapped’ page than it is to access the swap file so
this is a great way of getting more bang for your buck from systems with smaller amounts
of RAM,” explains Canonical in a recent blog post.
Zswap will be enabled by default in the upcoming Ubuntu 22.04 LTS (Jammy Jellyfish) release,
due out on April 21st, 2022, which already means a performance boost for Raspberry Pi
4 models with 4GB and 8GB RAM, but that’s not enough to run Ubuntu Desktop smoothly
on the 2GB variant.
Therefore, Canonical plans to implement two additional improvements, namely to enable
the z3fold allocator for storing compressed pages, as well as to switch to the lz4 compression
algorithm for a better balance of speed and compression.
The good news is that you don’t even have to wait for Ubuntu 22.04 LTS to come out,
as you can enable these performance improvements right now on the Ubuntu 21.10 (Impish Indri)
release.
To enable zswap, you only have to run the command below in the Terminal app.
sudo sed -i -e 's/$/ zswap.enabled=1/' /boot/firmware/cmdline.txt If you own a Raspberry Pi 4 computer with
2GB RAM, you will also have to enable z3fold and lz4.
To do that, you must run several commands, listed below for your convenience.
sudo -i echo lz4 >> /etc/initramfs-tools/modules
echo z3fold >> /etc/initramfs-tools/modules update-initramfs -u
exit sudo sed -i -e 's/$/ zswap.compressor=lz4/'
/boot/firmware/cmdline.txt sudo sed -i -e 's/$/ zswap.zpool=z3fold/'
/boot/firmware/cmdline.txt I only have the Raspberry Pi 4 model with
8GB RAM, which already runs the Ubuntu Desktop smoothly, so these performance improvements
are barely noticed.
However, they are more than welcome, and, in combination with setting more RAM to the
Raspberry Pi GPU via the raspi-config utility and a fast microSD card or SSD, it should
make Ubuntu your daily driver on the tiny computer.
If you try these performance improvements, especially on the Raspberry Pi 4 with 2GB
RAM, do give Canonical feedback on if they make your Ubuntu Desktop experience more smoothly
or not.
:: More ::
Ubuntu 22.04 May Include GNOME 42, But Few GTK4 Apps
GNOME 42 could still feature in Ubuntu 22.04 when it arrives this April — but don’t
expect to see too many GTK4 apps with it.
Ubuntu developers say they ‘aim’ to include the bulk of GNOME 42 release in Ubuntu 22.04
but are currently tasked with updating the GNOME Shell stack to the latest GNOME 41 release
(the latest dailies still use a mix of GNOME 40 and GNOME 41).
If this all sounds a bit conservative it’s because it is: Ubuntu 22.04 is an LTS
GNOME 42 is itself under active development ahead of a planned stable release in March.
The first alpha of GNOME 42 expected to drop this month and will feature a fair number
of apps ported to and/or taking advantage of GTK4 and libadwaita.
And it’s those that Ubuntu isn’t keen on including — not yet.
If this all sound a bit conservative it’s because it is!
Ubuntu 22.04 is an LTS and Ubuntu has to ship a solid, stable software set it can confidently
commit to supporting over the next five years (and possibly beyond).
While upcoming GTK4 ports of Settings and Files are likely to get a ton of stress testing
by GNOME developers — and plucky enthusiasts 😉 — ahead of the GNOME 42 release, Ubuntu
isn’t certain there’s enough time to test them well enough, not for inclusion in a long-term
support release.
“GNOME is only landing the ports to GTK4 now, those often are not trivial changesets
(sic) coming with refactoring and code cleanups in addition of the porting, which means they
might introduce regressions and need more testing that normal upgrades, it’s not the
sort of change we want to include just before the LTS,” explains Canonical’s Sebastien
Bacher in a recent status update.
Of course, there is another elephant sat in the room trying very hard to mind its own
business: theming.
Libadwaita is designed to be used as is, so it doesn’t currently offer many customisation
options by default.
This means GTK4 apps that are run on Ubuntu 22.04 will have one look (Adwaita) and everything
else another (Yaru).
The theming mix-match needs finessing so Ubuntu says it is “working with upstream” to
resolve the theming and colouring issues.
I’m told in the comments that libadwaita ‘supports theming perfectly’ so solutions
(ideal or otherwise) do already exist.
Still, the defaults are the defaults.
While core GNOME apps will hold back on their tried and test GTK3 versions there’s a chance
that other GTK4 apps, like the new Terminal and Text Editor tools could be available to
install from the archive.
Sebastien ends on a positive note, assuring users that Ubuntu “will update to the new
GTK series once the LTS is out”.
For now, there’s not an awful lot of “visible” stuff in the Ubuntu 22.04 daily builds.
But, as an LTS with a bias towards stability, there’s plenty of work happening below the
line — the next big question is which kernel version will Ubuntu 22.04 ship with?
Let me know your thoughts down in the comments, just remember to be civil, polite, and for
the love of all that’s sweet and merciful, try not to mention Snaps if you can help it!
:: More ::
Ubuntu 22.04 LTS will run on a Raspberry Pi 4 with just 2GB of RAM
The Raspberry Pi line of computers are small, inexpensive single-board PCs that are most
commonly used to run GNU/Linux distributions.
But while Raspberry Pi devices have been shipping since 2012, it took more than eight years
for one of the most popular Linux distributions to add support – and even then, the developers
of Ubuntu only officially supported Raspberry Pi 4 computers with at least 4GB of RAM.
Now the developers of Ubuntu say the next release of their desktop operating system
should be able to run on Raspberry Pi hardware with as little as 2GB of RAM.
In a blog post, developers say that one of the goals for the upcoming Ubuntu 22.04 LTS
release, due out in April, is “targeting a viable Desktop experience on Raspberry Pi
4 2GB models,” which typically sell for $45, which makes them about $10 cheaper than
models with 4GB of RAM.
They’ll do that by using a Linux kernel feature called zswap, which compresses data
stored in RAM before moving it to an SD card or other storage space designated for use
as swap memory… and which can quickly check to see if you still actually need to actually
move those files to swap memory after they’ve been compressed or if they’ll take up less
space and run more quickly if they remain in RAM.
The end result is that you should be able to get a full Ubuntu desktop experience even
on Raspberry Pi 4 devices with as little as 2GB of RAM.
And while this feature will be enabled by default in Ubuntu 22.04 LTS, it’s already
possible to enable it in older versions of Ubuntu if you want to try them out on a Raspberry
Pi by following instructions outlined in a recent Ubuntu blog post.
Note that enabling zswap should also improve performance for Raspberry Pi 4 devices with
4GB or 8GB of RAM.
And in addition to the Raspberry Pi 4 Model B, zswap will be enabled by default when you
install Ubuntu 22.04 LTS on a Raspberry Pi 400 computer-in-a-keyboard, which has similar
hardware (and 4GB of RAM).
Or you could just use the Debian-based Raspberry Pi OS (developed by the makers of the Raspberry
Pi), or any of the many of other Linux distributions that are compatible with Raspberry Pi computers.
Thanks for watching,
I hope you enjoyed this video,
If you did hit that thumbs up button, it helps me to make good content for you, other then
that, I will see you in tomorrow's video, peace out.