5 Tips to Speed Up Ubuntu Desktop Even if You Have SSD
Linux users overall enjoy a faster operating system than Windows users do. However, if you use a heavyweight desktop environment, then your Ubuntu desktop could be running slow. This article will show you 5 tips you can apply to speed up Ubuntu desktop. You shall see a speed boost on low-end hardware and in Virtualbox. It also helps even if you installed Ubuntu on a fast solid-state drive.
1. Disable Unneeded Startup Applications
Ubuntu starts a lot of applications during boot time which you may find unnecessary. To make Ubuntu boot faster, you can disable some of them. However, most startup applications are hidden. To display them, simply run the following command:
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop
Then launch Startup Applications.
To disable a startup application, simply uncheck it.
Here are some applications you may find unnecessary
- Accessibility Profile Manager: It is used to display the accessibility tray icon on the login screen. If you don’t need the onscreen keyboard and screen reader, then disable it.
- Backup monitor: This is deja-dup-monitor. If you don’t use Deja-dup to back up files, disable it. Personally, I use Duplicati to back up my files.
- Blueman Applet: Disable it if your computer doesn’t have Bluetooth.
- Caribou: Disable it if you don’t need on-screen keyboard.
- Desktop Sharing: This is for VNC connection. Disable it if you don’t need anyone to remotely control your Ubuntu system. You still have the ability to remote control other’s computer through VNC.
- Gnome Software: Disable it if you like to install software in the terminal and don’t use Gnome software.
- Orca screen reader: Disable it if your eyes still can see the beautiful world.
- Personal File Sharing: Disable it if you don’t use Bluetooth to share files.
- Update Notifier: Disable it if you don’t want to be notified when software updates are available. Some users like to install software updates from the command line.
Another way to speed up the Ubuntu boot process is to disable some systemd services. You can view additional startup applications by executing the following command in the terminal.
systemctl list-unit-files | grep enabled
Enabled indicates that the service automatically starts when Ubuntu is booting up. To disable a service to auto start, use the following command:
sudo systemctl disable service-name
For instance, my computer doesn’t have bluetooth, so I can disable bluetooth service.
sudo systemctl disable bluetooth.service
I don’t set up CUPS printing service on this computer, so I can also disable the cups.service.
sudo systemctl disable cups.service
I installed Netdata performance monitor some time ago on my desktop computer, but I don’t need it anymore, so I can disable it.
sudo systemctl disable netdata.service
Caution: Make sure you know what a service does before disabling it.
2. Find out the Culprit of a Slow System Boot
You can find out which service takes how much time to finish starting up by entering the following command in terminal.
systemd-analyze blame
As you can see from the above screenshot, the following services are taking a long time to start.
- snapd.seeded.service
- plymouth-quit-wait.service
- NetworkManager-wait-online.service
- vboxdrv.service
- [email protected]
If you don’t use Snap packages, then you can disable Snap completely with the following command.
sudo systemctl disable snapd.service snapd.socket snapd.seeded.service
sudo systemctl mask snapd.service snapd.socket snapd.seeded.service
I don’t use Virtualbox anymore, so I can disable the vboxdrv.service.
sudo systemctl disable vboxdrv.service
I don’t set up CUPS printing service on this computer, so I can disable the cups service.
sudo systemctl disable cups.service
To find out the boot time, run:
systemd-analyze time
Before
After
3. Adjust Swappiness
We all know that RAM is way faster than a hard drive.
Let’s do a little experiment: Boot your Ubuntu system, open a few applications like Firefox, LibreOffice, Mozilla Thunderbird, Evince document viewer, and then don’t do anything with it. Don’t suspend or hibernate it. Then after a few hours return to your Ubuntu. You will find that these applications are responding poorly to your mouse clicks because they were idle and swapped out to hard drive.
You can find in system monitor that Ubuntu is using swap space although you have plenty of free physical RAM. This is due to the default swappiness value of Ubuntu. Swappiness is a Linux kernel parameter that controls how often Linux swaps out idle processes to the swap space on your hard drive.
The value of swappiness is between 0 ~ 100
.
- A lower value means Linux doesn’t use swap space very often.
- A higher value causes Linux to use swap space more often.
The default value on Ubuntu is 60
which means when your computer uses up 40% of physical RAM, the Linux kernel begins swapping.
Why you should avoid swapping?
- It slows down your computer.
- Swapping causes read/write operation on your hard drive. If you have a solid-state drive, this will shorten the lifespan of the SSD.
You can use the following command to check the current value.
cat /proc/sys/vm/swappiness
It’s recommended to set a low value for swappiness so that the Linux kernel will use as much physical RAM as possible. To change this value, create a /etc/sysctl.d/60-custom.conf
file with the Nano text editor.
sudo nano /etc/sysctl.d/60-custom.conf
Add the following line to set the swapiness to 0
, so Linux will only use swap space when all physical memory is used up.
vm.swappiness=0
Save and close this file. (In Nano text editor, press Ctrl+O
to save, press Ctrl+X
to exit). Then run the following command to apply the change.
sudo sysctl -p /etc/sysctl.d/60-custom.conf
To swap out everything from the disk back to RAM, run the following command.
sudo swapoff -a
Use the htop
utility to check how much swap space your system has.
sudo apt install htop htop
4. Preload Commonly Used Applications
Are you unhappy about the launch speed of Firefox browser or other slow applications? Here’s a little piece of software called preload
that memorize what applications you use most often and preload related libraries and binaries into memory so these applications can be launched faster.
Install preload on Ubuntu with the following command.
sudo apt install preload
The preload daemon will automatically be started. You can check it out with:
systemctl status preload
If it’s not running, then start it using the following command:
sudo systemctl enable --now preload
Now you can forget about preload and do your other work.
5. Disable Fancy Effects
Fancy effects are eye candies, but they can slow down your computer. We can use the compizconfig-settings-manager to disable them.
sudo apt install compizconfig-settings-manager
Start it from Unity Dash. Then click the Effects
tab on the left and disable effects that you don’t like. You can disable all effects if you want to.
You can also disable the background blur of Unity Dash with Unity tweak tool to make Dash more responsive.
sudo apt install unity-tweak-tool
Then open it up, select the search
tab, and set Background blur to off.
Some people actually like the transparent background. Which do you prefer?
Before
After
Other Ways to Speed up Ubuntu
I hope these performance tweaks helped you make Ubuntu faster. Do you know other ways that can speed up Ubuntu? Share your tips in the comments below. If you found this post useful, subscribe to our free newsletter or follow us on Twitter or like our Facebook page.
Thanks, nice tips!
some things here I didn’t know. Thank you!
Thanks I had no idea what to remove off of the last list yet load time is now 1 min 3 seconds
Thank you for saving my SSD drive LinuxBabe!!!!!!!
Another great tutorial! A+
These suggestions are great! I was building Firefox from source and forgot I was doing so, so I was wondering why my Ubuntu system was running slow. After implementing your suggestions, the system is responsive even with the build going on in the background. Cheers and thanks for a great article.
Thanks so much. My machine was horribly slow until I implemented your fixes.
test