But first:
If you patch and build your own kernel and do not exactly know what you are doing, you are on your own. If you DO know what you are doing, you are STILL on your own, but with a better chance to get things right.
Caveat emptor.
My procedure:
1.
If you are using an NVIDIA driver, start up "Driver Manager" from the menu and switch to the nouveau driver. Then reboot.
2.
Get the source code for the kernel you want to patch/use and extract it in a separate directory (a subfolder of your home directory would be fine, for instance /home/new_kernel/linux-5/19/10). Let's call this directory the Linux folder.
3.
Use "Mainline" (install with apt if necessary) to install a kernel with at least the same main version number as that of the downloaded source code (for instance if you downloaded the source for kernel 5.19.11 some kernel in the 5.19 range). DO NOT REBOOT.
4.
Copy the /boot/config-[version number] of the with "Mainline" installed kernel into the Linux folder.
5.
Use "Mainline" to remove the just installed kernel.
6.
Copy the files /usr/local/src/debian/canonical-certs.pem and /usr/local/src/debian/canonical-revoked-certs.pem into the Linux folder subdirectory /debian.
7.
Patch your new kernel.
8.
Open a terminal in the Linux folder and run:
Code: Select all
make olddefconfig
make -j(nproc)
sudo make INSTALL_MOD_STRIP=1 modules_install
sudo make install
Reboot into the new kernel.
10.
If all works as expected, celebrate!