Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Is a custom kernel really worth it?

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
34 posts
  • Previous
  • 1
  • 2
Author
Message
Antikapitalista
n00b
n00b
Posts: 25
Joined: Mon Apr 18, 2011 7:46 pm

Re: Is a custom kernel really worth it?

  • Quote

Post by Antikapitalista » Sun Sep 19, 2021 7:04 pm

hjkl wrote:I keep on wanting to start making my custom kernel but I just don't/can't be bothered to make one.

I have all the time in the world currently but I just don't want to?

For now I'm using a slighly edited -bin .config (a bit of stuff taken out) which is okay for me but I want to also squeeze out that extra bit of performance.
It is not only about performance; in my opinion, it is mostly about the features that you can have.

For example, I start with linux-tkg-sources from the gentoo-zh overlay, then patch it with better colours for menuconfig, reiser4 v5, aufs v5, scrollback (because ripping it out was probably the stupidest thing that Linus Benedict Torvalds had ever done), etc.

When you are done, having tweaked everything to your liking, you will have your best kernel possible. 8)
On a warpath against the North Atlantic Terrorist Organization.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sun Sep 19, 2021 7:41 pm

I also need to learm make menuconfig.
Up until now i just copy an arch config in the gentoo-sources do slight modifications and build a big kernel.
Actually I am not in the mood to reboot or kernel-panic my machine a thousand times before i get something the way i want.
So for me what i need is FULL functionality for MY hardware.
I wish there was a script to separate functionality and hardware.
Then i could use something like make localmodconfig together with adding ALL functionality.
Is this possible somehow?
I saw this but its lacking
https://github.com/gg7/gentoo-kernel-guide
:)
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Mon Sep 20, 2021 12:38 am

Once when I had upgraded my motherboard and had trouble getting a bootable kernel, pappy_mcfae, his seed kernels and his personal help in the forum, were invaluable in getting me over the hump. Sometimes, one just needs a hand.

These resources are still found in the Unsupported Software forum as sticky topics, viewforum-f-51.html, and the links therein.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Mon Sep 20, 2021 8:33 am

A possible performance gain from a custom kernel: my laptop won't hibernate, though it will sleep. I spent some time debugging hibernate, to discover that amdgpu just won't, so I turned off hibernate support with "make nconfig". The subsequent "make" hit about every bit of source, so it's possible it removed a significant amount of "am I about to hibernate" tests; it's equally possible it's just a flag in a header file that's embedded everywhere that has no effect. Really I ought to benchmark, but I can't be bothered!

Another possible gain is LTO on a non-modular kernel. I note the LTO-lite runs for the kernel itself (about 20 seconds for me) and for each module. Presumably running LTO on a module has little gain as the module is stand-alone code so there's nothing else linked in, but when those modules become part of the kernel, there's much more chance of globally optimizing something. Not that I've benchmarked or noticed any subjective performance improvement, but that's not what ricing is all about :-)
Greybeard
Top
Hund
Apprentice
Apprentice
User avatar
Posts: 221
Joined: Mon Jul 18, 2016 7:40 am
Location: Sweden
Contact:
Contact Hund
Website

  • Quote

Post by Hund » Fri Oct 22, 2021 6:04 pm

I used to rock my own custom kernel, but got tired of spending hours upon hours updating my kernel configuration. I'm now using the `gentoo-kernel-bin` package.

It can be fun, but it's not worth the excessive time it takes maintaing it. I work full time and I have a family to take care of. :)
Collect memories, not things.
Top
bammbamm808
Guru
Guru
User avatar
Posts: 558
Joined: Sun Dec 08, 2002 7:09 am
Location: Hawaii

  • Quote

Post by bammbamm808 » Sat Oct 23, 2021 4:06 am

Hund wrote:I used to rock my own custom kernel, but got tired of spending hours upon hours updating my kernel configuration. I'm now using the `gentoo-kernel-bin` package.

It can be fun, but it's not worth the excessive time it takes maintaing it. I work full time and I have a family to take care of. :)
"Excessive time"? 'make oldconfig' and just a few minutes. 'make' with -jx, and then 'make modules_install' and 'make install'. Very quick and easy.
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 4070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Top
Hund
Apprentice
Apprentice
User avatar
Posts: 221
Joined: Mon Jul 18, 2016 7:40 am
Location: Sweden
Contact:
Contact Hund
Website

  • Quote

Post by Hund » Sat Oct 23, 2021 5:16 am

bammbamm808 wrote:
Hund wrote:I used to rock my own custom kernel, but got tired of spending hours upon hours updating my kernel configuration. I'm now using the `gentoo-kernel-bin` package.

It can be fun, but it's not worth the excessive time it takes maintaing it. I work full time and I have a family to take care of. :)
"Excessive time"? 'make oldconfig' and just a few minutes. 'make' with -jx, and then 'make modules_install' and 'make install'. Very quick and easy.
It took me a long time going through every new setting, looking it up, trying to figure it out what it is and if I want it or not. And then there's the work with carefully disabling all new drivers that I don't need.

I'm unfortunately not some kind of über geek that knows every bit of data about the kernel and it's features. Looking up new features takes time.

The compilation was quick though. That takes me just 10 minutes on my more than decade old computer.
Collect memories, not things.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56087
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 23, 2021 9:51 am

Hund,

It only take about 20 min to do

Code: Select all

make oldconfig
in a new kernel tree every six or eight weeks or so. Unless you skip a few kernel versions.
For me, its the only way to drop things I don't need with a zero autoblackmagic install. It need not be right first time either.
I prune things I don't need over many kernel updates.

It take a few hours for a new install but I don't that very often.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
JustAnother
Apprentice
Apprentice
Posts: 215
Joined: Fri Sep 23, 2016 3:48 pm

  • Quote

Post by JustAnother » Sun Oct 24, 2021 3:26 am

I can throw in three little lessons I think I learned.

1: Use a history space to work on the kernel. That is, a bash history file that is only used to noodle around with the kernel. This makes your commands easily searchable. This helps a bit.

How to do this? I wrote a history space script, but it is non-trivial, and bash lacks the right hooks to do this simply. Sad but true.

2: WRONG assumption: if I know I have certain hardware on the computer, make all those drivers built-ins, and the kernel will magically be self-contained when tossed into memory.

Nothing but problems. Use modules for almost everything if you can, within reason. Builtin-ins get called during initcall, and some may let you supply driver options on the kernel cmdline, and some may let you reset parameters using /sys, but it is better to be able to unload and reload a module. Also, apparently initcall can miss out on the ability to load firmware (wifi...) which would be loaded when a module is loaded.

3: Back up them .config files, and salient /boot files.
Top
Post Reply
  • Print view

34 posts
  • Previous
  • 1
  • 2

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic