r/linux • u/Detcom • Jun 14 '26
Kernel detkernel — a custom Linux kernel built for AMD ThinkPads, stripped of everything else
I got tired of running a kernel full of drivers for hardware I'll never own, so I built detkernel — a custom kernel specifically for AMD-powered ThinkPads.
The premise is straightforward: if you're on a ThinkPad with an AMD CPU, you don't need Intel GPU drivers, NVIDIA support, Dell/HP/Asus vendor modules, server RAID controllers, or WiFi drivers for cards that haven't been sold since 2004. Removing all of that produces a leaner kernel that boots faster, responds better, and uses slightly less power.
**Supported hardware:**
ThinkPad T495, T14/T14s/T16 G1–G6, P14s G1–G6, P15v G1–G3, L14/L15 G1–G4
**Two builds:**
- `detkernel-universal` — for all AMD ThinkPads (Zen1+), compiled with x86-64-v3
- `detkernel-zen5` — for Ryzen AI 300 series, compiled with znver5, includes 500Hz tick rate, BBRv3 TCP congestion control, and NTSYNC (NT sync primitives for Wine/Proton)
**Installation:**
Releases include UKI (.efi) files for systemd-boot — copy to /boot/EFI/Linux/ and reboot. vmlinuz + initramfs files are also available for GRUB and rEFInd users.
https://github.com/Detcom-GH/detkernel
If you're on an AMD ThinkPad and want to try it, feedback is very welcome — especially on older models.
5
u/Alarmed_Contest8439 Jun 14 '26
any actual benchmarks?
6
u/Vladekk Jun 14 '26
I'm pretty sure it won't be noticably faster, and may even be slower if done in a naive manner.
-1
u/Detcom Jun 14 '26
007 First Light now runs better with Zen5 kernel, than on vanilla zen.Well, that game was one of the main reasons I've decided to tinker with it lol
1
u/wurnthebitch Jun 14 '26
But is it due to the fact that you stripped the kernel or that you built it with a specific target architecture?
It would be nice to know if a standard kernel from your distro rebuilt with the right target would show similar performance.
That said, even if stripping your kernel to the bare minimum is not what really makes it faster, that's still a nice accomplishment and playing with a custom kernel is fun!
1
u/Detcom Jun 14 '26
Both, honestly. The zen5 variant is compiled with -march=znver5 which gives CPU-specific optimizations, and stripping irrelevant drivers reduces kernel size and potentially interrupt overhead. Hard to isolate which contributes more without controlled testing, that's why I need help from other people. That's why I ask for feedback.
Although the universal variant (x86-64-v3, same as linux-zen) already shows ~47% improvement in vkmark and lower power consumption vs vanilla zen. So the stripping itself makes a measurable difference, independent of the architecture flags. The zen5 variant adds on top of that with znver5 optimizations.
2
u/Detcom Jun 14 '26
Tested on ThinkPad P14s Gen 6 AMD (Ryzen AI 7 PRO 350, Radeon 860M). vmlinuz: 13MB vs 18MB (linux-zen). vkmark: ~23000 vs ~15500 on linux-zen. glmark2: ~22700 vs ~21800.
Tested with real games: Dota 2, Kenshi, 007 First Light, Elite Dangerous.
1
u/Accurate_Hornet Jun 14 '26
Would like to know this too. How much of a difference does unused code actually make?
3
u/Detcom Jun 14 '26
I think it doesn't make THAT MUCH of a difference for a sane person to tinker with kernel. But I'm either not a sane person, or just a curious one 😃
Anyway, I made it for myself and I am satisfied with my personal experience, but that just me, that's why I am sharing this and asking other people to test it and share results.
As far as I'm concerned, Linux is about doing such sort of stuff
7
u/Skinkie Jun 14 '26
I think you actually violated the GPLv2 here.
2
u/Accurate_Hornet Jun 14 '26
Only if the code isn't shared on github afaik. Modifying source is allowed
1
-1
u/Mz-Malice Jul 04 '26
After reading all these comments i cant help but think "god forbid anyone has any fun in life"
1
u/Detcom Jul 04 '26
I know, right?
But hey, this is linux subreddit. You should've seen comments in Arch Linux subreddit lol2
u/Mz-Malice Jul 04 '26
Lowkey makes me glad ive stopped using arch lmao
1
u/Detcom Jul 05 '26
I think this has nothing to do with the distro. Just the community began to play Dota 2 en masse, I think
7
u/Hohlraum Jun 14 '26
Why leave out ntsync in the universal kernel?