Curious to know the coolest things you achieved by configuring your kernel. I know kernel config can be boring, but I’m hoping someone will have an impressive answer.
For me I have a very lightweight kernel that runs wayland on nvidia without any issues to date.
A wee bit of knowledge and the wisdom to stop doing it.
Bragging rights.
Years ago (2006-ish), I ran Gentoo on a 300mhz ultra low power system I used for an irc & web server. I gained LOTS of speed and lowered power draw even further while also enabling the hardware acceleration the board had for ssl encryption and video encoding. The whole thing would pull <5 watts and be super stable. It was well worth it.
But now days a Pi zero would trounce it in both low power draw and speed with stock kernels and I don’t really care enough to try to squeeze more out.
Customising the kernel just means something works properly in rare hardware configurations like you described. It’s something which he who uses the general hardware (like an X86 desktop) can’t easily see or understand because the ‘stock’ kernel is already working properly.
Better lzma performance with xz. 🤪
Well, I can still boot my system without an initram (although that isn’t just due to the kernel config)—does that count?
Other than that, custom kernels free up a small amount of disk space that would otherwise be taken up by modules for driving things like CANbus, and taught me a whole lot about the existence of hardware and protocols that I will never use.
deleted by creator
Does that have any appreciable difference in day to day computing?
deleted by creator
I stopped doing it when Linux got support for kernel modules around Linux 1.2. It was a real game-changer.
I have configured custom Android kernel builds to enable more USB drivers, enable module support, and tweak various other things. For one tangible example of the result: I could plug in a USB Wi-Fi adapter and use it to simultaneously connect to another Wi-Fi network with the internal NIC while also sharing my own AP over USB. On an Android device of all things. I have also adjusted kernel builds for SBCs (like Pi clones) to get things working at all.
I have never seen any reason to configure a custom kernel for my own desktop/laptop systems. Default builds for the distros I’ve used have been fine for me; if I’m ever dissatisfied with anything it’s the version number rather than the defconfig. The RHEL/Rocky kernel omits a few features I want (like btrfs) but I’d rather stick to other distros on personal systems than tweak a distro that isn’t even meant for tweaking.
I haven’t custom compiled a kernel in ages - does anyone still do this?
It used to be sorta-kinda-necessary back when memory sizes were measured in MB instead of GB. Kernels had to be under a certain size, the module system was a bit slow, memory was at a premium, hardware support was very spotty, etc. I remember applying some guy’s patches to a 2.2 kernel to get full-duplex sound on the crappy sound card my Pentium 120 had (Linux has always had garbage audio support).
I think the last time I purposefully created a custom kernel was to enable some experimental scheduler code I hoped would give a performance boost. Was many years ago though.
These days you only do it if you want to learn the process or performance test a system. Or if you’re running something like Gentoo - but even then you likely just use the ‘default’ configuration provided by Gentoo.
I’m playing around with coreboot and that gives me ability to embed Linux kernel. The problem is we’re limited by the amount of ROM chip which is between 4MiB to 16MiB depending on the specific device. The one I’m working on got 12MiB, about 3 is taken in order to boot normally, leaving me with 9 to play around.
Enter buildroot, (arguably) a Linux distro that allows you to have kernel, busybox, minimum libc, along with whatever software you’d choose.
While it’s easy to include only what’s needed to have a working system (busybox provides working shell as well as the coreutils), you’d need to get rid of stuff you don’t need, such as drivers for hardware you wouldn’t have.
Aside from that, you’d end up with better running kernel in general if you know what you’re doing. I run Gentoo and have kept a working config that I tweak from time to time (especially on version upgrade).
I have multiple PCs. One is running a kernel that is mostly monolithic. That means it has only one module (a third party driver).
This made a lot if things more easy and faster, for example, it doesn’t need to load an initial RAM disk (initrd) at boot, because it already has all it needs built in and can just mount the root FS and start init. Also all crypto modules are already present when I need them.
The drawback is, I can’t unload a module and then load it with different parameters. If I had to change a module param, I would have to change it in the bootloader config and restart (or kexec)
The secureblue image I use disables numerous kernel modules, and enables many kernel mitigation argument.
The performance impact is minimal, hopefully that means a more secure system? I honestly don’t know, nor do I change the default recommended by the developer.
Not for myself but a client who was running a game server. He wanted to tweak the number of ticks/second that the kernel interacted with CPU. Didn’t even know that this was a parameter and after a few attempts, according to him, never went on that server myself, made a huge difference and he claimed having grabbed a good part of the market because of that.
After that familiarized myself more with the stuff in there. But that was a good while ago, before most of you guys were born.
The first time I configured the kernel was in Gentoo. The gain from the configuration it self may not have been much, but making my own initramfs image to bundle and load with the kernel taught me a bunch of how linux works in early boot.
A gentoo install once upon a time… and learning how to configure a kernel. Also a slightly better understanding of kernel module configuration for custom or odd ball hardware and a vague idea of what to look for in hardware support if I want to dig deeper.