Mint 19 boots much slower than 17.x

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Mint 19 boots much slower than 17.x

Post by Flemur »

smurphos wrote: Sat Nov 03, 2018 1:04 pm31 seconds to the login-screen? Have you got grub visible? If the big delay is from power on to grub then it's an issue with the BIOS/UEFI settings. From grub to login screen should be about 9 seconds as per your systemd-analyze blame output.
That's why I asked him about the time from the grub menu. He's comparing two different computers, not just two different OSs.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Mint 19 boots much slower than 17.x

Post by MrEen »

It is possible the system has booted up but the display isn't showing the desktop right away. I have no idea how to fix/troubleshoot this, but if you look at the 45 minute boot thread you can see what I mean.

mattzees, are you using an HDMI connection to your display?
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Mint 19 boots much slower than 17.x

Post by smurphos »

trytip wrote: Sat Nov 03, 2018 2:13 pm the issue is after the grub menu. i get the same analyze blame whether i have 100 timeout or if i move the cursor up down and wait 10 2 minutes.

systemd doesn't start until the grub menu is gone. systemd-analyze blame doesn't include the grub timeout. any more research into grub timeout is futile since it's not an issue, mint19 systemd entries are the issue here and user login startup (bluetooth,printers,etc)
i mean i can also set a timeout in my bios if needed which then doesn't start grub menu until bios timer is gone.
In legacy boot systems systemd-analyze knows nothing about the firmware loading time or how long the grub time-out is. In that you are correct. But those times still exist and can be shortened if your concern is how long it takes from pressing the power button to get to a user interface. In UEFI systems UEFI can pass on the firmware time and loader (grub) time to systemd and it reports the total boot time in systemd-analyze.

E.g - viewtopic.php?p=1545214#p1545214
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Mint 19 boots much slower than 17.x

Post by thx-1138 »

...smurphos has already nailed it: check / play around with your BIOS settings (AHCI vs SATA, Fast Boot etc etc).

...still nada?
1) Try updating the drive's firmware...
2) Don't use UEFI (Legacy) with newer technologies - simple as that.

(side note: nothing to do with systemd - previous logs are fine).
mattzees
Level 1
Level 1
Posts: 30
Joined: Thu Jul 28, 2016 2:24 am

Re: Mint 19 boots much slower than 17.x

Post by mattzees »

smurphos wrote: Sat Nov 03, 2018 1:36 pm @mattzees - it's been years since I've used 17.x and even then it was only for a short time so I don't recall it being that fast on old hardware. But albeit you have possible issues prior to grub starting, and possible slowness opening the desktop session your systemd-analyze times are alright. It might be down to systemd being a slower init system but equally it might be down to 4 years of kernel bloat for support for new hardware, plus spectre and meltdown mitigations present in current kernels which may cause some performance hit during boot.
This isn't killing me by any means, but thanks for looking into it. I originally posted because I was very surprised by this behavior. Yesterday was new computer day, and given how much faster the new PC is over the old one, I was expecting almost instant-on. Oh well. No big deal.
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Mint 19 boots much slower than 17.x

Post by thx-1138 »

...maybe try passing "pcie_aspm=off" to your kernel parameters, see if that makes a difference, since... (although i kinda doubt):
ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Mint 19 boots much slower than 17.x

Post by phd21 »

Hi mattzees,

I just read your post and the good replies to it. Here are my thoughts on this as well.

FYI: I recently had an issue with slower bootup when I copied (cloned or restored) my Linux Mint partition to another drive because it referenced drives and or their partitions that were no longer there or were inaccurate, so the system was trying to locate the missing partitions to mount them. As soon as I edited the drives control file "fstab" to remove the inaccurate partition entries, saved the changes, restarted my computer, my system booted up fast as usual. FYI: Anyone can use the "disks" application to auto-mount other partitions they want to be available which will update the "fstab" file for you, see link below.

To install the gedit text editor

Code: Select all

sudo apt install gedit
To edit the "fstab" file using the gedit editor

Code: Select all

sudo -H gedit /etc/fstab
Using "Disks" to add other partitions
(1) NTFS Partition does not activate even with automount, until clicking drive in file manager - Linux Mint Forums
viewtopic.php?f=208&t=278971&hilit=disks


How to diagnose/fix very slow boot on Ubuntu 18.04 - Ask Ubuntu
https://askubuntu.com/questions/1030867 ... untu-18-04

Upgraded Ubuntu 18.04 suddenly boots slowly? Read this.
https://www.dedoimedo.com/computers/ubu ... -boot.html


Hope this helps ...
.
fstab1.jpg
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
mattzees
Level 1
Level 1
Posts: 30
Joined: Thu Jul 28, 2016 2:24 am

Re: Mint 19 boots much slower than 17.x

Post by mattzees »

phd21 wrote: Sat Nov 03, 2018 3:45 pm ...FYI: I recently had an issue with slower bootup when I copied (cloned or restored) my Linux Mint partition to another drive...
I've got a brand new install of Mint 19 on an brand new M.2 NVME SSD drive.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p1 during installation
UUID=a8bbc077-2774-4dbc-81da-9426014a9e62 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Mint 19 boots much slower than 17.x

Post by phd21 »

Hi mattzees,

You have no swap partition setup which is normal for Ubuntu 18.04 but may slow boot up process.

How to diagnose/fix very slow boot on Ubuntu 18.04 - Ask Ubuntu
https://askubuntu.com/questions/1030867 ... untu-18-04
To update GRUB so that it passes this option to the kernel automatically on boot:

Edit the file /etc/default/grub file so that the string "noresume" is included in the GRUB_CMDLINE_LINUX_DEFAULT line, for example:
Install the gedit text editor or use another text editor

Code: Select all

sudo apt install gedit
Edit the default Grub bootloader and add noresume to it like below

Code: Select all

sudo -H gedit /etc/default/grub
Example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"

Run this command to update GRUB:

Code: Select all

sudo update-grub
Reboot the computer
Of course, you could also add a swap partition without editing the Grub manually to add the "noresume". If you add a swap partition, then make sure to tell the system to not use it unless absolutely necessary especially when using an SSDrive by lowering the "swappiness" value, see * link below. I use a "swappiness = 10" because I had problems on my ancient underpowered computer when it was less than 10.

How To Add Swap Space on Ubuntu 18.04 | DigitalOcean
https://www.digitalocean.com/community/ ... untu-18-04

How to create or add a SWAP partition in Ubuntu and Linux Mint | FOSS Linux
https://www.fosslinux.com/1064/how-to-c ... -mint.htm/

[FIX] no swap on fresh LM19 install with home directory encryption - Linux Mint Forums
viewtopic.php?f=90&t=274157&hilit=swap

* Speed up your Mint 19! - Easy Linux tips project
--- see section on "decrease swap use"
https://sites.google.com/site/easylinuxtipsproject/3


Hope this helps ...
.
Grub_LM19_add_noresume.jpg
.
ReduceSwapUsage.jpg
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
mattzees
Level 1
Level 1
Posts: 30
Joined: Thu Jul 28, 2016 2:24 am

Re: Mint 19 boots much slower than 17.x

Post by mattzees »

Just checked etc/fstab on my old PC. It's identical to the one on my new PC.
I'm not putting any more time into this, but I very much appreciate everyone responding. :)
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Mint 19 boots much slower than 17.x

Post by phd21 »

Hi mattzees,

You are welcome from all of us that replied...

It would not hurt to add the "noresume" to your Grub configuration file to see if that helps speed up your boot up.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
mattzees
Level 1
Level 1
Posts: 30
Joined: Thu Jul 28, 2016 2:24 am

Re: Mint 19 boots much slower than 17.x

Post by mattzees »

To update this...
Software Update Manager has installed an update to systemd and now my boot times are much faster. I'm also seeing a grub boot menu, which I wasn't seeing before.
Just FYI.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Mint 19 boots much slower than 17.x

Post by smurphos »

I guess you did this
smurphos wrote: Sat Nov 03, 2018 11:57 am I recommend making it visible so you can interact with it if you ever need to.

sudo nano /etc/default/grub to open that file in a root text editor.

Change

Code: Select all

GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
to

Code: Select all

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=2
Ctrl-O followed by enter to save and then Ctrl-X to exit
but forgot to do this
smurphos wrote: Sat Nov 03, 2018 11:57 am Then run sudo update-grub and reboot.
There was also a kernel update in the last couple of days which would force the last part so you've eventually dropped your hidden 10 second grub timeout to a 2 second visible one.... :wink: :)
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
mattzees
Level 1
Level 1
Posts: 30
Joined: Thu Jul 28, 2016 2:24 am

Re: Mint 19 boots much slower than 17.x

Post by mattzees »

smurphos wrote: Thu Nov 15, 2018 2:35 pm There was also a kernel update in the last couple of days which would force the last part so you've eventually dropped your hidden 10 second grub timeout to a 2 second visible one.... :wink: :)
It's true. You're a rockstar.
Alc-Stu
Level 1
Level 1
Posts: 21
Joined: Sun Oct 28, 2012 11:26 pm

Re: Mint 19 boots much slower than 17.x

Post by Alc-Stu »

I'm having similar problems with 18.3 since going to systemd, which really seems to be a MicroSoft overlay of complexity. Using the same grub timeout and other settings on this hardware before changing to systemd, I saw ~20 seconds by stopwatch from grub screen exit to login prompt box. Now I see about 45 s. Particularly troubling is that, after loading the kernal and initrd the reported time for systemd for the / partition is more than 5 seconds! I have followed the directions posted to isolate the factors for my system, and results are below between the code tags, except that the dmesg output made the total post too big. (I can post it separately):

Code: Select all

al1@dafoofus ~ $ inxi -Fxz
System:    Host: dafoofus Kernel: 4.4.0-176-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: MATE 1.18.0 (Gtk 3.18.9-1ubuntu3.3) Distro: Linux Mint 18.3 Sylvia
Machine:   Mobo: ASUSTeK model: M5A97 LE R2.0 v: Rev 1.xx
           Bios: American Megatrends v: 2701 date: 03/24/2016
CPU:       Hexa core AMD FX-6300 Six-Core (-MCP-) cache: 12288 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 42141
           clock speeds: max: 3500 MHz 1: 1400 MHz 2: 2500 MHz 3: 1400 MHz 4: 2000 MHz 5: 1400 MHz
           6: 1400 MHz
Graphics:  Card: NVIDIA GT218 [GeForce 210] bus-ID: 01:00.0
           Display Server: X.Org 1.18.3 drivers: nvidia (unloaded: fbdev,vesa,nouveau)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: GeForce 210/PCIe/SSE2
           GLX Version: 3.3.0 NVIDIA 340.107 Direct Rendering: Yes
Audio:     Card-1 NVIDIA High Definition Audio Controller driver: snd_hda_intel bus-ID: 01:00.1
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
           driver: snd_hda_intel bus-ID: 00:14.2
           Sound: Advanced Linux Sound Architecture v: k4.4.0-176-generic
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: d000 bus-ID: 02:00.0
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 2500.5GB (15.4% used) ID-1: /dev/sda model: WDC_WD20EZRZ size: 2000.4GB
           ID-2: /dev/sdb model: WDC_WDS500G2B0A size: 500.1GB
Partition: ID-1: / size: 74G used: 22G (31%) fs: ext4 dev: /dev/sda5
           ID-2: /home size: 1.3T used: 319G (27%) fs: ext4 dev: /dev/sda6
           ID-3: swap-1 size: 20.78GB used: 0.00GB (0%) fs: swap dev: /dev/sda7
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 14.4C mobo: N/A gpu: 0.0:52C
           Fan Speeds (in rpm): cpu: 0
Info:      Processes: 220 Uptime: 8 min Memory: 1005.4/7881.4MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0 Client: Shell (bash 4.3.481) inxi: 2.2.35 
al1@dafoofus ~ $ systemd-analyze
Startup finished in 10.621s (kernel) + 33.616s (userspace) = 44.238s
al1@dafoofus ~ $ systemd-analyze blame
          8.851s NetworkManager-wait-online.service
          7.715s ntp.service
          5.629s dev-sda5.device
          4.586s ModemManager.service
          3.147s accounts-daemon.service
          3.066s networking.service
          2.839s grub-common.service
          2.667s lvm2-monitor.service
          2.455s rc-local.service
          2.441s nmbd.service
          2.224s samba-ad-dc.service
          2.198s systemd-logind.service
          2.147s thermald.service
          2.098s console-kit-log-system-start.service
          1.988s lm-sensors.service
          1.986s pppd-dns.service
          1.770s NetworkManager.service
          1.755s systemd-udevd.service
          1.474s systemd-hwdb-update.service
          1.108s keyboard-setup.service
           906ms Dianne.mount
           838ms systemd-tmpfiles-setup-dev.service
           813ms systemd-journald.service
           752ms polkitd.service
           659ms console-setup.service
           609ms plymouth-start.service
           596ms systemd-tmpfiles-setup.service
           566ms rsyslog.service
           564ms upower.service
           546ms pwrstatd.service
           461ms avahi-daemon.service
           447ms systemd-fsck@dev-disk-by\x2duuid-0af8f604\x2da562\x2d4014\x2db6cf\x2d92588ba4b0b4.s
           438ms systemd-remount-fs.service
           406ms colord.service
           395ms dev-mqueue.mount
           394ms dev-hugepages.mount
           392ms sys-kernel-debug.mount
           381ms systemd-modules-load.service
           300ms smbd.service
           273ms systemd-random-seed.service
           233ms udisks2.service
           230ms kmod-static-nodes.service
           229ms ufw.service
           216ms binfmt-support.service
           205ms dev-sda7.swap
           201ms openvpn.service
           190ms irqbalance.service
           159ms home.mount
           142ms systemd-udev-trigger.service
           131ms systemd-sysctl.service
           116ms systemd-journal-flush.service
           111ms plymouth-read-write.service
           104ms loadcpufreq.service
            80ms alsa-restore.service
            78ms user@1000.service
            70ms dns-clean.service
            56ms plymouth-quit-wait.service
            56ms plymouth-quit.service
            53ms systemd-update-utmp.service
            51ms console-kit-daemon.service
            42ms cpufrequtils.service
            22ms setvtrgb.service
            21ms ondemand.service
            19ms proc-sys-fs-binfmt_misc.mount
            17ms hddtemp.service
            15ms speech-dispatcher.service
             6ms ureadahead-stop.service
             5ms systemd-update-utmp-runlevel.service
             4ms rtkit-daemon.service
             3ms systemd-user-sessions.service
             2ms resolvconf.service
             1ms sys-fs-fuse-connections.mount
al1@dafoofus ~ $ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT='Linux Mint 18 MATE 64-bit, with Linux 4.4.0-21-generic'
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="splash"
GRUB_CMDLINE_LINUX="nomodeset"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console


# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Granted that I could pare down the Grub time, but I have Debian, openSUSE, Slackware, LM19.3 MATE and LM19.3XFCE also on the SSD. Boot is from the hard drive, and the /home is the second extended partition. Default as set by the Debian install is, of course, Debian.
Thanks in advance for any help: This has perplexed me since I let the system go over to systemd.

I'd also welcome advice on reverting to sysvinit; I can handle the updates myself.
Locked

Return to “Installation & Boot”