Kubuntu has a reputation for being one of the slower and heavier flavors of Ubuntu, and some users accepted that as a fact and decided to live with a slow boot rather than doing something about it, fear not fellow Kubuntu user, because I have your back!

Understanding the issue

After moving from Ubuntu Gnome 16.04 to Kubuntu 16.04 I noticed that the boot became much slower! I thought this was a temporary problem but a quick searched showed me I’m in for the long haul!
Even when using an SSD, my system was ready to use after almost 2 minutes (1.48 to be exact!) and thats’ slow even for a computer running Windows on a 5400 rpm HDD!

To put you in perspective, Ubuntu Gnome needed less than 10 seconds to fully boot to desktop (I had the black screen issue, but still..).

Now let’s not waste too much time with the problem, it’s time to fix the issue!

The solution

There are several tweaks that can be done to fix this issue, I found all of them on askubuntu, and managed to shave down the boot time from 1.48 minutes to 19 seconds!

First fix: Pre-boot

  • At first I went to my BIOS and changed the Sata mode from AHCI to Compatible, Ubuntu gnome wouldn’t boot unless the controller was AHCI.
  • Then I disabled the Intel Virtualization Technology because I no longer use VirtualBox.

Second fix: Removing the deleted swap partition entry from Fstab

When I installed Kubuntu 16.04 it came with a swap partition, and since I didn’t use hibernate it was safe to delete it by making sure of the UUID from the BLKID command, I forgot to delete it from Fstab and that causes the system to boot slower because it’s looking for swap.

I entered the command:sudo kate /etc/fstab command to edit fstab with root privileges and it looked something like:

    /etc/fstab: static file system information.

    #
    Use ‘blkid’ to print the universally unique identifier for a
    device; this may be used with UUID= as a more robust way to name devices
    that works even if disks are added and removed. See fstab(5).

    #
    / was on /dev/sda1 during installation UUID=4840d72b-2435-4dc1-9227-ab7671fd3d93 / ext4

    errors=remount-ro 0 1
    swap was on /dev/sda5 during installation UUID=0023c124-ea85-41d2-834c-83f6877d6959 none swap sw

    0 0

After deleting the swap entry (in green) it became like this: 


    /etc/fstab: static file system information.

    #
    Use ‘blkid’ to print the universally unique identifier for a
    device; this may be used with UUID= as a more robust way to name devices
    that works even if disks are added and removed. See fstab(5).

    #
    / was on /dev/sda1 during installation UUID=4840d72b-2435-4dc1-9227-ab7671fd3d93 / ext4

    errors=remount-ro 0 1

Third fix: Tweaking Services

Disabling services isn’t the best idea especially if you aren’t sure of what you are doing, but tweaking the services start and stop times could mean the difference between a slow and a fast boot! To be able to do so you need to edit System.conf

To edit system.conf enter the commandsudo kate /etc/systemd/system.conf into the terminal and search for the line#DefaultTimeoutStartSec=90s and remove the “#” to change it from being a comment, and set the value to 1 rather than 90, and do the same for #DefaultTimeoutStopSec=90s.

After this tweak the processes will start and stop much faster, and so does your computer!

Fourth fix: Tweaking Grub

Enter the command into the terminalsudo kate /etc/default/grub and add the and added raid=noautodetect toGRUB_CMDLINE_LINUX_DEFAULT to become:

   GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash raid=noautodetect”

Thensudo update grub 2 sudo update grub

 
Boot time is now 19 seconds.

Thanks for reading!
Please share it on social media and have a nice day.