32

I've been happily installing 5.10 mainline kernels (from https://kernel.ubuntu.com/~kernel-ppa/mainline/) on my Ubuntu 20.04.

Trying to update to 5.10.33, I discovered an unwelcome dependency on libc >=2.33 (focal is at 2.31) for the -headers package (though not the image itself -- but who wants to live without the headers).

AFAIK, libc6 is next to impossible to upgrade. Is this... it? Am I stuck at 5.10.32 unless I give up LTS? Do these folks even have a public-facing site where one can report bugs?

Update: This seems to be the main launchpad bug. A good thing that came out of it: tuxinvader has come up with a Docker container (source on Github: focal-mainline-builder) for building kernel mainline images and uploaded 5.10 - 5.12 packages to his PPAs:

Tip: To see all available linux packages for your chosen series / version range, after messing with PPAs and maybe Debian backports, xanmod etc (as I have) do something like

apt update
printf '%s\0' linux-{image-unsigned,headers,modules}-5.10.{32..40} |
  xargs -0 -n 1 apt-cache pkgnames | LC_ALL=C sort | less

Hopefully this problem will go away. But let's face it, depending on the whims of the "kernel mainline PPA" (or whoever is behind it, I still don't understand how these developers can be reached) for binaries has not been a pleasant experience.

usretc
  • 453
  • The next HWE kernel with focal will be 5.11 (20.04.3) which is what I would have opted to stick to (ie. HWE proposed kernels) but I haven't monitored how closely that is to being ready (it's still a bit far off to worry about QA-testing it yet; as it's been stable on hirsute for some time which is where all recent focus has been) – guiverc Apr 28 '21 at 22:43
  • 2
    Oh gosh. That is a huge problem for me. I had not yet got around to installing mainline kernel 5.12 on my main 20.04 test server, and yes get the issue you mention. kernel 5.12-rc6 was fine. Darn. – Doug Smythies Apr 28 '21 at 23:40
  • I'm using the mainline kernel 5.11.16 with ubuntu 20.04. But from the kernel 5.11.17 it required libc >= 2.33. Hopefully they will revert this change. – Minh Nguyen Apr 29 '21 at 09:54
  • Hopefully, it seems completely gratuitous. I've tried 5.11.17 too. – usretc Apr 29 '21 at 10:01
  • 7
    I just opened a bug on Mainline here: https://bugs.launchpad.net/umkl/+bug/1927024 – khester May 04 '21 at 00:51
  • 2
    FYI: I've added PPAs for 5.10.x and 5.11.x. https://launchpad.net/~tuxinvader/+archive/ubuntu/lts-mainline-longterm and https://launchpad.net/~tuxinvader/+archive/ubuntu/lts-mainline-previous – TuxInvader May 15 '21 at 10:09
  • PPAs included in answer – usretc May 19 '21 at 12:25
  • @TuxInvader unfortunately your packages linux-headers* do not contain Makefile required for dkms – sercxjo May 24 '21 at 19:10
  • @sercxjo, perhaps open an issue on the project page? https://github.com/TuxInvader/focal-mainline-builder/issues – usretc May 26 '21 at 03:23
  • 2
    @sercxjo - The linux-headers issue is fixed. Someone opened an issue on github yesterday (as suggested by @usretc). DKMS should work fine now. I've also added a metapackage which will make it easier to get updates and avoid needing to install each point release manually. – TuxInvader May 28 '21 at 14:37
  • @TuxInvader Thanks for the fix and for the metapackage! – sercxjo May 28 '21 at 21:55
  • @tuxinvader I ran into similar issue on Ubuntu MATE 21.04 while trying to install kernel 5.14.3. Any way out of this error? dpkg: dependency problems prevent configuration of linux-headers-5.14.3-051403-generic: linux-headers-5.14.3-051403-generic depends on libc6 (>= 2.34); however: Version of libc6:amd64 on system is 2.33-0ubuntu5. Thank you. – Jags Sep 13 '21 at 12:26

4 Answers4

8

You can stay with LTS, but you will need to compile the mainline kernels yourself to overcome the new dependency issue.

The mainline compiler version used seems to have just changed:

doug@s19:~/temp-k-git/linux$ scripts/diffconfig .config-5.12.0-051200rc6-lowlatency .config-5.12.0-051200-lowlatency
 CC_VERSION_TEXT "gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0" -> "gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0"
 GCC_VERSION 100200 -> 100300
 LD_VERSION 23501 -> 23601
+DEBUG_INFO_BTF_MODULES y
+PAHOLE_HAS_SPLIT_BTF y

But if I just take the Ubuntu kernel configuration and compile myself, on my main 20.04 test server, it installs fine. I.E. the dependency is a function of the compiler version used not the kernel source code.

Not really relevant but here is the config difference for what I compiled:

doug@s19:~/temp-k-git/linux$ scripts/diffconfig .config-5.12.0-051200-lowlatency .config
-DEBUG_INFO_BTF y
-DEBUG_INFO_BTF_MODULES y
-DEBUG_INFO_COMPRESSED n
-DEBUG_INFO_DWARF4 y
-DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT n
-DEBUG_INFO_REDUCED n
-DEBUG_INFO_SPLIT n
-GDB_SCRIPTS y
-PAHOLE_HAS_SPLIT_BTF y
 CC_VERSION_TEXT "gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0" -> "gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
 DEBUG_INFO y -> n
 GCC_VERSION 100300 -> 90300
 LD_VERSION 23601 -> 23400
 SYSTEM_TRUSTED_KEYS "debian/canonical-certs.pem" -> ""
Doug Smythies
  • 15,448
  • 5
  • 44
  • 61
  • 2
    It's also possible that the gcc change was inadvertent and they might revert it, I think I've seen that happen in the past – usretc Apr 29 '21 at 01:25
  • Doug, good find, there's so much outdated howto advice for Ubuntu out there that I essentially gave up a while ago. It might also be possible to backport to a PPA, though I remember with kernel packages it's not that easy – usretc Apr 29 '21 at 01:27
  • 1
    Given that for many bugs on Launchpad there is a request to "try the latest mainline kernel" it seem likely that it will be made to work, either by compiler reversion or libc update. – Doug Smythies Apr 29 '21 at 13:25
7

I was able to install 5.12 on Ubuntu 20.04 with libc6 2.31 using the mentioned ppa:

sudo add-apt-repository ppa:tuxinvader/lts-mainline

sudo apt install linux-image-unsigned-5.12.4-051204-generic linux-modules-5.12.4-051204-generic linux-headers-5.12.4-051204-generic

estibordo
  • 1,294
6

Here is how i made dkms modules generated with kernel 5.11.18 from ubuntu mainline-kernel. I run Linux Mint 20.1 Cinnamon and use nvidia-driver-460 version 460.73.01-0ubuntu0.20.04.1 in dkms. The gcc I use is version 10.3. Everything worked fine with ver 5.11.16-generic but stopped when i tried 5.11.18. So I tried to find the problem why dkms did not compiled the kernel modules. This is what I did:

  1. Installed kernel 5.11.18-generic
  2. Found that in kernel headers program fixdep relates to glibc 2.33
  3. Found that in kernel headers program modpost relates to glibc 2.33
  4. Replaced /lib/modules/5.11.18-generic/build/scripts/basic/fixdep with the one in 5.11.16
  5. Replaced /lib/modules/5.11.18-generic/build/scripts/mod/modpost with the one in 5.11.16
  6. Ran dkms against kernel 5.11.18 (/usr/lib/dkms/dkms_autoinstaller start 5.11.18-051118-generic)
  7. Successfully generated nvidia kernel modules. Rebooted and it works ok. Even tried the same with kernel 5.12.1 and it worked.

Hope this helps.

Sten K
  • 69
0

Another easy option to stay with 5.10, without compiling, seems to be to use a custom kernel. Like xanmod. The thing is, they don't seem to put much effort into "performance" improvements for the older LTS series, so I think one might be getting a pretty standard kernel. For example this is the log for xanmod 5.10.35.

usretc
  • 453