1

I installed a fresh new version of ubuntu 16.04 on my system, parallel to windows, and have some trouble understanding why my grub is so slow:

Basically, grub seems to run normally until I select an entry in the menu. Then, the menu disappears, but grub's background (ubuntu's default purple color) hangs there for around 20 seconds, before handing control to the operating system. I removed quiet & splash to distinguish better.

Here's my config file:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="i915.preliminary_hw_support=1 acpi_backlight=vendor"
GRUB_CMDLINE_LINUX=""
GRUB_GFXMODE=640x480

I tried different things:

  • uncommenting the GRUB_GFXMODE=640x480, faster in the menu, but not helping for the hanging after the system is chosen.
  • I tried the hidden timeout thing, thinking that was the reason, but it isn't the case.
  • The linux flags I added (acpi + intel's hardware support) are not the cause of the slowdown, since I had the same problem before adding them.

I have not much experience with grub, I used syslinux on arch linux before, (which was faster than light =) but had to quit arch because I needed a more stable system. Still I don't think this is grub's standard behavior =D.

For the record, I have a gigabyte laptop with a skylake i7 HQ processor and a ssd for storage.

Anyone knows where this issue comes from? Thanks in advance!


Up?

I know this isn't a critical issue, but 20sec to load the initial ramdisk is a quite annoying lag.. :/

I unsuccessfully tried a boot-repair, which reinstalled grub with the same issue in the end.

Mitch
  • 107,631
lagarkane
  • 151
  • Excessive delays are often caused by failing drives: See here: http://askubuntu.com/questions/528072/how-can-i-check-the-smart-status-of-a-drive-on-ubuntu-14-04-through-16-04. Delays can also be caused by an SSD's garbage collection phase implemented in the drives firmware. – Elder Geek Aug 19 '16 at 16:53
  • Thank you for the answer. I checked my drive using gnome-disks & smartctl but there doesn't seem to be any failures. How can I check for a potential SSD's garbage collection? – lagarkane Aug 29 '16 at 16:05
  • Garbage collection and/or trim procedures are typically included in the firmware of SSD's Specific information/updated firmware should be available from the manufacturer of your drive. In general I have found that an SSD response can be delayed due to necessary garbage collection/trim routines. Newer drives seem to suffer less than the older ones I have. Your mileage may vary. When in doubt, contact the manufacturer for detailed technical information. – Elder Geek Aug 29 '16 at 16:33
  • If you want a detailed analysis of what's going on you might try this related post: http://askubuntu.com/questions/744545/how-to-determine-boot-time – Elder Geek Aug 29 '16 at 16:38
  • Thank you for your answer! A "dmesg -d" right after boot tells me that I boot on my linux in ~9seconds. Which is true, but it seems that the bottleneck is BEFORE grub gives the hand to the system & loads the kernel. I think I will try syslinux, to see if it solves my problem – lagarkane Aug 29 '16 at 16:58
  • See my answer.... Sorry for the delay my most current CPU is a 2nd generation i3 so I'm not familiar with the Skylake I7 – Elder Geek Aug 29 '16 at 21:16

1 Answers1

0

Bring your system up to date so that you get the current kernel with

sudo apt update sudo apt upgrade

After completion and reboot if necessary the output of uname -a should be 4.4.0-36 generic or newer.

Remove i915.preliminary_hw_support=1 from your config and update grub as usual. This will likely alleviate the confusion that I believe is the source of your delay at kernel launch

Source: http://www.phoronix.com/scan.php?page=news_item&px=intel-slk-linux-4.3-no-prelim

Elder Geek
  • 36,023
  • 25
  • 98
  • 183