2

I've been using the most recent ubuntu 5.16 kernel-ppa packages from mainline because I need temperature monitoring for AMD 5700g cpu and B550I motherboard. I need low-latency because I'm a musician using the system for recording. I'd like to keep tracking the latest versions until 5.16 or later makes it into a release in order to pick up security and amdgpu updates and such.

The latest mainline builds don't seem to include the lowlatency amd64 deb packages any more. Will they be back? If not, where is a tutorial on how I can build my own from mainline? (Currently I'm using ubuntu studio 21.10)

Doug Smythies
  • 16,146
Lee
  • 23

1 Answers1

5

Moderators: This is a little off-topic here, but I think it might be useful to some readers.

The lowlatency flavours of the mainline kernels will no longer be compiled and published on the Ubuntu Mainline PPA. The kernel configuration differences are minor so users that do their own kernel compiles could simply modify the configuration.

Going back a few RCs (Release Candidates) in the current kernel 5.17 series to where both generic and low latency were still published:

doug@s19:~/kernel/linux$ scripts/diffconfig .config-5.17.0-051700rc3-generic .config-5.17.0-051700rc3-lowlatency
 COMEDI_TESTS_EXAMPLE m -> n
 COMEDI_TESTS_NI_ROUTES m -> n
 HZ 250 -> 1000
 HZ_1000 n -> y
 HZ_250 y -> n
 LATENCYTOP n -> y
 PREEMPT n -> y
 PREEMPT_VOLUNTARY y -> n
 TEST_DIV64 n -> m

Combining those changes with the other standard changes gives the following script (EDIT adding since original post updates):

doug@s19:~/kernel/linux$ cat mod-config
#! /bin/bash
#
# mod-config 2022.05.08 Smythies
#       Use the newer DEBUG_INFO_NONE, and enable it.
#       (which actually means disable debug stuff.)
#
# mod-config 2022.05.01 Smythies
#       add disable DEBUG_INFO_DWARF5
#
# mod-config 2022.04.04 Smythies
#       Getting the:
#       BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
#       compile error again.
#       and if one disables CONFIG_DEBUG_INFO_BTF
#       then the huge debug kernel is generated.
#       I don't want to install the DWARVES package.
#       Specifically disable this stuff, so it
#       does not override desired no debug kernel.
#
# mod-config 2022.03.22 Smythies
#       The standard changes to the Ubuntu Mainline
#       kernel configuration have become numerous.
#       Automate.
#       The script is located in the base directory of
#       the mainline git clone.

#scripts/config --disable DEBUG_INFO_DWARF4 scripts/config --disable DEBUG_INFO_DWARF5

#scripts/config --disable DEBUG_INFO scripts/config --enable DEBUG_INFO_NONE

scripts/config --disable SYSTEM_TRUSTED_KEYS scripts/config --disable SYSTEM_REVOCATION_KEYS

convert generic config to lowlatency

scripts/config --disable COMEDI_TESTS_EXAMPLE scripts/config --disable COMEDI_TESTS_NI_ROUTES scripts/config --set-val CONFIG_HZ 1000 scripts/config --enable HZ_1000 scripts/config --disable HZ_250

scripts/config --enable LATENCYTOP scripts/config --enable PREEMPT scripts/config --disable PREEMPT_VOLUNTARY scripts/config --set-val TEST_DIV64 m

To test I used the generic config, ran the script on it, then compiled (which will make a couple of further tweaks to the .config file) and compared to my previously saved low latency kernel configuration:

doug@s19:~/kernel/linux$ scripts/diffconfig .config-5.17-rc3 .config
doug@s19:~/kernel/linux$

i.e. no differences.

References: IRC discussion: First day, Second day; One method on how to compile mainline kernels

Doug Smythies
  • 16,146