Problem with kernelcompilation in Ubuntu 20.04

Hi guys !

I´ve come across an errormessage when trying to compile the linuxkernel, that I haven´t seen before and can´t find an answer to. It seems to somehow be tied to 20.04 specifically because I get it on other 20.04 installs, but not where I have earlier versions of *buntu running. The error shows in the last step when doing the actuall compoilation of the code, wich is:

make -j getconf _NPROCESSORS_ONLN deb-pkg LOCALVERSION=

I´ll post a screenshoot of the errormessage. The language is swedish but most of the text is in english.Where it says “Fel 2” is translated to english as “Error 2”.

I´m not asking to be served the answer on a silverplatter (unless you want to, ofcourse :slight_smile: ). But if you could point me in a direction where I can find the answer, I would most appreciative.

Are you not running the stock kernel? I am wondering what steps you took to get to this point. I haven’t compiled a custom kernel for some time and never on Ubuntu.

1 Like

The error itself is not present in your screenshot. Just the messages that there was an error somewhere.

We would need to see the error itself.
Maybe you can search for “error” in your terminal emulator, most should have such a function.

Do you apply any patches or is it a clean kernel source compile?

1 Like

Thnx a lot guys for taking the time to answer ! :heart_eyes: :+1:

But I found my problem. I turned out to me failing hardware that generated weird and inconsequential errors. I recently upgraded all components in my rigg and didn´t think of that as a sources of problems, initially.

As I posted in thread I´ve found the source of my problem.
But to answer your question I do it as follow:

  1. Download the .tar from and extract it.
  2. Copy the patchfiles to the kernel directory.
  3. And then do the compilationssteps as follow.

patch -p1 < “name of the patch.patch”

cp /boot/config-uname -r .config

yes ‘’ | make localmodconfig

make prepare

make xconfig

make -j$(nproc) deb-pkg LOCALVERSION= “if you want to add someting to the kernelversion to recognize it´s yours this is where to do it”

  1. When the compilation is done it automatically puts the *.deb files in a folderlevel above the sourcefiles. So I do:

cd …

and then

sudo dpkg -i *.deb

And then reboot.

BOOM…profit ! :slight_smile:


That’s fantastic! Thank you for sharing with the “class!”