A solution for unusually long boot times

3 replies [Last post]
bkrz
Offline
Joined: 07/26/2024

Hey everyone, hope you're doing well.

Ever since I installed Trisquel with disk encryption, I was noticing that it took about 5 minutes from typing the encryption password to LightDM appearing with the login prompt. It couldn't be my machine, as I bought new RAM and a brand new SSD.

So I looked into it after booting with # journalctl -b -p warning and the system was trying to start both systemd-resolved.service and networking.service and were both timing out, delaying startup.
Since I'm using NetworkManager, these do not need to be running at all. So here's what I did:

1. Stop and disable both services
# systemctl stop systemd-resolved && systemctl disable systemd-resolved
# systemctl disable networking.service && systemctl mask networking.service
2. Set NetworkManager to not use resolved:
# nano /etc/NetworkManager/NetworkManager.conf
(add/edit this line)
[main]
dns=default

3. Remove the resolv.conf symlink:
# rm /etc/resolv.conf
4. Finally, restart NetworkManager:
# systemctl restart NetworkManager
Then check if /etc/resolv.conf was recreated and if it points to the correct DNS servers.

After that, reboot and check your boot time. Mine was up in about 15 seconds, just *chef's kiss*
I hope that someone finds this useful.
Regards,

bkrz

GNUser
Offline
Joined: 07/17/2013

Hi!

Thanks!

I have also been dealing with increasingly long boot times (my T400 used to be light fast booting, but it gets worse over time).
Now, in my case I don't see that the Network is the the issue, but running those commands allowed me to clear some other issues.
However, where I notice my machine really takes a long time (like a minute or so) is with this error:

clocksource: Long readout interval, skipping watchdog check: cs_nsec: 516022596 wd_nsec: 26022402989

And it actually prints similar lines all the way until booting.
Does your also have those?
I'll have to try and find out exactly what these are, maybe there is a fix for it.

GNUser
Offline
Joined: 07/17/2013

Well, reading some pages seems setting tsc=nowatchdog in GRUB would solve the issue. But I am using Libreboot, and can't just edit GRUB in Trisquel's own file.
I did (many years ago) edited and inserted custom commands in the Libreboot GRUB, they run at every boot, but I don't remember how I did it. Gotta go and search for those manuals again ahah.

But yeah, if anyone is having the same issue, that might be an option.

Hey, again thanks for point me in the right direction!

Zoma
Offline
Joined: 11/05/2024

Truthfully, the web is getting more heavy over time.

But that's not all, operating systems also are getting heavier over time as well.

So this doesn't surprise me.