Applications load slowly on Ubuntu 18.10 - seems related to fontconfig

The answer @randomlogin by worked for me, but I can't list the detailed commands I used as a comment to help clarify what to actually do.

So, as an answer with extra detail instead of a comment, here is what worked for me:

  • Go to https://packages.ubuntu.com/bionic/all/fontconfig-config/download and download the .deb file
  • Check the .deb file downloaded correctly comparing to the download page's MD5 sum: md5sum ~/Downloads/fontconfig-config_2.12.6-0ubuntu2_all.deb
  • "Manually" install the .deb file: sudo dpkg --install ~/Downloads/fontconfig-config_2.12.6-0ubuntu2_all.deb
  • Copy fontconfig files: cp -L -r /etc/fonts/conf.d /tmp/etc-fonts-conf.d
  • sudo apt --fix-broken install
  • Copy back the fontconfig files sudo cp -L -r /tmp/etc-fonts-conf.d/* /etc/fonts/conf.d/
  • Edit /etc/fonts/fonts.conf and remove the first few lines that start with the tag <its: and the tag <description>

The problem occurs in a specific fontconfig version; the new one shipped with Ubuntu 18.10 is fontconfig-2.13.0, and rolling back to fontconfig-2.12 by manually downloading is a workaround. I found out that the exact difference is made by fontconfig-config which has the right configs at version 2.12.6.

After you download and install, you can copy the files of the previous version. -L flag is because the contents of conf.d are mostly symbolic links.

cp -L -r /etc/fonts/conf.d/ temporary_folder/

Next you can rollback to the new version of fontconfig-config

sudo apt --fix-broken install

Next you paste back the copied files.

You also need to delete the few lines starting with

<its:

in the file /etc/fonts/fonts.conf