How do I keep the current kernel version from being pushed out of my grub menu

TL;DR How do I keep the current kernel version from being pushed out of my grub menu and accessible to the system even if the kernel is updated in the near future?

CPU: Intel i7 2700K
GPU: Nvidia GeForce GTX 970
Distro: Ubuntu Studio 20.04
Kernel Version: 5.4.0-40-lowlatency
DE - xfce 4.14

I was trying to hack the drivers for a Huion Graphics Tablet to work with Ubuntu Studio 20.04. This particular tablet (Huion H950P) is not “plug and play.” So, I was trying to utilize the drivers over at digimend but no joy.

Then I read on a subreddit ( that the problem is that the device ID has changed in the hardware from 256c:006e to 256c:006d (the final character being the only difference). The proposed fix from the reddit post was to make that single modification in the digimend source code of the drivers and recompile them. I did the modification, recompiled, installed, and rebooted.

Upon reboot, my system would no longer see nor utilize my Nvidia GPU. I lost the use of my dual 1920x1080 monitors and the resolution on the single monitor that worked was something like 1200 x 800.

I uninstalled the drivers – no joy. I reinstalled the Nvidia drivers and software suite - both through the gui and the command line – still no joy. In fact, after a few reboots, things got much worse. I was left with a single blinking cursor in the upper left of an otherwise black screen. (An extreme dark mode to say the least).

During one of the subsequent panicked reboots, I interrupted the boot process and got to my grub menu (version 2.04-1ubuntu26). In that menu I had the choice of stepping back to the previous kernel build. The current version of 5.4.0-40-lowlatency seemed to be toast. I chose to boot from the previous version of 5.4.0-39-lowlatency and everything was back to normal – JOY!

Here’s my potential problem: What will happen to the useful kernel version “39” when the system updates at some point in the future to “41”? What if “41” won’t work? Will “39” still be around for me to fall back upon? Why are there only 2 kernel versions in the grub menu as opposed to 4 or 6 or the last 18? (I suspect that this is related to apt-get autoclean and autoremove which are part of my CLI update steps.) What should I do in this situation?

I think Ubuntu at least will keep 3 kernels, it could even be that it keeps all of them and only via a manual auto removal it will delete them using apt.

The latest kernel will usually be always on top but you can change that at least until another one fixes your problem.

Before I explain everything to you I would prefer to send you the documentation. Be aware that you should use a text editor as root and not a GUI to change the Grub boot menu because gksu is deprecated.

1 Like

Beautiful. Thank you. I’ll give this a go later today.

Update: 20200721

So a newer kernel was included in the update for today. I had done extensive backups to be certain that I was prepared for whatever happened. The kernel updated without an issue. I am currently running 5.4.0-42-lowlatency (it skipped the “41”). The grub menu now has 3 kernels from which to choose:

  • “39” my working fall back kernel,
  • “40” which is toast, and
  • “42” working current kernel.

I did not run autoclean or autoremove. I’ll wait for a few more kernel updates before I do so.

It is not needed and not really recommended. If you just use the regular update manager you will see it does not remove the older kernels yet, it only shows this message in apt. ‘Experienced’ users might just use the autoremove feature but I would not give this advice to people that are unsure about it.