{"id":3298,"date":"2023-03-27T14:57:01","date_gmt":"2023-03-27T13:57:01","guid":{"rendered":"https:\/\/pmortensen.eu\/world2\/?p=3298"},"modified":"2026-06-01T16:43:05","modified_gmt":"2026-06-01T15:43:05","slug":"reverting-back-to-the-regular-lts-kernel-for-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/pmortensen.eu\/world2\/2023\/03\/27\/reverting-back-to-the-regular-lts-kernel-for-ubuntu-22-04\/","title":{"rendered":"Reverting back to the regular LTS kernel for Ubuntu 22.04"},"content":{"rendered":"<p>In February 2023, Canonical <a href=\"https:\/\/www.youtube.com\/watch?v=CkyQhfhf048&#038;t=2m36s\">force updated Ubuntu 22.04<\/a> to <a href=\"https:\/\/ubuntu.com\/kernel\/lifecycle\">HWE<\/a>. This broke a lot of things, including <a href=\"https:\/\/pmortensen.eu\/world2\/2022\/07\/20\/enabling-both-usb-3-and-usb-2-ports-for-a-ga-970a-ds3p-motherboard\/#2023_broken_Ubuntu_22.04\">the fix for USB 2 to work on some motherboards<\/a>.<\/p>\n<h2>A fix<\/h2>\n<p>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 <strong><em>LTS<\/em><\/strong> Linux kernel (version 5.15 range).<\/p>\n<h3>Install the Ubuntu LTS Linux kernel<\/h3>\n<p>First install the latest version of the Ubuntu LTS Linux kernel (don&#8217;t worry; it will not replace the current kernel, just make the LTS Linux kernel available at boot time):<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsudo apt install --install-recommends linux-generic\r\n<\/pre>\n<p>This may change the version number slightly if there is already an LTS kernel (for example, already referenced in a <a href=\"https:\/\/en.wikipedia.org\/wiki\/GNU_GRUB\">GRUB<\/a> menu).<\/p>\n<h3>Change the default GRUB menu item<\/h3>\n<p>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 <strong><em>highest version number<\/em><\/strong> as the default one when generating file <em>grub.cfg<\/em> (with the menu definitions), not the one we are currently booted up in.<\/p>\n<p>Change file \u201c\/etc\/default\/grub\u201d. E.g, from the command line, using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Vi\">vi<\/a>\/<a href=\"https:\/\/en.wikipedia.org\/wiki\/Vim_%28text_editor%29\">Vim<\/a> (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):<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsudo vi \/etc\/default\/grub\r\n<\/pre>\n<p>The numbers are zero-based; the first menu item is designated by 0, the second by 1, etc. For example, if the <strong><em>second<\/em><\/strong> menu, <strong><em>fifth<\/em><\/strong> sub menu item, happens to correspond to the 5.15 version, make it the default menu item by changing the line with &#8220;GRUB_DEFAULT&#8221; to (the default is &#8220;GRUB_DEFAULT=0&#8221;):<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nGRUB_DEFAULT=&quot;1&gt;4&quot;\r\n<\/pre>\n<p>Note that the double quotes are <strong><em>crucial<\/em><\/strong>. If a submenu were not specified, the double quotes would be optional.<\/p>\n<p>Also 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.<\/p>\n<h3>Update the GRUB menu<\/h3>\n<p>Finally, update the GRUB menu:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsudo update-grub\r\n<\/pre>\n<h3>Verify<\/h3>\n<p>Restart the Ubuntu system to verify. When showing the GRUB menu, the menu item &#8220;Advanced options for Ubuntu&#8221; should have an <strong><em>asterisk<\/em><\/strong> 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 <strong><em>asterisk<\/em><\/strong> next to it, indicating it is the default. For example, &#8220;Ubuntu, with Linux 5.15.0-69-generic&#8221;. The important part is the version number. It should be in the 5.15 range (not 5.19).<\/p>\n<p>After logging in, on the command line:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nuname -a\r\n<\/pre>\n<p>It should show a version number in the 5.15 range. For example, <em>5.15.0-67<\/em>:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nLinux 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\r\n<\/pre>\n<h2>Extra goodies: Add a &#8220;Restart&#8221; and a &#8220;Shutdown&#8221; item to the GRUB menu<\/h2>\n<p>While you are at it, you might as well add the very handy &#8220;Restart&#8221; and &#8220;Shutdown&#8221; items to the GRUB menu. This way, there isn&#8217;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).<\/p>\n<p>Edit file <em>&#8220;40_custom&#8221;<\/em>:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsudo vi \/etc\/grub.d\/40_custom\r\n<\/pre>\n<p>Add this to the end of the file:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nmenuentry &quot;Restart&quot; --class restart {\r\n    echo &quot;System rebooting...&quot;\r\n    reboot\r\n}\r\n\r\nmenuentry &quot;Shutdown&quot; --class shutdown {\r\n    echo &quot;System shutting down...&quot;\r\n    halt\r\n}\r\n<\/pre>\n<p>Do &#8220;sudo update-grub&#8221; as described above and restart the system to verify the items have been added. And try them.<\/p>\n<p>On Fedora, use this instead of \u201csudo update-grub\u201d:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsudo grub2-mkconfig -o \/boot\/efi\/EFI\/fedora\/grub.cfg\r\n<\/pre>\n<p>Or in later versions:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\r\nsudo grub2-mkconfig -o \/boot\/grub2\/grub.cfg\r\n<\/pre>\n<p><!-- ********************************************************** --><\/p>\n<p><!-- \nOne mitigation is to force Ubuntu 22.04 to stay on the LTS kernel (Linux version 5.15 series, for example, 5.15.0-67.74):\n--><\/p>\n<p><!-- \n\n\n<h2>AAAAA<\/h2>\n\n\nAAAAA\n--><\/p>\n<p><!--\n\n\n<h2>Changing the GRUB menu<\/h2>\n\n\n\n&lt;Setting the default menu item to the LTS kernel>\n--><\/p>\n<p><!--\n\n\n<h2>A better and more intuitive solution<\/h2>\n\n\n\n&lt;Using custom entries>\n\n&lt;Changing the default order>\n\n\n\n<hr\/>\n\n\n\n--><\/p>\n<p><!--\nNote: We have actually documented it:\n\nNear \"Was it broken in later versions of Ubuntu 22.04?\" in <a href=\"https:\/\/pmortensen.eu\/world2\/2022\/07\/20\/enabling-both-usb-3-and-usb-2-ports-for-a-ga-970a-ds3p-motherboard\/\">https:\/\/pmortensen.eu\/world2\/2022\/07\/20\/enabling-both-usb-3-and-usb-2-ports-for-a-ga-970a-ds3p-motherboard\/<\/a>\n\nDirect: <a href=\"https:\/\/pmortensen.eu\/world2\/2022\/07\/20\/enabling-both-usb-3-and-usb-2-ports-for-a-ga-970a-ds3p-motherboard\/#2023_broken_Ubuntu_22.04\">https:\/\/pmortensen.eu\/world2\/2022\/07\/20\/enabling-both-usb-3-and-usb-2-ports-for-a-ga-970a-ds3p-motherboard\/#2023_broken_Ubuntu_22.04<\/a>\n\nWhat kernel version? They <a href=\"https:\/\/www.youtube.com\/watch?v=CkyQhfhf048&t=2m36s\">recently forced-updated<\/a> (within the last few weeks or months) 22.04 to <a href=\"https:\/\/ubuntu.com\/kernel\/lifecycle\">HWE<\/a> (it broke <a href=\"https:\/\/pmortensen.eu\/world2\/2022\/07\/20\/enabling-both-usb-3-and-usb-2-ports-for-a-ga-970a-ds3p-motherboard\/\">a USB 2 workaround for a particular motherboard<\/a> I was relying on). Use `sudo apt install --install-recommends linux-generic` to install the latest LTS kernel and use (e.g.) GRUB_DEFAULT=\"1>4\" in file `\/etc\/default\/grub` to change the ***default*** GRUB menu item to the LTS kernel one\n--><\/p>\n<p><!-- End of blog post  --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/pmortensen.eu\/world2\/2023\/03\/27\/reverting-back-to-the-regular-lts-kernel-for-ubuntu-22-04\/\"> <span class=\"screen-reader-text\">Reverting back to the regular LTS kernel for Ubuntu 22.04<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39,23],"tags":[],"_links":{"self":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/3298"}],"collection":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/comments?post=3298"}],"version-history":[{"count":53,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/3298\/revisions"}],"predecessor-version":[{"id":6220,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/posts\/3298\/revisions\/6220"}],"wp:attachment":[{"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/media?parent=3298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/categories?post=3298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pmortensen.eu\/world2\/wp-json\/wp\/v2\/tags?post=3298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}