This question already has an answer here:

I've been trying to configure Grub to give a hidden 3 second countdown, and then boot into the default option.

What appears to happen is that Grub will alternate randomly between doing just that, and showing the menu with a 25 second countdown.

This happens both on full reboot, and on restore from hibernate. I have not been able to establish any pattern which will predict when it happens. Sometimes it gives one config 2 or 3 times in a row, sometimes it switches.

How can I make it consistent?

Ubuntu Desktop 18.04

Contents of /etc/default/grub:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p3"
GRUB_INIT_TUNE="480 440 1"

I have also used grub-customizer 5.1.0.

marked as duplicate by karel, Eric Carvalho, Fabby, Tom Brossman, Thomas Nov 25 '18 at 11:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


It turns out the problem is actually that a "recordfail" field is set in the file /boot/grub/grubenv

The way to reset that is with the command:

sudo /usr/bin/grub-editenv /boot/grub/grubenv unset recordfail

But what you really need is for this to be done as part of boot sequence, whether normal or from hibernate.

This can be done with a service.

Use this service descriptor:

Description=Unset recordfail in grubenv after hibernation.

ExecStart=/usr/bin/grub-editenv /boot/grub/grubenv unset recordfail

WantedBy=hibernate.target hybrid-sleep.target

Then install it using the instructions from this answer:

Create the above descriptor as



sudo systemctl start grub-unset-recordfail
sudo systemctl enable grub-unset-recordfail
sudo systemctl stop grub-unset-recordfail

Some references suggested you need to run sudo systemctl daemon-reload first, but I have not found this necessary.

Not the answer you're looking for? Browse other questions tagged or ask your own question.