Taming Systemd Services that Cause Slow Boot Times on My Linux Desktop

Introduction to Slow Boot Times

I’ve had my fair share of slow boot times on Linux. When I upgraded my desktop to the latest version of my distribution in 2025, I noticed some new systemd services that were slowing down my boot process. The real trick is identifying which services are causing the issue. After digging around, I found that some of these services weren’t essential for my daily usage, and disabling them made a significant difference.

Identifying the Culprits

To figure out which services were causing the slow boot times, I used the systemd-analyze command. This command gives you a detailed breakdown of the boot process, including the time taken by each service.

systemd-analyze blame

The output is a list of services along with the time they took to start. I looked for services that took an unusually long time to start and checked if they were essential for my system. Don’t bother with services that take a few milliseconds to start - focus on the ones that take seconds.

Disabling Unnecessary Services

Once I identified the services causing slow boot times, I disabled them using the systemctl command. For example, I disabled the NetworkManager-wait-online.service service, which was taking around 10 seconds to start.

sudo systemctl disable NetworkManager-wait-online.service

I also disabled the plymouth-quit-wait.service service, which was taking around 5 seconds to start.

sudo systemctl disable plymouth-quit-wait.service

After disabling these services, I rebooted my system and noticed a significant improvement in boot times. In practice, disabling unnecessary services can make a big difference.

Masking Services

In some cases, disabling a service may not be enough, and you may need to mask it to prevent it from being started automatically. I used the systemctl command to mask the systemd-udev-settle.service service, which was causing issues with my boot process.

sudo systemctl mask systemd-udev-settle.service

Masking a service prevents it from being started automatically, but it does not prevent it from being started manually. This is where people usually get burned - they disable a service, but it still gets started somehow.

Reordering Services

The order in which services are started can also affect boot times. I used the systemd-analyze command to visualize the boot process and identify services that were being started in the wrong order.

systemd-analyze plot > boot.svg

This command generates an SVG file that shows the boot process, including the order in which services are started. I used this file to identify services that were being started in the wrong order and reordered them using the Before and After directives in the service files.

Security Considerations

When disabling or masking services, it’s essential to consider the security implications. Disabling services like NetworkManager-wait-online.service may affect the security of your system, as it may not be able to connect to the network properly. However, in my case, I found that disabling this service did not affect the security of my system, as I was using a static IP address. I’ve seen this go wrong when people disable essential services without considering the consequences.

Tips and Tricks

To avoid slow boot times, I usually start with regular reviews of the services running on my system. I use the systemd-analyze command to identify services that are causing slow boot times, and then use the systemctl command to disable or mask services that are not essential. You can also check out the systemd.io website for more information on systemd and its services. The freedesktop.org website is also a great resource for Linux desktop environments.


See also