How to upgrade Elementary OS to the newest kernel.
Install necessary packages
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
To check hardware
sudo lspci
To check missing firmware
sudo update-initramfs -u
Make directories for firmware and kernel
mkdir /home/username/Downloads/amdgpu
mkdir /home/username/Downloads/kernel
To get rid of missing firmware errors for amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/vega20_ta.bin for module amdgpu ####
Download amdgpu
cd /home/username/Downloads/amdgpu
wget https://github.com/M-Bab/linux-kernel-amdgpu-binaries/files/4124959/firmware-radeon-ucode-rock_2.110_all.deb.zip
unzip firmware-radeon-ucode-rock_2.110_all.deb.zip
sudo dpkg -i firmware-radeon-ucode-rock_2.110_all.deb
Source: https://github.com/M-Bab/linux-kernel-amdgpu-binaries/issues/82
Download kernel 5.7.0
cd /home/username/Downloads/kernel
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.7.tar.xz
tar -xf linux-5.7.tar.xz
cd linux-5.7
cp -v /boot/config-$(uname -r) .config
make menuconfig
save config and then exit -> See source: https://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
Then you have to chosee between make -j 4 or make -j - explanation below
use 4 core/thread - if your processor have 4 cores
make -j 4
use 8 core/thread - if your processor have 8 cores
make -j 8
Install modules
sudo make modules_install
compile the kernel
sudo make install
Update init ram and filesystem
sudo update-initramfs -c -k 5.7.0
ignore these errors below, just because those three bin files are not made yet
W: Possible missing firmware /lib/firmware/amdgpu/navi12_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi12_dmcu.bin for module amdgpu
Update grub
sudo update-grub
Restart computer
sudo reboot
Check the kernel version
uname -mrs
To check missing firmware after compilation of new kernel
sudo update-initramfs -u
to check errors after reboot:
sudo journalctl -b
sudo dmesg