1

I have good experience running non-distro-default Linux kernels on LTS distributions. Better power usage, hardware support and virtualization feautures are part of that.

I use the Ubuntu Kernel MainlineBuilds to get some .deb's and install them.

Now I would like to use tools in linux-tools-generic. However, none of the available packages matches my kernel.

How can I acquire the linux-tools-generic for a non-standard kernel?

$ perf                                                                   
WARNING: perf not found for kernel 5.9.6-050906

  You may need to install the following packages for this specific kernel:
    linux-tools-5.9.6-050906-generic
    linux-cloud-tools-5.9.6-050906-generic

  You may also want to install one of the following packages to keep up to date:
    linux-tools-generic
    linux-cloud-tools-generic
$ sudo apt-get install linux-tools-5.9.6-050906-generic                     Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-tools-5.9.6-050906-generic
E: Couldn't find any package by glob 'linux-tools-5.9.6-050906-generic'
E: Couldn't find any package by regex 'linux-tools-5.9.6-050906-generic'
1
  • Generally Ubuntu is not the right distro choice for using mainline kernels ;-) – Pilot6 Nov 15 '20 at 16:50
1

If you are using non-standard kernels, you should get the linux-tools from the same place you got the kernel image.

Obviously Ubuntu repositories don't have linux-tools for non-standard kernels.

I don't see linux-tools debs at https://kernel.ubuntu.com/~kernel-ppa/mainline/ so you'll need to build them yourself.

1

Yes, Ubuntu does extreme dependency stuff within the kernel related tools chains, which can be annoying for users of mainline kernels.

The example tool for me is turbostat, which has been guaranteed by the upstream maintainer to always be backwards compatible. It is also the preferred tool for upstream escalations supporting data. The Ubuntu version is wrapped in an unnecessary dependency checking script. The way around the issue, and as @Pilot6 mentioned, is to compile it from the mainline source at tools/power/x86/turbostat/ with a make. Now make install could also be used to clobber the Ubuntu version, but I don't recommend that. Just run it from there, tools/power/x86/turbostat/, or copy the binary to somewhere more convenient.

References: bug report - please to not over-constrain turbostat.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.