Fix Slow Boot with Linux


After upgrading to a new release, my ThinkPad x131e becomes considerable slower while booting into Linux. Because everything works normally after login, I didn’t pay too much attention. Now I found the reason is related to waiting for resume.

Computers

ThinkPad x131e

ThinkPad T410i

Both are installed with Ubuntu 18.10.

What’s Wrong?

x131e takes about 61 seconds from power-on to the login screen while T410i is 24.

x131e takes about 9 seconds from login to the desktop while T410i is 7.

Considering T410i is 21.1% ((913-720)/913) faster with single thread and 35.3% ((2040-1319)/2040) with multi-thread than x131e on PassMark score for, the reasonable time is 29 (24x(1+21.1%)) to 32 (24x(1+35.3%)) seconds from power-on to login screen if I ignore all other difference.

On the other hand, the time x131e takes from login to the desktop is more reasonable. Using the same formula, it should be between 8.5 (7x(1+21.1%)) to 9.5 (7x(1+35.3%)) seconds.

How to Fix?

I follow It takes long to boot to run systemd-analyze blame to find out which process takes the most time. Then I read Slow boot, long kernel load time, due to wrong resume device and Xubuntu 18.04 kernel takes long to boot to solve my problem.

After manually edit the resume file which is located in /etc/initramfs-tools/conf.d/ and apply the change with update-initramfs -uk all, x131e takes about 29 seconds from power-on to the login screen. I can confirm this is why both Linux (OpenSuSE and Ubuntu) bootup considerably slower than the previous version.

#sudo vi /etc/initramfs-tools/conf.d/resume

Use none to replace if you found the file and there are assigned value to RESUME already.

RESUME=none
#RESUME=UUID=fe5f5874-ac3e-<wbr />4702-22e3-c452fdde0f359

Then apply the change.

#sudo update-initramfs -uk all

More Thoughts

BTW, the resume file is not available on my TP410i. I think that’s why it doesn’t slow down.

I think there might be some conflict between my SSD and ThinkPad. The wrong resume content is the key. Just remove it or assign a none value instead.

Reference

  1. AskUbuntu: It takes long to boot
  2. AskUbuntu: Slow boot, long kernel load time, due to wrong resume device
  3. AskUbuntu: Xubuntu 18.04 kernel takes long to boot
  4. Passmark: Intel Celeron 887 @ 1.50GHz
  5. Passmark: Intel Core i3-370M @ 2.40GHz

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.