Dnf Kernel Version update - Freezes during update

Sometimes when I run sudo dnf upgrade -y, there is a kernel version update. During this update the Fedora freezes, Gnome Desktop freezes (for example the clock on Gnome Desktop doesn’t updates, keyboard and mouse freezes) and I have to force press power button on my laptop.

When I reboot everything is fine and the kernel has got updated.

Any suggestion what could be going wrong? (It happened twice with current and the previous kernel update).


I waited for 30 minutes, and the Fedora was still frozen. So, I did force power off.

1 Like

Just as an FYI
Every kernel upgrade requires some time to complete as it is necessary to properly configure the system for the newer kernel, and maybe even compile new drivers for the new kernel.

I would suggest that waiting for several minutes (maybe even 10 or more) would be safer for the system than a forcible power off. A forced power off when files are being written to the drive may have disastrous consequences.


Thanks, I waited for 30 minutes, and the Fedora was still frozen.

1 Like

What DE were you on? Did you notice if any other packages were updated, like gnome-shell or mutter (on Gnome/Workstation). It could be other libraries that are part of the graphical stack that were updated, and this caused the freeze. (These edge cases are why offline-upgrades are suggested.)

1 Like

@ankursinha Its Gnome. I am not sure if package related to gnome got updated. Is it possible to check it from the dnf history?

I have used Ubuntu (with Gnome) for several years and I used to update regularly from the terminal, but I never experienced that the DE froze during the kernel or other updates.

Can this offline update be done from the terminal? Like I can issue the dnf command in the terminal and it can shutdown and update everything? I don’t prefer to use GUI tools such as Gnome Software Center.

Or is there no safe way of doing dnf upgrade from terminal?

1 Like
sudo dnf history list
sudo dnf history info <number>

should tell you.

Then you’ve been lucky, that’s all. There’s no way to tell how the new components will affect the system—there are always chances of conflicts between already loaded older libraries and newer versions and so on.


sudo dnf offline-upgrade download
sudo dnf offline-upgrade reboot

man dnf for more, of course.


@ankursinha Thanks I did offline updates last month and I had a successful kernel update to 6.3. I did it yesterday the offline update the kernel got updated to 6.4 and everything seemed fine as the laptop did shutdown after update. But when I tried to reboot the Fedora won’t boot, so I managed to boot into Fedora from the grub settings with the previous 6.3 kernel. Now I have to choose 6.3 kernel manually to be able to boot in.

Could you please suggest what can I do to repair the last kernel version update? I get the following when I booted with kernel 6.3.

$ sudo dnf upgrade
Last metadata expiration check: 2:41:39 ago on Mon 24 Jul 2023 18:29:08 CEST.
Dependencies resolved.
Nothing to do.

$ sudo dnf check-update
Last metadata expiration check: 2:41:47 ago on Mon 24 Jul 2023 18:29:08 CEST.
Security: kernel-core-6.4.4-200.fc38.x86_64 is an installed security update
Security: kernel-core-6.3.11-200.fc38.x86_64 is the currently running version

If I can’t fix the problem can I remove the kernel 6.4 version? Also, I don’t require such frequent monthly kernel version update. Can I ask dnf to update everything except kernel by default? And after doing this, in case if i wish to do kernel update what should I do?

sudo dnf upgrade --exclude=kernel\*

I did the following:

sudo dnf offline-upgrade download
sudo dnf offline-upgrade reboot

But, recently I installed another operating system (Ubuntu) too, so it shows grub everytime. So when we execute the above command, now the grub is shown and the offline update happens but I have to manually choose fedora. And update looks interface appears in very small font size.

Is it possible to instruct the next boot operating system automatically without having to choose in grub , so that the above commands can finish update automatically?

1 Like