this post was submitted on 30 Mar 2024
94 points (100.0% liked)

Linux

1259 readers
63 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 38 comments
sorted by: hot top controversial new old
[–] ExtremeDullard@lemmy.sdf.org 99 points 7 months ago (2 children)

As a Linux user of almost 30 years, compiling hundreds of kernels over the years has given me a great appreciation of pre-build kernels, and a profound gratitude for those who package them up into convenient distros that work out of the box and let me get on with the rest of my life.

[–] limelight79@lemm.ee 16 points 7 months ago

Well said. I originally compiled my own kernels because I thought it was something you just did to use Linux. I also compiled hundreds of them, probably. Now it's stock kernel all the way. Not worth the effort and time and headache.

[–] umbrella@lemmy.ml 7 points 7 months ago (1 children)

i think the learning experience is valid

[–] ExtremeDullard@lemmy.sdf.org 6 points 7 months ago

Absolutely! If you're doing it to learn something, by all means compile your own kernel. Every Linux user should do that at least once in my opinion. But once the learning is done, the novelty wears off fast and it just becomes tedious.

[–] acockworkorange@mander.xyz 54 points 7 months ago

A wee bit of knowledge and the wisdom to stop doing it.

[–] ChojinDSL@discuss.tchncs.de 34 points 7 months ago (1 children)

Back when I was still using Gentoo, configuring your own kernel was a rite of passage. It was kind of fun to try and configure it as minimalist as possible to cut down on the kernel compile time. Also, understanding all the different options and possibilities. And thanks to use flags, you had access to all these different patch sets for the kernel, which took a lot of the pain out of trying things like experimental schedulers or filesystems.

[–] andrewd18@midwest.social 2 points 7 months ago (1 children)

Everybody gangsta until they set their block and filesystem drivers to module.

[–] rotopenguin@infosec.pub 2 points 7 months ago

"Oh, did I need to rebuild the initrd too? Shhheeeeit, can I do that in a chroot from a livedisk or something?"

[–] brejela@lemm.ee 29 points 7 months ago

Bragging rights.

[–] 7heo@lemmy.ml 18 points 7 months ago

Better lzma performance with xz. 🤪

[–] thejml@lemm.ee 16 points 7 months ago (1 children)

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.

[–] racketlauncher831@lemmy.ml 4 points 7 months ago

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.

[–] souperk@reddthat.com 15 points 7 months ago
[–] xycu@programming.dev 13 points 7 months ago* (last edited 7 months ago)

I do it because I can... I read release notes on every update and once you've configured a kernel for a particular machine you really don't need to touch the config, barring major changes like when PATA and SATA merged. Or of course if I'm adding a new piece of hardware.

I remove everything I don't need and compiling the kernel only takes a couple minutes. I use Gentoo and approach everything on my system the same way - remove the things I don't need to make it as minimal as possible.

Compiling your own kernel also makes it easier when you need to do a git bisect to determine when a bug was introduced to report it or try to fix it. I've also included kernel patches in my build years ago, but haven't needed to do that in a long time.

I used to compile a custom kernel for my phone to enable modules/drivers that weren't included by default by the maintainer.

It's not about performance for me, it's about control.

[–] Rikj000@discuss.tchncs.de 13 points 7 months ago* (last edited 7 months ago) (2 children)

I run linux-xanmod-anbox for root support in Waydroid (Android on Linux).

And I configured my kernel to support VFIO (Virtual Function Input Output).
So I can fully pass through one of my GPUs to my Ameliorated Windows KVM,
which I use for both work and gaming.

[–] taaz@biglemmowski.win 9 points 7 months ago (1 children)
[–] Rikj000@discuss.tchncs.de 15 points 7 months ago

Amazing, basically native speeds,
currently playing Horizon Forbidden West with maxed out graphics and DRS disabled at a steady 60-80 FPS.

Previously I also played Horizon Zero Dawn in it, also maxed out graphics, steady locked 100 FPS,
below is a benchmark comparison of HZD in the Linux host OS and the Windows KVM guest OS:
workstation-gaming-linux-vs-windows

[–] Pantherina@feddit.de 1 points 7 months ago (1 children)

Root Waydroid lol, thats basically hell.

Waydroid without SELinux already removes all the Android sandboxing. Now its rooted!

[–] Rikj000@discuss.tchncs.de 1 points 7 months ago (1 children)

Root on Android is a necessity for me.
I've been rooting all droids I use for the past 10 years or so.

Imagine using Linux as a power user,
without being able to use sudo/su.

Also, Magisk does not just allow any application to access root, you have to manually allow apps to make use of it.

Just like administrator rights on any other OS,
things only go wrong if you don't know what you're doing, and then grant rights to something malicious.

[–] Pantherina@feddit.de 2 points 7 months ago

Yes but Waydroid is not an Android phone. Have a look at this

https://github.com/waydroid/waydroid/issues/1136#issuecomment-2016948867

[–] galoisghost@aussie.zone 11 points 7 months ago

Mostly just understanding what was there, what was necessary for my machine at the time and what was optional.

[–] zarenki@lemmy.ml 7 points 7 months ago

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.

[–] Pantherina@feddit.de 5 points 7 months ago

Just download the devel kernel from your distro and go into make menuconfig. I am on an Intel Laptop with recent hardware. No reason to use amd, nvidia etc drivers. And there is a shitload of likely unmaintained drivers for ancient hardware.

[–] delirious_owl@discuss.online 3 points 7 months ago (1 children)

Knowledge and time forced to not be on the computer

[–] Cwilliams 1 points 7 months ago (1 children)

Wow, I never thought of that as a good thing until now. I bet Gentoo users are more well-rounded than Arch users

[–] delirious_owl@discuss.online 4 points 7 months ago (1 children)

Well, lots of time to practice sword fighting in office chairs

[–] Cwilliams 5 points 7 months ago

Or to scroll through XKCD, apparently :P

[–] 30p87@feddit.de 3 points 7 months ago

I just installed LFS once, which inevitably came with compiling the kernel. Many times, over and over, every time with other configs as some packages required them. For a dual core Dell Laptop from the 2010 it was surprisingly fast, actually. Still not enjoyable or feasible for my normal systems.

[–] dan@upvote.au 2 points 7 months ago

I used to manually compile with the Linux-VServer patches, before Debian started shipping a pre-patched kernel.

Linux-VServer was kinda like LXC or OpenVZ. I was using it around 2008 or so as LXC wasn't quite ready for use in production yet (was still far from finished) and OpenVZ didn't support Debian hosts.

[–] ctr1@fl0w.cc 2 points 7 months ago* (last edited 7 months ago)

I suppose the most tangible benefit I get out of it is embedding a custom initramfs into the kernel and using it as an EFI stub. And I usually disable module loading and compile in everything I need, which feels cleaner. Also I make sure to tune the settings for my CPU and GPU, enable various virtualization options, and force SELinux to always remain active, among other things.

[–] 0x0@programming.dev 1 points 7 months ago (1 children)

A kernel that fits my hardware and supports things the original kernel doesn't. Then again, i use gentoo.

[–] cyclohexane@lemmy.ml 1 points 7 months ago (1 children)

What did the original kernel not support?

[–] 0x0@programming.dev 1 points 7 months ago

Having / on ZFS, but that went into an initrd i think... don't remember, but not hardware related.

[–] chevy9294@monero.town 1 points 7 months ago (1 children)

I'm running a custom kernel on my Arch laptop. It's a little faster, a little smaller and a little quite more secure. I'm also running custom kernel which enables adiantum encryption on old phone with postmarketOS.

[–] cyberpunk007@lemmy.ca 2 points 7 months ago (1 children)

How did you conduct this speed test? Where are the results? 😂

Sorry, I think this any time someone says their computer is faster or mod X on Android is "snappier"

[–] chevy9294@monero.town 2 points 7 months ago

I used geekbench 5. My CPU is AMD Ryzen 5 5500U. I tested a few prebuild kernels and custom compiled the fastest one.

prebuild linux kernel:

  • singlethread: 1170
  • multithread score: 4604

prebuild linux-zen kernel:

  • singlethread: 1156
  • multithread score: 4593

prebuild linux-xanmod kernel:

  • singlethread: 1164
  • multithread score: 4594

prebuild linux-hardened kernel:

  • singlethread: 1156
  • multithread score: 4841

custom linux-hardened kernel:

  • singlethread: 1160
  • multithread score: 4977