# [SOLVED] Some issues with kernel conf & some clean-up

## wisemanSSJ

Hi! Have got some problems. While starting Linux I see the announcements of mounting different things. The last entry I see is something like:

"Waiting for uevents to be processed". And then - the screen becomes absolutely black. As if it's turned off. The system doesn't pause for 60 seconds, but it absolutely freezes. I'm sure of that cause I waited for quite long, but nothing changed.

Tested booting with the generic kernel - everything booted fine. I simply deleted .config in /usr/src/linux and so, while launching "make menuconfig", a new default .config was generated. Had no problems with that. But DO have them with my kernel. What in my kernel may result in such trouble?

What's the reason for that? 

Of course, that's almost the first time I configure the kernel and it isn't quite rationalized. But I've already got some advices from NeddySeagoon (greatly thanks) and will try to optimize it during nearest days. 

But first I really wish to find what causes in such problem as my one. 

I heard, something might be connected with the support of Broadcom-boards turned on in kernel? But what should I do if I really have broadcom board? 

Here is my lspci: 

```

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)

00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)

00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)

00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)

00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)

00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)

00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)

00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)

00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)

00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)

00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)

00:1f.6 Signal processing controller: Intel Corporation 82801I (ICH9 Family) Thermal Subsystem (rev 03)

01:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)

02:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

06:00.0 FireWire (IEEE 1394): JMicron Technology Corp. IEEE 1394 Host Controller

06:00.1 System peripheral: JMicron Technology Corp. SD/MMC Host Controller

06:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller

06:00.3 System peripheral: JMicron Technology Corp. MS Host Controller

06:00.4 System peripheral: JMicron Technology Corp. xD Host Controller

```

lspci -n :

```

00:00.0 0600: 8086:2a40 (rev 07)

00:01.0 0604: 8086:2a41 (rev 07)

00:1a.0 0c03: 8086:2937 (rev 03)

00:1a.1 0c03: 8086:2938 (rev 03)

00:1a.7 0c03: 8086:293c (rev 03)

00:1b.0 0403: 8086:293e (rev 03)

00:1c.0 0604: 8086:2940 (rev 03)

00:1c.1 0604: 8086:2942 (rev 03)

00:1c.2 0604: 8086:2944 (rev 03)

00:1c.3 0604: 8086:2946 (rev 03)

00:1c.4 0604: 8086:2948 (rev 03)

00:1c.5 0604: 8086:294a (rev 03)

00:1d.0 0c03: 8086:2934 (rev 03)

00:1d.1 0c03: 8086:2935 (rev 03)

00:1d.2 0c03: 8086:2936 (rev 03)

00:1d.3 0c03: 8086:2939 (rev 03)

00:1d.7 0c03: 8086:293a (rev 03)

00:1e.0 0604: 8086:2448 (rev 93)

00:1f.0 0601: 8086:2919 (rev 03)

00:1f.2 0106: 8086:2929 (rev 03)

00:1f.3 0c05: 8086:2930 (rev 03)

00:1f.6 1180: 8086:2932 (rev 03)

01:00.0 0300: 10de:0649 (rev a1)

02:00.0 0280: 14e4:4315 (rev 01)

03:00.0 0200: 10ec:8168 (rev 02)

06:00.0 0c00: 197b:2380

06:00.1 0880: 197b:2382

06:00.2 0805: 197b:2381

06:00.3 0880: 197b:2383

06:00.4 0880: 197b:2384

```

cat /proc/cpuinfo

```

processor   : 0

vendor_id   : GenuineIntel

cpu family   : 6

model      : 23

model name   : Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz

stepping   : 6

cpu MHz      : 800.000

cache size   : 3072 KB

physical id   : 0

siblings   : 2

core id      : 0

cpu cores   : 2

apicid      : 0

initial apicid   : 0

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority

bogomips   : 4788.96

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

processor   : 1

vendor_id   : GenuineIntel

cpu family   : 6

model      : 23

model name   : Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz

stepping   : 6

cpu MHz      : 800.000

cache size   : 3072 KB

physical id   : 0

siblings   : 2

core id      : 1

cpu cores   : 2

apicid      : 1

initial apicid   : 1

fdiv_bug   : no

hlt_bug      : no

f00f_bug   : no

coma_bug   : no

fpu      : yes

fpu_exception   : yes

cpuid level   : 10

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority

bogomips   : 4788.47

clflush size   : 64

cache_alignment   : 64

address sizes   : 36 bits physical, 48 bits virtual

power management:

```

And here is my .config: 

http://paste.pocoo.org/show/247746/

Here it is (fstab):

```

/dev/sda8               /boot           ext2            noauto,noatime  1 2

/dev/sda9               /               ext3            noatime         0 1

/dev/sda7               none            swap            sw              0 0

/dev/sda10              /home           ext3            noatime         0 3

/dev/cdrom              /mnt/cdrom      auto            noauto,user     0 0

proc                    /proc           proc            defaults        0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec  

```

I tried searching and found similar topics, but advices in there didn't help me a lot, unfortunatelly.

Anyway, I don't understand lots of options: can anyone advice what should I actually turn off to make my kernel better? (something obvious, you shouldn't dig deeply)

Thanks in advance, Sergiy (wisemanssj).Last edited by wisemanSSJ on Mon Aug 16, 2010 9:08 am; edited 2 times in total

----------

## rufnut

I would try pasting that lspci -n you did above to here:

http://kmuto.jp/debian/hcl/index.rhtmlx

This will tell you what you need enabled in your kernel .config

Yes for wireless looks like you need the "ssb" driver 

Also I hope you are installing the nvidia  driver every time you make a new kernel ?

Good Luck   :Smile: 

----------

## wisemanSSJ

 *rufnut wrote:*   

> I would try pasting that lspci -n you did above to here:
> 
> http://kmuto.jp/debian/hcl/index.rhtmlx
> 
> This will tell you what you need enabled in your kernel .config
> ...

 

Thanks! Guess, this'll help a lot in configuring kernel. 

As for nvidia driver - well... I turn on the support of something for Nvidia  :Smile: 

Anyway, that's not the thing that causes my awfull error =(

Update: have just recompiled kernel. Will upload new .config in some moments. Still've got problem with Udev and and "uevents to be processed". But the kernel is better now: have deleted the support of lots of unnecessary things.

----------

## pappy_mcfae

I still need your /etc/fstab file. I'll be able to set up your .config file once I get that bit of data.

Cheers,

Pappy

----------

## wisemanSSJ

Oh, sorry! Really forgot to! 

Here it is (fstab):

```

/dev/sda8               /boot           ext2            noauto,noatime  1 2

/dev/sda9               /               ext3            noatime         0 1

/dev/sda7               none            swap            sw              0 0

/dev/sda10              /home           ext3            noatime         0 3

/dev/cdrom              /mnt/cdrom      auto            noauto,user     0 0

proc                    /proc           proc            defaults        0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec  

```

----------

## pappy_mcfae

This .config file is set for you to use either ndiswrapper or broadcom-sta as a driver for your wireless adapter. If you wish to use the b43 module, all you have to do is turn off the intel wireless (used to make broadcom-sta and ndiswrapper work), and turn on b43 as a module.

I also noticed you have a dual GPU laptop. This should work with that as well, but I have little experience working with one of those machines under X. There are others who know how to do that well.

Click here for your new .config. Compile as is.

For the best results, please do the following:

1) Move your .config file out of your kernel source directory (/usr/src/linux-  ).

2) Issue the command make mrproper. This is a destructive step. It returns the source to pristine condition. Unmoved .config files will be deleted!

3) Copy my .config into your source directory.

4) Issue the command make && make modules_install.

5) Install the kernel as you normally would, and reboot.

6) Once it boots, please post /var/log/dmesg so I can see how things loaded.

Cheers,

Pappy

----------

## wisemanSSJ

pappy, greatly thanks to you, sir!! You're really awesome at kernel-things. The system booted ok! In a moment going to study the kernel you made. I wonder: why was the bzImage put to x86-dir, not i386 (as it was earlier)? 

And now have problems with network. dhcpcd is started at the whole beginning, but neither eth0 nor eth1 is detected. ifconfig shows that I've got only "lo". Is it somehow connected to kernel or I should try to configure it somehow else? 

Here is my dmesg: http://pastebin.ca/1914301

----------

## pappy_mcfae

According to dmesg, your wired NIC is starting. My first thought would be to delete or move /etc/udev/rules.d/70-persistent-net.rules and reboot to see if the NIC renames itself to eth0...which it should. As for the wireless adapter, you have a choice of using ndiswrapper, broadcom-sta, or the b43 module. Pick one, and that will get that going as well.

Cheers,

Pappy

----------

## NeddySeagoon

wisemanSSJ,

Some time ago now, the i386 and x86_64 kernel trees were mered to a single location called x86.

At that time the i386 and x86_64 arches became symbolic links to x86.

----------

## pappy_mcfae

Yes, that happened about 2.6.24.

Cheers,

Pappy

----------

## wisemanSSJ

Thanks again, pappy and NeddySeagoon! 

After deleting that file I saw that eth0 really loaded. But still can't see eth0 at "ifconfig". What's the thing?

----------

## pappy_mcfae

Post the result of emerge --info.

Cheers,

Pappy

----------

## wisemanSSJ

Here it is:

http://pastebin.ca/1915216

Thanks in advance.

----------

## pappy_mcfae

Good. You're usintg baselayout-1. That makes the next part a little easier. Post your /etc/conf.d/net file.

Cheers,

Pappy

----------

## wisemanSSJ

Oh, I've already installed Broadcom STA. Tried to do something to configure wireless net. 

Here it is:

http://pastebin.ca/1915343

I use dhcpcd. Anyway, every time I boot my system, dhcpcd launches both for eth0 and eth1 but none of them works fine. For eth0 the process breaks after "waiting for the carrier". For eth1 it, as I understand, doesn't see my home-point (but yes, it's hidden).

----------

## NeddySeagoon

wisemanSSJ,

Hidden SSID is 

a) against the wireless standard. It works with some drivers and not others.

b) removes the SSID from beacon messages only. There are four other places its broadcast in the clear, so its no security at all.

If you really want to operate with a hidden SSID, make it work first, hide the SSID after but don't be surprised if it breaks then.

Do 

```
/etc/init.d/net.eth1 restart
```

 and post any error messages on the screen and the last 20 lines from dmesgg

----------

## dufeu

 *wisemanSSJ wrote:*   

> Oh, I've already installed Broadcom STA. Tried to do something to configure wireless net. 
> 
> Here it is:
> 
> http://pastebin.ca/1915343
> ...

 

Several things:Are you still getting udev uevents waiting during boot? This is suggestive of a PCIe bus timing issue. Please let us know if you're still having these messages.

Each change to a kernel or change to a different kernel requires re-compilation of the following if you use them:

```
ati-drivers

nvidia-drivers

vmware-modules

virtualbox-modules
```

This list is not exhaustive. These are just the ones I know about personally. The reason for this is that changes to the kernel will sometimes result in different locations in the kernel for symbols. The above mentioned list each has kernel modules they build which depend on kernel symbols. So the rule of thumb is to re-compile these packages each time you make a change to a kernel to ensure symbol locations remain in sync. The topic is more complicated than that but recompilation of these packages {if used} with each kernel change will keep you safe.

You should compile your NIC drivers as modules. This is an absolute requirement for Broadcom. Please be certain that you have <M> for your Broadcom driver(s).

----------

## pappy_mcfae

If you're going to use dhcp for eth0, you have to let the machine know. You call eth1, the wireless adapter, but you do not call the wired eth0. No call of eth0, no eth0.

Also, unless you declare it as such in /etc/udev/rules.d/70-persistent-net.rules, wireless adapters tend to favor calling themselves wlan0, not eth1. Also, you will do much better to install wpa_supplicant, as it makes accessing all Access Points easy. No need to declare anything in /etc/conf.d/net to get encryption support. It also keeps passwords out of the file as well. 

Cheers,

Pappy

----------

## wisemanSSJ

Well... I've changed my home network configuration. Now it's not hidden. 

As for dhcpcd: I don't really want to launch eth0, but dhcpcd at the boot-stage automatically tries to launch. Going to read man to know how to forbid doing that. Also decided to use wpa_supplicant. Trying to configure it at the moment.

----------

## bobspencer123

If I understand what you are saying (that is you don't want eth0 to automagically start when you turn you computer on)

just do:

```

# rc-update del net.eth0 default

```

----------

## NeddySeagoon

bobspencer123,

You also need a change to /etc/rc.conf 

```
# Do we allow any started service in the runlevel to satisfy the depedency

# or do we want all of them regardless of state? For example, if net.eth0

# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"

# both will be started, but services that depend on 'net' will work if either

# one comes up. With rc_depend_strict="YES" we would require them both to

# come up.

#rc_depend_strict="YES"
```

as by default network interfaces are hotplugged, which means they will start even if not in the default runlevel.

The above filename is for baselayout-2 users, its in /etc/conf.d/ for baselayout-1.

Note for the unwary - I've not told you the change you need to make.

----------

