Get a 5.12 Linux kernel with support for newer Intel hardware (e.g., Intel Iris Xe for Thinkpad X1 Titanium Yoga) on Ubuntu/Debian/Pop!_OS
I recently got a Thinkpad sporting an Intel® Core™ i5-1140G7 Processor 11. gen (1,80 GHz, Turbo Boost, 4 Cores, 8 Threads, 8 MB Cache with an Integrated Intel® Iris® Xe. Sadly graphics drivers did not work out-of-the-box and also not with the latets 5.12 kernel from xenmod. You can tell it's not working when graphics are slow, backlight adjustment buttons don't work and this is the output of inxi -G
(you might need to sudo apt install inxi
):
simon@pop-os:~$ inxi -G
Graphics:
Device-1: Intel driver: N/A
Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
Display: x11 server: X.Org 1.20.9 driver: fbdev unloaded: modesetting,vesa
resolution: 2256x1504~95Hz
OpenGL: renderer: llvmpipe (LLVM 11.0.0 256 bits) v: 4.5 Mesa 21.0.0
Seems the hardware is too new and support will only come around in future kernel updates. I found a friendly frugalware developer(?) on the Lenovo support forum who did the work of collecting and backporting kernel patchs efrom 5.13 to the 5.12 kernel. It's been ~15 years since I compiled my last kernel, but I managed to apply the patches and compile a kernal that runs on my Ubuntu/Pop!_OS worked. This guide should work for all systems for which the xanmod kernel works. If you're in the same shoes hardware-wise, here's what I did:
I basically rebuild a patched version of the 5.12 kernel by xanmod. There may be an easier way, whereby you only rebuild the i915
-module. I have no clue. That's for others to figure out. Let me know if you find a simpler way.
Active work: 4 minutes
Watching the kernel compile: some hours (go get some fresh air)
You might need to install a few things if you haven't already (see https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel):
sudo apt install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf build-dep git zstd
I have good experiences with the xanmod kernel, so I use that as base kernel source and config for 5.12 to start from. Follow these steps (You might have to add a few sudo
s):
- Go to whatever folder you want to work in. I did
cd /usr/src
- Download the xanmod kernel source:
git clone https://github.com/xanmod/linux.git
andcd
into that folder - Download the i915-patch
wget https://crazy.dev.frugalware.org/Intel-i915-backport-MSO-fixes-to-kernel-5.12.patch
- Apply the patch
patch -p1 < Intel-i915-backport-MSO-fixes-to-kernel-5.12.patch
- Build the kernel
make
(takes > 2hrs) - Go grab a coffee
- Install modules
sudo make modules_install
- Install kernel
sudo make install
- Reboot into your new kernel
In spite of everything running well now. I see this as a temporary fix and will switch to the Ubuntu version of 5.13 as soon as it comes out.
I have no clue what I am doing, I am just hacking together pieces of code and commands I found online. If you follow my and fry you computer that's on you!
Maybe it would have been easier to use
i915.force_probe=Last 4 characters of your iGPU device id
in your kernel startup line :)So for me its
i915.force_probe=4c8a
Still temporary, but worked for me and others. I am also on PopOS 20.10 with an 11600k and I honestly dont understand how this isnt implemented in the default kernel yet.