As my manner is I walk through all the messages in dmesg and the journal from time to time looking for reasons boot takes so long. I’ve found one that allows for a ~10s speedup recently. It seems to me that the time from gdm starting to the greeter actually displaying the login prompt is where the improvement occurs but I do not know how to prove that.
The global timezone is set to Etc/UTC and users can configure their own TZ as desired. This slows down the boot on systems with wireless. The symptom can be discovered in dmesg or
grep wireless /var/log/message
Feb 21 11:30:19 fedora wireless[1664]: Could not determine country! Unable to set regulatory domain.
iw reg get
Thanks @litemotiv. There is useful information out of systemd-analyze but not at all helpful in finding the regdomain delay, which is a quite significant delay.
I am looking for actual cases where speedups were discovered and documented. I am confident there are more so I am reaching out to this excelent community to see what others have found.
If the chart shows a red bar then it is a blocking process, meaning that it will actually delay the boot process. Wireless regdomain is likely non-blocking, so it may take some time but this will then usually run parallel to other startup processes.
There is much that occurs during boot with interactions that can be subtle. There is nothing in systemd-analyze that gives any hint that not having a regdomain caused a delay so I do not think process blocking or parallelism is involved in this case, wireless is internal to the kernel. Also I am pretty sure that the delay between gdm starting successfully and the login box showing up on screen are not included in the systemd[1] startup finished times. Now for a big ask:
Can you replicate the behavior and give your analysis?
You would have to set your timezone to Etc/UTC (timedatectl). Maybe also have to boot with no networking enabled so a timezone does not get chosen some other way. And make sure there is no /etc/sysconfig/regdomain COUNTRY set. Then you should at least get the wireless could not determine country message.
Some time ago, I noticed on one of my systems (a systemd-nspawn container) that if I masked systemd-hostnamed.service (i.e. systemctl mask systemd-hostnamed.service), it would boot much faster. It might have been something to do with it being a container though. I never really investigated. If you do try it and it does speed up your boot time, let us know.
Do you use suspend or hibernate? What would happen if your laptop was stolen while asleep?
Though there are no logs to show it I do observer on the order of 10 seconds of delay between the time gdm is started and the time the greeter login box is displayed. I could see auto-login cutting into that delay.
Yes, I do use suspend many times a day. Screen locks in suspend, as well as after configurable idle time by screensaver. Then I need to either login via password, or fingerprint. So it’s locked anyhow, should it get stolen.