Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: slow boot after install

  1. #1
    Join Date
    Dec 2019
    Beans
    16

    slow boot after install

    Hello Everyone,

    I just installed ubuntu 19,10 on my M.2 NVME hard-drive and it loads very slow. After running

    systemd-analyze
    Startup finished in 2.664s (kernel) + 1min 41.971s (userspace) = 1min 44.635s
    graphical.target reached after 1min 41.966s in userspace

    it is taking almost 2 minutes to load. How can I speed this up. I am new to linux and have no idea how to fix this issues.

    Thanks for the help

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,657
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: slow boot after install

    $ systemd-analyze blame
    That can show a bunch of startup dependencies that can safely be removed if you don't use them. For example, bluetooth can be really slow and on a system that never will use any bluetooth, it is a waste.

    Also, check the log files for hardware errors. Failing hardware can work just well enough to require longer tests before failing. Lots of timeouts slow down boots.

    As to timeouts, a slow DNS or bad wifi can make for a slow system too.

    Then there are always the low RAM, slow CPU, or incorrectly configured swap that can make for terrible startup.

  3. #3
    Join Date
    Mar 2007
    Location
    Promiseland
    Beans
    1,035
    Distro
    Xubuntu

    Re: slow boot after install

    There may be another factor to consider if you have an intel CPU. There was a (protective) microcode update a year or so ago that delays the boot process for about a minute; so on my intel powered machine that used to take about 15-20 seconds to boot, now it takes 1min 43sec.
    This issue does not seem to effect AMD APUs.
    I usually turn my on then walk the dog or get a cup of coffee.
    Last edited by him610; February 15th, 2020 at 11:04 PM. Reason: Added another sentence
    Cheers,


    The Linux Command Line at http://linuxcommand.org/

  4. #4
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    7,984
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: slow boot after install

    Quote Originally Posted by alirezas View Post
    graphical.target reached after 1min 41.966s in userspace
    That looks to me like a service is timing out; the default time to wait for things to properly start (or properly stop) is 90 seconds.

    As TheFu says, you can check logs and things to see if that's the case for you. You can see if you can fix whichever thing is stalling, or turn it off, or - as a last resort - just make the timeout period shorter.
    None but ourselves can free our minds

  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: slow boot after install

    I made a variety of changes and this is my boot with 20.04 on a skylake Intel chip with NVMe drive.
    fred@fred-Z170N-focal:~$ systemd-analyze
    Startup finished in 3.229s (kernel) + 8.818s (userspace) = 12.048s
    graphical.target reached after 5.627s in userspace

    I updated UEFI to latest available.
    Updated SSD firmware with Samsung ISO.

    turned off NetworkManager-wait with systemctl
    changed from quiet splash to noplymouth, will see boot process rather than Ubuntu logo
    sudo apt install libblockdev-crypto2 libblockdev-mdraid2
    turned off printer when rebooting
    # only want .deb software
    removed snaps

    Changed systemctl daily timer
    housecleaned systemctl logs

    # no thunderbolt so removed
    systemctl status bolt
    boltctl list
    systemctl mask bolt.service

    Went thru these threads to pick up any other issues.
    Slow Boot --------------------------------
    https://ubuntuforums.org/showthread.php?t=2417453 &
    https://ubuntuforums.org/showthread....2#post13857392 &
    https://www.dedoimedo.com/computers/...slow-boot.html
    https://askubuntu.com/questions/1187...ost-everything &
    https://askubuntu.com/questions/1018...ine-service-do
    https://askubuntu.com/questions/8004...-daily-service
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,657
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: slow boot after install

    Here's mine:
    Code:
    $ systemd-analyze 
    Startup finished in 1min 5.731s (kernel) + 14.702s (userspace) = 1min 20.433s
    on an 8th gen Core i5. But that isn't the true story.

    I can assure you that it doesn't take a 1:20 to start. It is closer to 20 sec, if even that long. Let me explain.
    1. Push the power button, wait about 5 sec for the LUKS decryption challenge to appear. The HDD has to be unlocked for access. This is a pre-boot task.
    2. Insert the correct yubikey
    3. Type in the yubikey challenge passphrase twice
    4. Wait about 5 sec for the login screen to appear.
    5. Type in the login username/password. I don't do the 'pick list'
    6. Wait about 5 seconds for the WM to display. I don't do any DE.

    Regardless of what systemd claims, the other services after the WM is up can take 5 minutes for all that I care.
    See ...
    Code:
    $ systemd-analyze critical-chain
    The time after the unit is active or started is printed after the "@" character.
    The time the unit takes to start is printed after the "+" character.
    
    graphical.target @14.692s
    └─multi-user.target @14.691s
      └─snapd.seeded.service @14.665s +25ms
        └─snapd.service @12.549s +2.114s
          └─basic.target @12.422s
            └─sockets.target @12.422s
              └─dnscrypt-proxy.socket @12.422s
                └─network.target @12.422s
                  └─networking.service @5.984s +6.437s
                    └─apparmor.service @5.901s +78ms
                      └─local-fs.target @5.896s
                        └─var-lib-lxd-devlxd.mount @13.574s
                          └─local-fs-pre.target @881ms
                            └─lvm2-monitor.service @206ms +675ms
                              └─lvm2-lvmetad.service @312ms
                                └─systemd-journald.socket @198ms
                                  └─-.mount @182ms
                                    └─system.slice @197ms
                                      └─-.slice @182ms
    It is important to know what is being displayed by the commands used. 15sec seems fast enough for something that happens 1-2 times a week.

    Heck, I even installed a snap package yesterday.

  7. #7
    Join Date
    Dec 2019
    Beans
    16

    Re: slow boot after install

    I am getting and error hda audio timeout, but I don't know how to get the error and fix it. It looks like the audio codec is not installed or working.

  8. #8
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    557
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: slow boot after install

    As long as you don't tell us what your hardware is, it's difficult to help.

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,657
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: slow boot after install

    Quote Originally Posted by ml9104 View Post
    As long as you don't tell us what your hardware is, it's difficult to help.
    The quick way to provide that is with inxi -Fz Post the output, using code tags, so the output columns line up in these forums.
    https://ubuntuforums.org/showthread....7#post13931357 is an example.

    Adv Reply has (#) - for code tags. Go Advanced also works. Whenever posting terminal stuff, using code tags really helps people see what's important. We recognize patterns in the output and are familiar with the formats.

    Please use code tags.

  10. #10
    Join Date
    Dec 2019
    Beans
    16

    Re: slow boot after install

    This is what I get running

    Code:
    amin@olafic:~$ inxi -FzSystem:    Host: olafic Kernel: 5.3.0-29-generic x86_64 bits: 64 Desktop: Gnome 3.34.1 
               Distro: Ubuntu 19.10 (Eoan Ermine) 
    Machine:   Type: Desktop Mobo: ASUSTeK model: ROG MAXIMUS XI HERO (WI-FI) v: Rev 1.xx 
               serial: <filter> UEFI: American Megatrends v: 1401 date: 11/26/2019 
    CPU:       Topology: 8-Core model: Intel Core i9-9900K bits: 64 type: MT MCP L2 cache: 16.0 MiB 
               Speed: 800 MHz min/max: 800/5000 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
               5: 800 6: 800 7: 801 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800 
               16: 800 
    Graphics:  Device-1: Intel UHD Graphics 630 driver: N/A 
               Device-2: NVIDIA TU102 [GeForce RTX 2080 Ti Rev. A] driver: N/A 
               Display: x11 server: X.Org 1.20.5 driver: fbdev,nouveau unloaded: modesetting,vesa 
               resolution: 3440x1440~89Hz 
               OpenGL: renderer: llvmpipe (LLVM 9.0 256 bits) v: 3.3 Mesa 19.2.8 
    Audio:     Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel 
               Device-2: NVIDIA TU102 High Definition Audio driver: snd_hda_intel 
               Device-3: Logitech G933 Wireless Headset Dongle type: USB 
               driver: hid-generic,snd-usb-audio,usbhid 
               Sound Server: ALSA v: k5.3.0-29-generic 
    Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi 
               IF: wlo1 state: down mac: <filter> 
               Device-2: Intel Ethernet I219-V driver: e1000e 
               IF: eno2 state: up speed: 1000 Mbps duplex: full mac: <filter> 
    Drives:    Local Storage: total: 1.36 TiB used: 13.80 GiB (1.0%) 
               ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 500GB size: 465.76 GiB 
               ID-2: /dev/sda vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB 
    Partition: ID-1: / size: 456.94 GiB used: 13.80 GiB (3.0%) fs: ext4 dev: /dev/nvme0n1p3 
    Sensors:   System Temperatures: cpu: 33.0 C mobo: N/A 
               Fan Speeds (RPM): cpu: 0 
    Info:      Processes: 397 Uptime: 7h 55m Memory: 15.48 GiB used: 1.97 GiB (12.7%) Shell: bash 
               inxi: 3.0.36
    Last edited by ajgreeny; February 17th, 2020 at 07:48 PM. Reason: Code tags added

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •