Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140212 - Udev load modules in random order
Summary: Udev load modules in random order
Status: RESOLVED WORKSFORME
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-13 04:02 UTC by Marcin Kurek
Modified: 2006-07-13 04:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Kurek 2006-07-13 04:02:00 UTC
Recent udev introduced hotplug/coldplug functionality and this is good feature IMHO. But there is a problem when system has for example more than one network card or music card and drivers are compiled as a modules.

For example the NIC's are randomly swapped on boot. On my system I use two network cards Via-Rhine and RTL8139 and normaly eth0 is RTL card and eth1 is VIA card, but not with recent UDEV. Sometimes VIA become eth0 and of coz this cause network to fail. I guess this is because udev loads all modules at once and sometimes via is loaded first and sometimes rtl is loaded first ... what a ugly problem.

I solved it by adding additional rule to udev:

KERNEL=="eth*", SYSFS{address}=="00:0b:2b:0a:88:e8", NAME="eth0"
KERNEL=="eth*", SYSFS{address}=="00:0B:2f:4f:32:9a", NAME="eth1"

This basicly fix this problem (There is still bug in udev 94, fixed in released already but not in portage yet 95/96)

Second problem is basiclythe same but with ALSA drivers. My machine has two cards one on board via and SBAudigy. Cards are randomly swapped on boot, sometimes via is default one and sometimes audigy. This also can be easy fixed this time in /etc/modules.d/alsa by adding index option like this:

options snd-emu10k1 index=0
options snd-via82xx index=1

My point is I think it's a good idea to add or a notes about that in documentation or add this to default scripts.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-07-13 04:46:07 UTC
http://www.gentoo.org/doc/en/udev-guide.xml - see the link to udev rules guide at the bottom. Don't really see how should we document udev rules writing in an ebuild.