# How to set kernel options based on system information

## krax

Hello;

I was trying Fresh install on a P8H77-v Asus and i come to think how could i really know which option should i [y] in the kernel in order to fully make the kernel compatible with my device.

First I did :

```

~# lspci

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)

00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)

00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)

00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)

00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)

00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)

00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)

00:1c.5 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c4)

00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)

00:1f.0 ISA bridge: Intel Corporation H77 Express Chipset LPC Controller (rev 04)

00:1f.2 IDE interface: Intel Corporation 7 Series/C210 Series Chipset Family 4-port SATA Controller [IDE mode] (rev 04)

00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)

00:1f.5 IDE interface: Intel Corporation 7 Series/C210 Series Chipset Family 2-port SATA Controller [IDE mode] (rev 04)

03:00.0 Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)

04:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)

05:00.0 Ethernet controller: Atheros Communications Inc. AR2417 Wireless Network Adapter [AR5007G 802.11bg] (rev 01)

```

then I did lspci -n and paste in on [url]http://kmuto.jp/debian/hcl [/url]and there i found some of the driver names. So I search them in the kernel and activated the relative part to my hardware (search by the use of / )

for example ath5k reported back (6) result and option in kernel which among them i found ATH5k_AHB and .... i only [y] the one related to my [*] Atheros Communications Inc. AR2417 Wireless Network Adapter [AR5007G 802.11bg] (rev 01).[*]

But there is still lots of option i don't know how to activate in kernel related to my hardware.

      1. what kernel option [*]PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)[*] uses?

      2.Or in the kmuto.jp the driver for Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller is i915 but by searching ( / ) in the kernel config i get 

```

 Symbol: DRM_I915 [=y]                                                                                                 │  

  │ Type  : tristate                                                                                                      │  

  │ Prompt: Intel 8xx/9xx/G3x/G4x/HD Graphics                                                                             │  

  │   Defined at drivers/gpu/drm/Kconfig:119                                                                              │  

  │   Depends on: HAS_IOMEM [=y] && DRM [=y] && AGP [=y] && AGP_INTEL [=y]                                                │  

  │   Location:                                                                                                           │  

  │     -> Device Drivers                                                                                                 │  

  │ (1)   -> Graphics support                                                                                             │  

  │   Selects: SHMEM [=y] && TMPFS [=y] && DRM_KMS_HELPER [=y] && FB_CFB_FILLRECT [=y] && FB_CFB_COPYAREA [=y] && FB_CFB_ │  

  │                                                                                                                       │  

  │                                                                                                                       │  

  │ Symbol: DRM_I915_KMS [=y]                                                                                             │  

  │ Type  : boolean                                                                                                       │  

  │ Prompt: Enable modesetting on intel by default                                                                        │  

  │   Defined at drivers/gpu/drm/Kconfig:156                                                                              │  

  │   Depends on: HAS_IOMEM [=y] && DRM_I915 [=y]                                                                         │  

  │   Location:                                                                                                           │  

  │     -> Device Drivers                                                                                                 │  

  │       -> Graphics support                                                                                             │  

  │ (2)     -> Intel 8xx/9xx/G3x/G4x/HD Graphics (DRM_I915 [=y]) 

```

which as you can see there is not any relation to Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller. (Why is that?)

      3.What kernel options these need?

a. Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1

b. PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1

c. Ethernet controller: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 10)

d. PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)

    PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4)

Note: in this Set of PCIs; we has a 6Mbps x2slot; 4Mbps x1slot; 2Mbps x1slot (SPEED are different; are the kernel modules?)

The same goes for SATA ports with different Speeds.

Please reply your ideas and your knowledge of the specific driver in this mix.

THANK YOU%Last edited by krax on Sat Oct 19, 2013 6:52 pm; edited 4 times in total

----------

## roarinelk

1) it's a pcie-to pci bridge, which needs no drivers.

2) enable both options

3) a) enable CONFIG_WATCHDOG_CORE and CONFIG_INTEL_MEI_ME

    b) none needed, just enable pci express support

    c) enable CONFIG_ALX (you need at least linux-3.10 for this)

    d) none needed, just enable pci express support

    e) none needed, just enable pci express support

----------

## krax

Hello roarinelk;

You are really a Guru. nice save.

 *Quote:*   

> CONFIG_INTEL_MEI_ME 

  in 3.8.13-gentoo I found CONFIG_INTEL_MEI  *Quote:*   

>  in
> 
> ```
> 
>    Location:                                                                                                           │  
> ...

 Last edited by krax on Tue Jul 09, 2013 2:38 am; edited 1 time in total

----------

## roarinelk

as I wrote, you need at least linux-3.10 for CONFIG_ALX.

----------

## krax

For Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller; I have only build snd_hda_intl and i want to know is it the real driver or not and I strongly think there is other options to be [y] in the kernel.

Look here ( i just paste what was not activated in that section):

```
 <*>   Intel HD Audio  ---> 

                              --- Intel HD Audio                                                                           │ │  

  │ │                      (64)  Pre-allocated buffer size for HD-audio driver                                          │ │  

  │ │                      [*]   Build hwdep interface for HD-audio driver                                              │ │  

  │ │                      [ ]     Allow dynamic codec reconfiguration                                                  │ │  

  │ │                      [ ]   Support digital beep via input layer                                                   │ │  

  │ │                      [ ]   Support jack plugging notification via input layer                                     │ │  

  │ │                      [ ]   Support initialization patch loading for HD-audio                                      │ │  

  │ │                      
```

Which one is supported; that i go and activate them?Last edited by krax on Sun Oct 20, 2013 1:38 pm; edited 1 time in total

----------

## krax

i understand some but these two are the important one? 

what do they do and are they supported?

a.  [ ]     Allow dynamic codec reconfiguration 

b. [ ]   Support initialization patch loading for HD-audio

----------

## roarinelk

yes, snd_hda_intel is the real driver.  It contains code for both the DMA engine (the intel-part) and the hda codec.

a) you can tune the codecs internal paths with a few sysfs knobs (i.e. audio paths, ...)

b) patch loading is to work around bios configuration bugs.  apparently there are special

     patch files for this, but I have yet to find one ;-)

Generally speaking you don't need them, but enabling them doesn't hurt either :)

----------

## chithanh

Recent kernels have the "make localyesconfig" target, which evaluates "lsmod" and "lspci -k" outputs as well as /proc/config.gz to create a kernel with your hardware drivers built-in.

----------

## krax

In the UEFI BOIS there are lots of sensor data. from temp to fan cycle even the ram temp.

But here I can't find single sensor. after installing lm_sensor package from the portage and issuing sensors command i only get the temp of CPU.

is there any option to tweak in kernel for sensors to start working.

Also detect-sensors command returns no i2c sensor detected.

PS: thanks for your kind and full support in this matter. Last edited by krax on Mon Jul 08, 2013 5:45 pm; edited 1 time in total

----------

## roarinelk

you could start by enabling CONFIG_I2C_I801  (for I2C interface, although I doubt you can really use it since ACPI usually claims it),

then enable all drivers under Drivers/Hardware Monitoring Support.  One of them may work with the sensor chip on your board.

----------

## krax

Does activate all of the options in hardware detect section of kernel cause problem?

So what is said; mainly translates to not having all of the sensor in gentoo.

But still I do my search every where and report back.

THANK YOU% (thank you very much)

----------

## krax

 *chithanh wrote:*   

> Recent kernels have the "make localyesconfig" target, which evaluates "lsmod" and "lspci -k" outputs as well as /proc/config.gz to create a kernel with your hardware drivers built-in.

 

You mean just emerge the gentoo-sources or what ever flavor of kernel i want and instead of make menuconfig i issue make localyesconfig and i am good to go?

----------

## krax

I just found this by wondering into http://www.lm-sensors.org/wiki/Devices. then from there I search the 3.8.13-gentoo kernel and find this module atk0110.

These is the kernel help (invoke by selecting the item and pressing ?)

 *Quote:*   

> 
> 
> If you say yes here you get support for the ACPI hardware                                                             │  
> 
>   │ monitoring interface found in many ASUS motherboards. This                                                            │  
> ...

 

A) I don't know if this work or not.

B) I don't know to Build it as module or built in the kernel?

----------

## roarinelk

make them all built-in (leave the AMD and VIA ones unselected), should not be any

problems.  If you have an asus board with the ATK device, you'll also get sensor data from

this one if it provides any.

If you're up to it, try it with latest  git-sources  kernel ;-)

----------

## krax

You told me in the post #2 to active the express pci; could you tell me exactly where?Last edited by krax on Tue Jul 09, 2013 2:39 am; edited 1 time in total

----------

## roarinelk

CONFIG_PCIEPORTBUS  (under "Bus Options"; you can enable almost everything here, but leave "ISA DMA" and the "Read CB20LE..." options disabled.

You also won't need RapidIO and PCI debugging; disable Cardbus/PCMCIA if you don't have a laptop, but enable ACPI_PCI_HOTPLUG

If you're posting from this machine, then all these options are already enabled, otherwise it won't even boot to a commandline ;-)

----------

## krax

In the System UEFI  (BOIS) i have an option which gives me 3 choices:

a. Silent

b. Enary Save

c. Performance

Is that the same as Default ASPM policy (BIOS default)  --->  under the Bus options (PCI etc.)

```
                                   (X) BIOS default                        │ │  

                            │ │                        ( ) Powersave                           │ │  

                            │ │                        ( ) Performance                         │ │  

                            │ │                                          
```

----------

## krax

And also what of these choices is supported here by my hardware?

```

                                 --- Support for PCI Hotplug                                                                  │ │  

  │ │                      < >   ACPI PCI Hotplug driver                                                                │ │  

  │ │                      [ ]   CompactPCI Hotplug driver                                                              │ │  

  │ │                      < >   SHPC PCI Hotplug driver  
```

----------

## roarinelk

I suggest you leave it at "BIOS default", you can change it at runtime IF the bios allows the OS to take over PCIE Powermanagement.

Use the ACPI PCI Hotplug driver.  The others are for exotic hardware (industrial chassis).

----------

## krax

───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │  

  │ │                                     --- TCP: advanced congestion control                                                                        │ │  

  │ │                                     < >   Binary Increase Congestion (BIC) control                                                              │ │  

  │ │                                     <*>   CUBIC TCP                                                                                             │ │  

  │ │                                     < >   TCP Westwood+                                                                                         │ │  

  │ │                                     < >   H-TCP                                                                                                 │ │  

  │ │                                     < >   High Speed TCP                                                                                        │ │  

  │ │                                     < >   TCP-Hybla congestion control algorithm                                                                │ │  

  │ │                                     < >   TCP Vegas                                                                                             │ │  

  │ │                                     < >   Scalable TCP                                                                                          │ │  

  │ │                                     < >   TCP Low Priority                                                                                      │ │  

  │ │                                     < >   TCP Veno                                                                                              │ │  

  │ │                                     < >   YeAH TCP                                                                                              │ │  

  │ │                                     < >   TCP Illinois                                                                                          │ │  

  │ │                                           Default TCP congestion control (Cubic)  --->                                                          │ │  

  │ │                                                                                               

I wonder which one should be enabled and if it is possible to choose more than one? considering the fact that wifi is a default connection; does it bare any influence on the choices

----------

