You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Slow boot times in Linux Lite?

Author (Read 13782 times)

0 Members and 5 Guests are viewing this topic.

Slow boot times in Linux Lite?
« Reply #1 on: February 17, 2023, 07:33:40 PM »
 

Jerry

  • Linux Lite Creator
  • Administrator
  • Platinum Level Poster
  • *****
  • 8775
    Posts
  • Reputation: 801
  • Linux Lite Member
    • View Profile
    • Linux Lite OS

  • CPU: Intel Core i9-10850K CPU @ 3.60GHz

  • MEMORY: 32Gb

  • VIDEO CARD: nVidia GeForce GTX 1650

  • Kernel: 5.x
Bottom line, you can't blame an OS for slow boot times. It's so easy to generalize rather than confront the actual issue. Think about this logically - if we are using exactly the same operating system and version, and my pc boots fast, and yours does not, then what is the variable here...it can't be my computer or operating system that is the issue.

Slow boot times in Linux generally are due to some common factors.

Here you will find a summary of these:


What conditions promote a slower boot time?

- Older Hardware
- Low spec hardware - you can have the latest computer, but that doesn't necessarily translate to a 'fast modern machine'. You can still have slow boot times on a brand new pc.
- Using DHCP on your Network adapter
- A failing hard disk, SSD, NVME etc
- Devices with poor driver support, or an out-of-date or unmaintained/unsupported driver

Reports you can run that will help you pin point the issue:

Show which services are taking the longest to start up.

Overall boot time:

Open a Terminal.

Code: [Select]
VirtualBox:~$ systemd-analyze time
Startup finished in 9.877s (firmware) + 2.736s (loader) + 6.067s (kernel) + 9.734s (userspace) = 28.415s
graphical.target reached after 9.731s in userspace

Loading time of each service:

Code: [Select]
VirtualBox:~$ systemd-analyze blame
          5.260s NetworkManager-wait-online.service
           725ms nmbd.service
           645ms samba-ad-dc.service
           635ms lvm2-monitor.service
           623ms dev-sda1.device
           492ms ufw.service

Code: [Select]
VirtualBox:~$ systemd-analyze critical-chain
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @10.148s
└─lightdm.service @7.019s +3.127s
  └─systemd-user-sessions.service @7.002s +12ms
    └─network.target @6.990s
      └─networking.service @3.023s +3.966s
        └─apparmor.service @2.901s +107ms
          └─local-fs.target @2.899s
            └─zfs-mount.service @2.883s +15ms
              └─zfs-import.target @2.882s

List enabled boot services:

Code: [Select]
VirtualBox:~$ systemctl list-unit-files --type=service | grep enabled
accounts-daemon.service                    enabled
[email protected]                            enabled
avahi-daemon.service                       enabled
bluetooth.service                          enabled
casper.service                             enabled
cgmanager.service                          enabled
cgproxy.service                            enabled
cron.service                               enabled
cups-browsed.service                       enabled
cups.service                               enabled
dbus-org.bluez.service                     enabled
dbus-org.freedesktop.Avahi.service         enabled
dbus-org.freedesktop.ModemManager1.service enabled
dbus-org.freedesktop.nm-dispatcher.service enabled
dbus-org.freedesktop.thermald.service      enabled
display-manager.service                    enabled
dns-clean.service                          enabled
friendly-recovery.service                  enabled
[email protected]                             enabled
gpu-manager.service                        enabled
lightdm.service                            enabled
lm-sensors.service                         enabled
lvm2-monitor.service                       enabled
ModemManager.service                       enabled
network-manager.service                    enabled
networking.service                         enabled
NetworkManager-dispatcher.service          enabled
NetworkManager-wait-online.service         enabled
NetworkManager.service                     enabled
openvpn.service                            enabled
...
VirtualBox:~$

Stop a service that you are NOT using (needs both the stop and disable flag)
eg. If you don't have or need Bluetooth:

Code: [Select]
sudo systemctl stop bluetooth.service
sudo systemctl disable bluetooth.service

NOTE: DO NOT DISABLE A SERVICE BEFORE UNDERSTANDING EXACTLY WHAT IT DOES. You may end up with an unbootable computer. But how do I know what is safe to disable and what is not? Ask us first :)

Confirm the service has been stopped:

Code: [Select]
VirtualBox:~$ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(

May 19 21:33:04 jerry-VirtualBox systemd[1]: Stopped Bluetooth service.
VirtualBox:~$

A disabled service can be started by another service. If you really want it dead, without uninstalling it, then you can mask it to prevent it from starting under any circumstances:

Code: [Select]
VirtualBox:~$ sudo systemctl mask bluetooth.service
Created symlink from /etc/systemd/system/bluetooth.service to /dev/null.
VirtualBox:~$

Generate a list of all services:

Code: [Select]
VirtualBox:~$ systemctl list-unit-files --type=service
UNIT FILE                                  STATE   
accounts-daemon.service                    enabled
acpid.service                              disabled
alsa-restore.service                       static 
alsa-state.service                         static 
alsa-utils.service                         masked 
apt-daily.service                          static 
[email protected]                            enabled
avahi-daemon.service                       enabled
bluetooth.service                          masked 
bootlogd.service                           masked 
bootlogs.service                           masked 
....

Network

The Networking Service is a common issue for many people and the following change will remedy most situations. If after running the above commands you find that your Network device takes a long time to come up, then try setting a Static IP address as demonstrated here - https://www.linuxliteos.com/manual/network.html under the heading 'Connecting to the Internet - Wired' (solution works for Wireless devices too).

Is my internal or external storage device (HDD, SSD, NVME) responsible?

Example, you run the following command and get the following output:

Code: [Select]
VirtualBox:~$ systemd-analyze blame
          58.000s dev-sda1.device
           869ms NetworkManager-wait-online.service
           725ms nmbd.service
           645ms samba-ad-dc.service
           635ms lvm2-monitor.service
           623ms dev-sda1.device
           492ms ufw.service

You're looking for a reference to sda or sdb, or just sd something. Here, it's dev-sda1.device and look, after the NetworkManager-wait-online.service is started, it takes another 58 seconds (approx) to run the sd or disk service. Bingo, our issue is either a slow or failing storage device.

Sleep or Hibernate

Instead of shutting your computer down, consider putting it into Sleep or Hibernate mode. A simple and fast resolution.

Old computer

Example: You're running a machine that was built from 2000-2015 with a mechanical hard drive, you could experience slow boot times.

Slow computer

You could have a slow computer. Even if it was built and released this year, if the internal components are cheap and or low spec, this could be the reason your boot times are slow.

Unsupported computer

Example, you're running Linux Lite on a Chromebook. Linux Lite is not designed specifically for this hardware. You cannot make your expectations match hardware that an operating system did not have in mind when it was created.

Upgrade some of your computer components

Running 4gb of memory? Yes, linux will run on low end machines, but that doesn't mean it's going to run like a powerhouse. Get the fastest memory your computer supports and increase the amount for example from 4gb to 8gb of memory. Upgrade to a fast SSD. Mechanical hard drives are slow and more prone to failure. I can't count on my fingers how many older computers I've transformed in an instant by simply throwing out the old hard drive and installing an SSD.

"But when I run Windows it boots so much faster"

Windows and Linux have completely different software in terms of kernels and init (types of initializing systems). This is not a valid argument. Consider also that you can get drivers for almost any computer Windows was designed for, and that PC makers on the whole do not build computers for linux, they're manufactured and supported largely for the Windows operating system.

I'm running Linux Lite via a DVD or USB Live

Running Linux Lite from a DVD, USB or external device will give you poor performance. The purpose of a Live system is for you to 'test drive' the features and hardware support before committing to an installation.
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section