UPDATE : Linux kernel 5.11 includes the patch so the problem has been resolved. It seems that the problem will be resolved for Ubuntu 21.04 too which will be shipped with kernel 5.11 at least.
UPDATE 2 : It seems that Ubuntu 21.04 froze with kernel 5.10, if this is the case and the patch is not included then there are 2 choices,
you upgrade from your current installation, reboot with one of your patched kernels and follow the patching procedure for the new kernels
you boot from the 21.04 .iso
image and in the boot menu you select "(Safe graphics)" to avoid loading the i915
driver, after the installation you first log in the terminal and you either manually install a patched kernel or recompile the patched i915
module for the new kernel and then reboot with the patched kernel so as to be able to use Gnome or any other graphical environment that crashes with the unpatched kernels.
Both choices can be also deployed with Ubuntu 20.10 .
UPDATE 3 : Though the patched Ubuntu distribution kernels seem to be stable with Gnome, the 5.11 kernels cause glitches in Gnome and even crash it from time to time. The problem seems to arise from the Mutter compositor both on X and Wayland, other graphic environments with different compositors seem to be stable.
The solution for kernels before 5.11 is here Red Hat Bugzilla – Bug 1843274
The GUI system can become usable if you boot with your old kernel 5.4.0 .
The terminal is still usable with 5.8.0 kernel, try CTRL+ALT+F3
.
The solution is to patch the i915
module. Download the patch from here
To understand the patch have a look at Intel's Manual page 50, it has to do with the command MEDIA_VFE_STATE
which has to be provided with the right number of threads according to the model of the GPU.
First method: Patch and recompile a new kernel
Quick guide
- The basic dependencies to build the kernel are
sudo apt install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
- Download the kernel source of your choice from www.kernel.org and extract it.
- Go inside the kernel source directory.
- Clean the kernel with
sudo make mrproper
in the kernel's directory.
- Download the patch into the kernel's source code parent directory.
- Apply the patch with
patch -p1 < ../drm-i915-gt-Limit-VFE-threads-based-on-GT.patch
- Configure the kernel or run
sudo make localmodconfig
to finish quickly, hold the Enter key until all the questions are answered
- Compile the kernel with
sudo make -j (# of CPU threads) bindeb-pkg
- Install the
linux-image
and the linux-headers
deb packages produced in the parent directory of the kernel source directory
- Reboot and if necessary choose the new kernel from the GRUB menu
Optimize the above procedure according to your preferences, your hardware etc
Second method: Patch and recompile the module only
It is also possible to rebuild the patched module for an already installed kernel so as to be able to use the official distribution kernels or any other precompiled kernels.
The official i915 compilation guide from Intel is here, if you download it as a PDF go to page 41.
You can follow the steps exactly as they are presented but notice the following.
If you are going to recompile the module for another kernel version than the one you are running then you have to replace $(uname -r)
with the version you are targeting, for example 5.8.0-29-generic
.
If you use the /tmp/kernel
directory as in the guide then this directory will be lost after a reboot.
After step 5 you have to patch the kernel with patch -p1 < ../drm-i915-gt-Limit-VFE-threads-based-on-GT.patch
assuming the patch is located into the kernel's source code parent directory
Step 9 can be skipped.
After step 12 you may get an error concerning the cryptographic verification of the module, there is no problem, the module has been installed in /lib/modules/5.8.0-29-generic/extradrivers
and the system knows that it is there and should be loaded through step 13.
Step 14 should be performed stating the target kernel version, for 5.8.0-29-generic
alter the commands like this sudo depmod -v 5.8.0-29-generic
and sudo update-initramfs -k 5.8.0-29-generic -u
.
After a reboot your system will be usable again.
This procedure should be performed for any new kernel until the problem is solved by Ubuntu.
ls -al ~/.local/share/gnome-shell/extensions
andls -al /usr/share/gnome-shell/extensions
andfree -h
andsysctl vm.swappiness
. – heynnema Oct 30 '20 at 20:14ls -al /var/crash
. Do you have any startup applications enabled? Are you running with Wayland, or just stock Ubuntu? – heynnema Oct 31 '20 at 15:41