Screen glitching after kernel update

I don’t really know where to ask this, because I’ve replicated this issue on my laptop (Lenovo IdeaPad Pro 5) with multiple distros. After a recent kernel update, I experience screen glitches like in the video. I have NVIDIA GeForce RTX 3050 Laptop GPU and the problem is present both with and without the NVIDIA driver installed. The video shows Fedora 44 beta, and I first noticed this on Fedora 43. I tried to use the screen capture tool, but it didn’t capture the glitching. When I choose an older kernel in grub, the glitching is gone.

That shows that you have to use the older kernel till the drivers are ready for the highest kernel Fedora offers. Reading here shows that there are still issues with the newest Nvidia drivers and the newest kernel.

1 Like

Hi, thank you for your reply. I’ve never dealt with such issue in my three years of using Linux, and this is happening for over two weeks, so I started being concerned. I’ll happily wait for the fixed drivers to arrive.

You can do this to activate the older kernel by default:

List all installed kernels
--------------------------

To get the index number of all the installed kernels:

  sudo grubby --info=ALL | grep -E "^kernel|^index"

The output should be something like this:

index=0
kernel="/boot/vmlinuz-6.11.11-200.fc40.x86_64"
index=1
kernel="/boot/vmlinuz-6.11.10-200.fc40.x86_64"
index=2
kernel="/boot/vmlinuz-6.11.8-200.fc40.x86_64"
index=3
kernel="/boot/vmlinuz-0-rescue-6a0d0e8a953c43e682bd4f1a6e0143be"

Change the default kernel using index
-------------------------------------

Now we can change the default kernel by using the index number:

 sudo grubby --set-default-index=1

Verify the default kernel
-------------------------

Verify that the right kernel has been set as default:

   sudo grubby --default-title

The output will be the default kernel title:

Fedora Linux (6.11.10-200.fc40.x86_64) 40 (Workstation Edition)

Why so complicated? if you know the kernel version just run
sudo grubby --set-default=/boot/vmlinuz-<kernel-version>
e.g /boot/vmlinuz-6.19.8-300.fc44.x86_64

The name of the kernel will not change when new kernels get installed, unlike the index number.

2 Likes

Mostly I do not know which knowledge a user has. So I do give complete instructions that also a beginner can get into it. And as you can see, I copy and past the instructions, they do have some age (see kernel version).

I was reading here, that we can “skin a cat” in different ways :wink:

This seems to be an issue with having updated to a Beta version of Fedora (f44) without full knowledge of the potential issues. The Beta version is a testing version used to identify and fix any lingering issues before final release. The beta version seems to not yet have the final nvidia driver released for it.

In fact there was a 580.142 driver version that appeared to have some bugs so it was removed and now only the 595.58.93 driver version is in the testing repo.

Thank you, that’s good to know. Although i used f44 for the video, I am also experiencing this issue with Fedora 43 (not beta), and live images of some other distros (Bazzite, Gnome OS (which is even nightly)).

So, if I get this right, I can change the default kernel with --set-default, and then later reset this change with --set-default-index=0?

1 Like

It’s up to you, It does not really matter. The index numbers change with every new kernel installation or removal, but they correspond to the order in which kernels are displayed in the grub menu.

Keep in mind that a new kernel will become the default kernel.

1 Like

Yes, to test the new kernel and see if the issues are still there.
After that it is good practice to change again if it not works as it should. To maintain on the older kernel and not overwrite it.

This is true when using the index to set the default, but not when using the kernel name as you showed above.

correct. As Mark said, the newest installed kernel will always be at index 0, so your command shown should always reset it to the default boot kernel.

Jeff, seriously, How would this be implemented, and what’s the use case?

$ uname -r
6.19.9-300.fc44.x86_64

$ ls /boot/vmlinuz-6*
/boot/vmlinuz-6.19.7-300.fc44.x86_64  /boot/vmlinuz-6.19.8-300.fc44.x86_64  /boot/vmlinuz-6.19.9-300.fc44.x86_64

$ sudo grubby --default-kernel
/boot/vmlinuz-6.19.9-300.fc44.x86_64

$ sudo grubby --set-default=/boot/vmlinuz-6.19.8-300.fc44.x86_64 
The default is /boot/loader/entries/48f14d18395f43eeaa51f1f217559b62-6.19.8-300.fc44.x86_64.conf with index 1 and kernel /boot/vmlinuz-6.19.8-300.fc44.x86_64

$ sudo kernel-install add "$(uname -r)" "/lib/modules/$(uname -r)/vmlinuz"

$ sudo grubby --default-kernel
/boot/vmlinuz-6.19.9-300.fc44.x86_64
$ cat /etc/sysconfig/kernel 
# UPDATEDEFAULT specifies if kernel-install should make
# new kernels the default
UPDATEDEFAULT=yes   <============

There have been a few cases where a newer kernel would not boot, such as was reported for a few topics on specific hardware/bios versions with the upgrade from the 6.17 or 6.18 kernel to the 6.19 kernel. Setting the working older kernel as default by using the name, as you suggested, avoids the hassle of keeping track where it is in the indexing scheme when setting an index number as the default.

In most cases it would not be relevant and I have never seen the need to change the default kernel for booting.

I do, however, always have the grub boot menu shown so I can select whatever kernel I wish from those currently installed. Most users do not see the grub boot menu so when a new kernel fails to boot it can be difficult to select a different one for booting

I believe this is only applicable when the default is set by index number. I have seen several reports of successfully setting the default by name and then it does not get changed with a new kernel install using dnf.

Does installing a kernel using dnf follow that config in /etc/sysconfig/kernel and override the setting of the default kernel by name? I am not sure that the package manager calls kernel-install.

The commands above have shown that you’re wrong.

Happy Easter! :slight_smile:

It definitely appears there has been a change from past behavior.

In the past when a user set the default kernel by name it was never changed even with installing newer kernels, but now it does get changed/replaced.

This means that those wishing to keep and continue using older kernels now must deliberately ensure they boot into the older kernel before updates to ensure that the older kernel does not get removed AND they must also reset the default with each kernel update to ensure the older kernel remains the default for them.

They also can change the default behavior of changing the default kernel by editing the file noted (/etc/sysconfig/kernel) to change that entry and block the default kernel setting change.

This change is nice to know going forward.

Thanks for the pointer!! :+1: