Fixing Elementary OS Slow Boots

For the past 6 months or so I’ve been running Elementary OS Loki on a 2015 Macbook Pro. Recently I noticed my laptop intermittently booting more and more slowly. With some downtime today I did some searching and found a few solutions that helped me get everything back to normal.

The first thing I did was clean up my /etc/xdg/autostart folder. I found this article with others reporting similar slow boot issues. I opted for moving the files to my home folder in case I needed them back. At one point I had installed a cpu indicator that I later removed that looks like it left an entry behind I so cleaned that up also:

I then realized that a screen reader (Gnome Orca) was being loaded that I didn’t need so I decided to clean that up as well:

That made a huge difference to the speed my desktop loaded after logging in but I still had some issues getting to the login screen quickly in the first place. I found this cool trick on the Elementary Stack Exchange:

That creates a file that you can view with Firefox showing you what is happening during boot and how much time it’s all taking.

boot activity

Right away you can see that docker.service and rc-local.service are taking significantly longer than anything else. What’s more interesting is that I’m no longer running docker. That was an easy one to identify and fix:

When I looked at what was in /etc/rc.local I noticed only one thing: powertop --auto-tune

I haven’t been thrilled with my power handling to begin with so I commented that out until I can spend more time digging in to that and getting it running more smoothly.

Now things are running great, and I notice even going in and out of sleep (closing the lid) works better!

Hiding Application Icons in Wingpanel on Elementary

Elementary OS Loki looks beautiful, though I do find myself annoyed with the extra application icons that show up in wingpanel in the upper-right of the screen:


In order to get rid of them you need to edit ayatana.blacklist to include the Id of the applications you want to restrict from showing up there. To start with, take a look at what is already in yout blacklist. To see its contents run the following Terminal command:

Mine originally looked like this:

Next, we’ll find the Id of applications you want to restrict. Be sure they are not already running. We’re going to start dbus-monitor and launch our apps, watching for when they register with dbus. Because there is a lot of text output, save it to a file you can search afterwards.

In the Terminal enter the following command:

This will create a text file called dbus-monitor.txt and stream all of the output from the dbus-monitor command in to it.

Next, launch your application. When it is finished launching, go back to the terminal and type control-c to cancel the dbus-monitor command. Then launch a text editor and load the dbus-monitor.txt file.

Search for string "Id". The first result that comes up should be the entry for your application. In this case, you can see from the screenshot that the Id for the OwnCloud sync client I launched is ownCloud. The Id is case sensitive so be sure to pay close attention.


Edit your ayatana.blacklist and place the Id values for any applications you want to restrict in a new line of the file. I added an entry for the OwnCloud sync client and f.lux so now my file looks like this:

Save the file, and log out. Next time you log in your restricted applications will no longer be displayed in wingpanel. Sometimes it takes a few trials to get this right as there may be a few different Ids in use by the application. If it doesn’t work, try searching the dbus-monitor.txt file again and see if there are other Id values you could try.