Reverting back to the regular LTS kernel for Ubuntu 22.04
In February 2023, Canonical force updated Ubuntu 22.04 to HWE. This broke a lot of things, including the fix for USB 2 to work on some motherboards.
A fix
At this point, it is not known exactly what causes this breakage. But a mitigation that works is to force Ubuntu to stay on the Ubuntu 22.04 LTS Linux kernel (version 5.15 range).
Install the Ubuntu LTS Linux kernel
First install the latest version of the Ubuntu LTS Linux kernel (don’t worry; it will not replace the current kernel, just make the LTS Linux kernel available at boot time):
sudo apt install --install-recommends linux-generic
This may change the version number slightly if there is already an LTS kernel (for example, already referenced in a GRUB menu).
Change the default GRUB menu item
Next, change the default GRUB menu item, so that the LTS kernel will be the default Linux kernel used at boot time. We need to do this because GRUB will always select the kernel with the highest version number as the default one when generating file grub.cfg (with the menu definitions), not the one we are currently booted up in.
Change file “/etc/default/grub”. E.g, from the command line, using vi/Vim (but you must be proficient in using vi/Vim; using another editor, it must have administrator privileges in order to make changes to the file):
sudo vi /etc/default/grub
The numbers are zero-based; the first menu item is designated by 0, the second by 1, etc. For example, if the second menu, fifth sub menu item, happens to correspond to the 5.15 version, make it the default menu item by changing the line with “GRUB_DEFAULT” (the double quotes are crucial) to:
th="1>4"
Note that the location changes just by doing normal Ubuntu system updates, so verify that it still works by immediately restarting after a system update.
Update the GRUB menu
Finally, update the GRUB menu:
sudo update-grub
Verify
Restart the Ubuntu system to verify. When showing the GRUB menu, the menu item “Advanced options for Ubuntu” should have an asterisk next to it, indicating it is the default. Press Enter to enter the sub menu. The fifth item (or whatever what set in the GRUB_DEFAULT line) has an asterisk next to it, indicating it is the default. For example, “Ubuntu, with Linux 5.15.0-69-generic”. The important part is the version number. It should be in the 5.15 range (not 5.19).
After logging in, on the command line:
uname -a
It should show a version number in the 5.15 range. For example, 5.15.0-67:
Linux Ubuntu2204 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Extra goodies: Add a “Restart” and a “Shutdown” item to the GRUB menu
While you are at it, you might as well add the very handy “Restart” and “Shutdown” items to the GRUB menu. This way, there isn’t any need to manually power off the system or press the Reset button on the computer (for example, with the risk of changing something in the BIOS configuration).
Edit file “40_custom”:
sudo vi /etc/grub.d/40_custom
Add this to the end of the file:
menuentry "Restart" --class restart { echo "System rebooting..." reboot } menuentry "Shutdown" --class shutdown { echo "System shutting down..." halt }
Do “sudo update-grub” as described above and restart the system to verify the items have been added. And try them.
On Fedora, use this instead of “sudo update-grub”:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Leave a Reply