Compile own kernel with patches


New Member
Feb 27, 2018

Is there any documentation how can I compile my own kernel and apply proxmox patches?
I was trying to use one from proxmox github but this only can be used for 4.15 not for the latest...

Best regards,


I would like to rebuild an Proxmox kernel with the reset patch for my Vega 64, so it can not be build as an DKMS.

that a common case to need to rebuild a proxmox kernel.

see post

I'm trying that:

apt-get install git debhelper build-essential dh-python dh-systemd sphinx-common lintian
apt-get install asciidoc-base bison flex libdw-dev libelf-dev libiberty-dev libnuma-dev libslang2-dev libssl-dev lz4 xmlto zlib1g-dev

cd /usr/src
git clone git://
cd pve-kernel
git branch -a
# choose a branch
git checkout pve-kernel-5.3
# try to place the patch in the correct place.
wget -O patches/kernel/0007-fix-vega-reset.patch
# will download related kernel sources.

I have now a lot of new deb file, but no patch looks to by applied.
Last edited:
Hi uriel,

How did you find that the patch didn't look applied? Did you install the kernel and test it? I'm curious.

In any case, I've modified your approach a bit and managed to fix the issue with the new kernel.
I can stop/start the windows VM all day long without any hacks. And I'm doing a single GPU passthrough, Vega 56 with Ryzen 3600, B450 Mortar - so no iGPU (I like to think this makes the whole thing more complicated :D )

Here's what I did :

cd /usr/src
# Download the patch here - or anywhere really
# You may want to clone the fix repo instead of this ugly wget
# Do the repo cloning, checkout
git clone git://
cd pve-kernel
git checkout pve-kernel-5.3
# Download the submodules code. This will download the kernel code under submodules/ubuntu-eoan
git submodule update --init --recursive
# Go to the kernel root folder and apply the patch
cd submodules/ubuntu-eoan
patch -p1 < /usr/src/fix-vega-reset.patch
# You can check the git diff to see that it has applied
git diff
# Now go back to the pve-kernel folder and make it
cd /usr/src/pve-kernel #or cd - or cd ../../
# It will generate a bunch of .deb but I've installed only the kernel and rebooted
dpkg -i pve-kernel-5.3.18-3-pve_5.3.18-3_amd64.deb

Btw, the reset-test thing didn't work even after patching. But my VM is behaving nicely, so that is what matters.


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!