Ubuntu 22.04 to Bring the Desktop to Raspberry Pi 4 2GB Users — via Clever Compression Tricks

Those not willing to wait until April can enable zswap and tweak the settings now, bringing a performance boost to all models.

Gareth Halfacree
2 years agoHW101

Canonical has announced that it will be enabling zswap, swap-based memory compression, by default for its Raspberry Pi Ubuntu builds to bring the full desktop experience to the Raspberry Pi 4 Model B 2GB — and has offered a guide for setting it up yourself if you can't wait for the next release.

Canonical's interest in the Raspberry Pi family of single-board computers when it released Ubuntu 19.10 "Eoan Ermine" with official images for the Raspberry Pi 2, 3, and 4, after pledging the platform would receive "full official support." These server-centric images were followed by Ubuntu 20.10 "Groovy Gorilla," which offered, for the first time, a desktop image with full graphical user interface as standard.

The catch: "On a Raspberry Pi 4 (with 4GB or 8GB RAM) you can do everything the average desktop user would expect," Canonical's Rhys Davies said of the release, tacitly admitting that the 1GB and 2GB models wouldn't work quite so well.

Now, Canonical is looking to extend official support to the 2GB model — by enabling zswap, a means of improving performance by creating high-priority swap devices which compress currently-unused memory contents to save space without the lengthy delays and potentially excessive write operations associated with a swap file or partition on microSD.

"One of our goals for the upcoming Ubuntu 22.04 LTS release is to lower [the] barrier to entry," Canonical's Oliver Smith explains. "This means targeting a viable Desktop experience on Raspberry Pi 4 2GB models. When Ubuntu 22.04 releases in April, these optimizations will be included by default for all Raspberry Pi 4 devices, including the 400!"

Those running earlier releases, meanwhile, can follow the guide on the Ubuntu blog to enable zswap now — and, if desired, switch its defaults out for those which will arrive in Ubuntu 22.04, including the use of LZ4 compression to boost performance still further.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles