If you’re using Ubuntu on an unconfigured Raspberry Pi, you can activate the zswap kernel feature to increase performance of the desktop.

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp

If you buy something from a this link, myelectricsparks Media may earn a commission. See our Read More.

raspberry pi 4

Raspberry Pi 4 is a tiny device with valuable features, including support for dual monitors and a speedy ethernet connection. If you’re looking for an easy yet reliable option for any DIY projects, then a Raspberry Pi could be the ideal base. Additionally, you can quickly run Ubuntu desktops with the Raspberry Pi 4, even with 2GB of RAM.

Find out how you can improve the performance of Ubuntu on the Raspberry Pi 4 with only 2GB RAM. You can utilize this method to set up a complete Ubuntu environment with access to the keyboard, mouse, and network.

Set Up Ubuntu Desktop on Raspberry Pi 4

Ubuntu officially supports Raspberry Pi 4 Model B with 8GB and 4GB RAM modules. You can, however, operate Ubuntu using Raspberry Pis equipped with 2GB memory. It will require a handy Linux kernel feature known as Zswap to accomplish this.

Swap compresses all processes before shifting them into the swap file. It also checks whether the more petite, compressed size can fit into the RAM. Compressing a zswapped web page is much faster than using the swap. This will give you a smooth user experience, even after installing the top Raspberry Pi apps.

Additionally, you don’t have to wait until the following LTS release to take advantage of this feature. Zswap can be enabled in any existing Ubuntu installation and get the performance boost straight away. Launch a terminal on the Ubuntu-powered Raspberry Pi 4 and enter the following command:

 

				
					sudo sed -i -e 's/$/ zswap.enabled=1/' /boot/firmware/cmdline.txt
				
			

Please reboot the computer after the command has completed its work and test the improvement in performance for yourself. You will notice things like browsing and navigating quicker than before.

Configure Ubuntu on Raspberry Pi 4 With 2GB of RAM

zswap can make running Ubuntu more accessible on devices with lower configurations like Raspberry Pi 4. Raspberry Pi 4. Canonical has also been working on additional mechanisms such as z3fold and LZ4 compression to help Ubuntu run faster on these devices.

If you’re not happy with the performance, consider installing a light Operating System on your Raspberry Pi.