Page 1 of 1

Kernel recompile

Posted: Tue Sep 29, 2020 2:23 pm
by sagsaw
I have Linuxmint 19.3 installed running kernel 5.4.0-48-generic

I want to recompile the kernel to set CONFIG_HZ at 400

How to do it?

Also how to use the file /boot/config-5.4.0-48-generic as the config file? Should this file be used or a new one generated? I actually want to only set the CONFIG_HZ options but leave rest as it is so thought to use the provide config file in /boot. Is it possible?

Will it also detect some of the DKMS drivers I have compiled and installed in running kernel?

Re: Kernel recompile

Posted: Wed Sep 30, 2020 10:55 am
by Hoser Rob
I'm afraid you're really in over your head here and I hope you have the sense to do a system backup before trying anthing like this. Or, better, ask a proper support question.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 12:42 am
by CtrlAltDel
Hoser Rob wrote:
Wed Sep 30, 2020 10:55 am
I'm afraid you're really in over your head here and I hope you have the sense to do a system backup before trying anthing like this. Or, better, ask a proper support question.

It isn't your job to determine this poster's level of competency. You neither provided an answer nor provided any useful information other than your own personal opinion about the intelligence of someone you do not know by questioning their sense and telling the poster that their question is stupid and isn't proper.

Some people just don't phrase their questions in what you may consider perfect form. This poster may know more about this issue than you imagine. In fact, some of the most intelligent posters on these forums may not be the greatest communicators, as is often the case in life.

I consider your response to be rude and is the type of response that can prevent a growth in membership of boards like this. Please reconsider your behavior in the future.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 1:30 am
by Kadaitcha Man
sagsaw wrote:
Tue Sep 29, 2020 2:23 pm
How to do it?
Without your own research, experimentation and learning, with exceedingly great difficulty. There is no CONFIG_HZ_400 in the kernel .config, and the values that are there have been optimised over many years of testing.
I actually want to only set the CONFIG_HZ options but leave rest as it is so thought to use the provide config file in /boot. Is it possible?
Yes, from within the root of the kernel source tree cp /boot/config-`uname -r` .config
Will it also detect some of the DKMS drivers I have compiled and installed in running kernel?
If the kernel build is done correctly, yes, but what you are asking isn't as simple as make menuconfig, make, make install.

Your best course of action is to setup a virtual machine and do your trials, tests and learning in there.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 9:24 am
by Hoser Rob
CtrlAltDel wrote:
Tue Oct 06, 2020 12:42 am
Hoser Rob wrote:
Wed Sep 30, 2020 10:55 am
I'm afraid you're really in over your head here and I hope you have the sense to do a system backup before trying anthing like this. Or, better, ask a proper support question.

It isn't your job to determine this poster's level of competency. ...

I consider your response to be rude and is the type of response that can prevent a growth in membership of boards like this. Please reconsider your behavior in the future.
You have zero idea of proper forum behavior, I've read your other threads.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 2:49 pm
by sagsaw
Kadaitcha Man wrote:
Tue Oct 06, 2020 1:30 am
sagsaw wrote:
Tue Sep 29, 2020 2:23 pm
How to do it?
Without your own research, experimentation and learning, with exceedingly great difficulty. There is no CONFIG_HZ_400 in the kernel .config, and the values that are there have been optimised over many years of testing.
I actually want to only set the CONFIG_HZ options but leave rest as it is so thought to use the provide config file in /boot. Is it possible?
Yes, from within the root of the kernel source tree cp /boot/config-`uname -r` .config
Will it also detect some of the DKMS drivers I have compiled and installed in running kernel?
If the kernel build is done correctly, yes, but what you are asking isn't as simple as make menuconfig, make, make install.

Your best course of action is to setup a virtual machine and do your trials, tests and learning in there.
Thanks. Yes there is no 400Hz option but there is a 300 Hz and 100 Hz option. Xanmod uses 500Hz wonder how they do it. MxLinux uses 1000Hz .

Actually wanted to only change this Hz setting and use it in combination with different CPU Governors to analyze the overall behaviour of a system at various loads like youtube video browser html games videos or compiling etc.

Thanks for the pointer to using the existing config file.

Yes using VM is a sane option, true.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 2:51 pm
by sagsaw
Hoser Rob wrote:
Wed Sep 30, 2020 10:55 am
I'm afraid you're really in over your head here and I hope you have the sense to do a system backup before trying anthing like this. Or, better, ask a proper support question.
Well asking and doing it are two different things. Secondly, I believe there is open permission by the Forum administrators to ask the stupidest of questions, dunno if this comes in that stupid category. To each is own. Cheers.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 8:12 pm
by CtrlAltDel
sagsaw wrote:
Tue Oct 06, 2020 2:51 pm
Hoser Rob wrote:
Wed Sep 30, 2020 10:55 am
I'm afraid you're really in over your head here and I hope you have the sense to do a system backup before trying anthing like this. Or, better, ask a proper support question.
Well asking and doing it are two different things. Secondly, I believe there is open permission by the Forum administrators to ask the stupidest of questions, dunno if this comes in that stupid category. To each is own. Cheers.
Your question was perfectly fine, Sagsaw, and was just as proper as any other question on this forum. Don't pay any attention to Net Nannies who feel they are here to set protocol for the rest of us.

Re: Kernel recompile

Posted: Tue Oct 06, 2020 8:17 pm
by Kadaitcha Man
sagsaw wrote:
Tue Oct 06, 2020 2:49 pm
... Xanmod uses 500Hz wonder how they do it...
Given that .config only allows a few choices and no option for a custom value, they would probably have to modify the kernel source.