Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hardware detection and kernel config [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Sun Aug 17, 2014 2:30 pm    Post subject: Hardware detection and kernel config [SOLVED] Reply with quote

Hi,

I was thinking about the manjaro hardware detection tools. Basically they detect the hardware and install the necessary drivers. I wondered if gentoo has something similar to offer. What I am looking for is some tool that detects the hardware and then pre-configures the .config for your kernel with a minimal configuration. So that if you want to install a new kernel you can just run the tool and then make some adjustment specific to your needs if necessary. From what I gather genkernel has only a default setting that should work for most cases but I am looking for something that is specifically detecting your hardware. Does anything like this exist or is something like this planned for the future?


Last edited by motaito on Mon Aug 18, 2014 8:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7072

PostPosted: Sun Aug 17, 2014 7:55 pm    Post subject: Reply with quote

Build your kernel with allmodconfig and then turn to yes the ones you get from lspci -k output.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Sun Aug 17, 2014 9:15 pm    Post subject: Reply with quote

Thanks for the info.

I have always been following tutorials and the only thing they mentioned was make menuconfig. It never occurred to me that make has more options to offer... I will try it out.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Mon Aug 18, 2014 4:25 pm    Post subject: Reply with quote

Ok, I tried your suggestion. This just enables everything. I am looking for the opposite. I would like to enable nothing but what's necessary to cover all installed hardware. That get's me back to square one. Use lspci -k as you pointed out and enable the hardware by hand.

Whenever you follow a wiki entry about e.g. install nvidia drivers. There are some kernel options that need to be selected. Ideally there would be a tool that let's you choose what you want to do and then configures the kernel. e.g.
- select xorg
- select nvidia
- select kde
Then pre-configure the kernel for those settings with minimal (but complete) hardware support. Does something like this exist or do I have to manually configure the kernel?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43426
Location: 56N 3W

PostPosted: Mon Aug 18, 2014 6:43 pm    Post subject: Reply with quote

motaito,

To my knowledge, no such tool exists.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Mon Aug 18, 2014 6:49 pm    Post subject: Reply with quote

There are some on-line services for such goals, one of them:
http://kernel-seeds.org/working.html
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Mon Aug 18, 2014 7:28 pm    Post subject: Reply with quote

Thanks for the input. I guess maintaining such a tool would be a pain in the butt especially if you consider all kernel versions. I was familiar with kernel-seeds.org but that wasn't quite what I was looking for.

I have a follow up question though. How does it impact a gentoo system if you just enable everything (allmodconfig or allyesconfig)? Is the kernel getting much bigger or are there possible conflicts to look out for?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43426
Location: 56N 3W

PostPosted: Mon Aug 18, 2014 7:35 pm    Post subject: Reply with quote

motaito,

The kernel gets bigger and their are conflicts..

Some hardware demands that some options are off and others are on.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Mon Aug 18, 2014 7:53 pm    Post subject: Reply with quote

motaito wrote:
How does it impact a gentoo system if you just enable everything (allmodconfig or allyesconfig)? Is the kernel getting much bigger or are there possible conflicts to look out for?


Why wouldn't to use localmodconfig? Yes, it's not a best solution, but it creates the kernel of a reasonable size. And it may be used as a good starting point to deal with kernel further.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Mon Aug 18, 2014 8:03 pm    Post subject: Reply with quote

@NeddySeagoon
Thanks, though it's not quite the news I was hopping for. Last time it took me about 4 hours to find every info to configure the kernel. And then you are left wondering if you missed something. Also, every time I install a package/driver I need to go back and re-configure the kernel again if the package requires some settings. So, trying out a new kernel is not as straight forward as I was hopping. I guess I just have to bite the bullet and go through the config by hand.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Mon Aug 18, 2014 8:08 pm    Post subject: Reply with quote

@creaker
I was just writing a post and missed your reply... Yes, that's probably what I will end up doing. I was hoping there would be a way to automate the process of configuring to a point that doesn't require manual interaction. Thanks for the tip.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43426
Location: 56N 3W

PostPosted: Mon Aug 18, 2014 8:22 pm    Post subject: Reply with quote

motaito,

The kernel seeds method works well for many users.
Its not normally the hardware options that are the difficult ones to get right. Its all the others.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Mon Aug 18, 2014 8:44 pm    Post subject: Reply with quote

@NeddySeagoon
I didn't mean to imply the kernel seeds options aren't any good. Actually, I think it's awesome that someone went through all the trouble of explaining it and helping others. Right now my system works nice. Stable and fluid. I was just hoping to spend less time maintaining the system. It's my only issue with gentoo. It needs a lot of love to maintain the system. I would rather spend that time using it and try out some new things. Looks like there is no way to quickly test a new kernel or gentoo-source vs vanilla. All changes require quite some work. That's also why I haven't yet tried KF5. No time to read though everything and figuring out all angles. So I am still using KDE4. I don't mind the time for compiling but setting everything up is hard for me. I have to read a lot and that's unfortunately not my strength. Hopefully that will fade out if I get more familiar with gentoo.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43426
Location: 56N 3W

PostPosted: Tue Aug 19, 2014 4:30 pm    Post subject: Reply with quote

motaito,

You can migrate your working kernel configuration from kernel to kernel.
Even between kernels with different versions an patch sets. There is no need to start over every time.

Copy your working .config file to the new kernel.
In the new kernel. run make oldconfig
This will silently drop things that no longer exist and ask you about new items.

The larger the differences between the old and new kernels, the more questions you get.

This method does rely on having a working .config to start with, but its very rare to set a a kernel from scratch.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Tue Aug 19, 2014 7:39 pm    Post subject: Reply with quote

@NeddySeagoon
I did that when the kernel updated from 3.12 to 3.14. I found it quite awkward. Mostly it asked for new features and I had no clue what they were. And the questions didn't seam to end. That's why I wanted to find a tool that gives me a minimal setup to start with. If I have a basic running kernel I can enable things when I run into a situation in which I need them. I guess I might end up doing something like that and simply say no to all new features. Then go into menuconfig and work through it by hand. It seams easier to get the point in a menu when you at least see where (in what hierarchy) the features belong. Maybe I am too worried to break the hardware with a badly configured kernel and I should just fiddle around a bit to get more comfortable with it?

I will play a bit with localmodconfig and other options of make and then compare it with my existing .config. Or use genkernel as a starting point then adjust the .config and compile the kernel. In the end I would like to find a method that also works in a fresh install when I might not have a .config ready.

Thanks for all the tips and the help!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43426
Location: 56N 3W

PostPosted: Tue Aug 19, 2014 8:53 pm    Post subject: Reply with quote

motaito,

In oldconfig, use ? to read the help.
Also the case of the option letters shows the default setting. e.g. (N/y/?) so No is the default.

If yo are progressing to a newer kernel, N is normally safe but there have been a few rare instances where an existing feature has been restructured and it was very easy to get oldconfig wrong.
The last one that bit me was the network card menu being restructured. I turned all the network cards off at the new vendor level menus.
At least it still booted.

Everyone builds a sub optimal kernel sometime.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3385

PostPosted: Tue Aug 19, 2014 9:53 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Everyone builds a sub optimal kernel sometime.


Isn't that a polite way of saying, "#$%^& machine won't boot!"
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43426
Location: 56N 3W

PostPosted: Tue Aug 19, 2014 9:58 pm    Post subject: Reply with quote

depontius,

:) Its like there are no failed Gentoo installs, only varying degrees of success.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
motaito
Tux's lil' helper
Tux's lil' helper


Joined: 28 May 2014
Posts: 102

PostPosted: Wed Aug 20, 2014 3:51 pm    Post subject: Reply with quote

@NeddySeagoon
It sure helps to know the notations. I will try it out next time. Thanks for the additional input.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum