You are not logged in.

#1 2009-12-20 17:00:18

m_ad
Member
Registered: 2009-09-24
Posts: 36

[SOLVED] Random wireless device name

Hello,

It seems whenever I reboot my laptop, the wireless device switches (almost every time, making it VERY inconsistent) from eth0 to eth1 and back. I've researched this a little, and found this. I'm just a little confused as to what to do after I set the udev rule.

I use netcfg, and net-auto to search for networks (there are about 3 different networks I connect to regularly), all point to eth0. This works fine when the device is set to eth0.

I've just been restarting my laptop when the device changes to eth1, hoping next time it will be eth0. I'm fixing it today, lol

EDIT: hmm, not sure why I commented out the INTERFACES= part, should I uncomment this?


/etc/rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
#   in the hardware clock being left untouched (useful for virtualization)
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.UTF-8"
HARDWARECLOCK="UTC"
TIMEZONE="America/New_York"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
SPLASH="splashy"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
MODULES=(acpi_cpufreq cpufreq_ondemand cpufreq_powersave lib80211_crypt_tkip wl !b43 !ssb)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="arch"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

# Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth0="dhcp"

# Wireless
#INTERFACES=(eth0)
#eth0="dhcp"
#wlan_eth0="eth0 essid X key X"
#wlan_eth1="eth1 essid X key X"

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(09dd)
#NETWORKS=(menu)
AUTO_NETWORKS=(auto-wireless eth0)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(cpufreq syslog-ng network netfs crond alsa net-auto hal slim)

Last edited by m_ad (2010-02-05 18:09:18)

Offline

#2 2009-12-20 18:03:10

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [SOLVED] Random wireless device name

Hope OP solved this issue and I removed the earlier post with udev page link. (I mis read the post first sad).
If you are using wicd / netcfg there is no need for INTERFACES.

Last edited by kgas (2009-12-20 18:10:32)

Offline

#3 2009-12-20 18:14:15

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: [SOLVED] Random wireless device name

I had the same issue on my HP laptop, and solved it by adding the proper modules to the MODULES array.  The reason why this solved it is that (in my case), it was loading the modules in a random order (sometimes force_deth first and then wl, or vice versa).  However, the udev rule should fix it too.

Another reason for this problem can be that the device gets a random MAC address on boot and the laptop decides to give it an unreserved name for the interface.  If that's the case, you can create a udev rule that links the Device ID to the name (using the info from lspci).  If, however, you've configured the udev rule using the MAC address, all you should have to do is restart your computer, and see if the name changes (it shouldn't change anymore).  Once you've checked that, you can re-configure any rules that used the incorrect name.

Last edited by lswest (2009-12-20 18:14:45)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#4 2009-12-20 18:14:37

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

Sorry, posted at the same time lswest did.

Thanks lswest, I'll give it a go.

Last edited by m_ad (2009-12-20 18:17:17)

Offline

#5 2009-12-20 18:15:14

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: [SOLVED] Random wireless device name

m_ad wrote:

Sorry, posted at the same time lswest did.

Thanks lswest, I'll give it a go.
Originally:No resolution so far.. just curious what changes I should make to /etc/rc.conf after I add the udev rule.

No changes to the rc.conf file are necessary, just rebooting the computer so udev can re-load the rules should suffice.  Unless, of course, you've changed the wireless interface name to something different from before (but since you seem to want it to use eth0, I assume that's what you set it to use?).

I "re-ordered" my modules by simply adding them both into the modules array (much like you, I only had the "wl" driver and blacklisted the other two broadcom devices).  I found that adding the lan card module before wl would give lan eth0 and the wireless adapter eth1 (which is what I wanted).

Regarding the newest edit:  You're welcome smile  Hope it works for you.

Last edited by lswest (2009-12-20 18:19:07)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#6 2010-02-05 17:37:26

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

Thanks again to the lswest and kgas to responding to my original post.

Believe it or not, I'm just now getting around to creating the udev rules. I'm still a little confused. I have created the file..

/etc/udev/rules.d/10-network.rules

I have done..

udevadm info -a -p /sys/class/net/eth[0|1]

because eth0 and eth1 are the two names it gives to my wireless card. Should I bind the address of both eth0 and eth1 to the same name? ie,

SUBSYSTEM=="net", ATTR{addr}="00:24:2b:f7:7e:16", NAME="eth0"
SUBSYSTEM=="net", ATTR{addr}="00:1f:16:21:36:e1", NAME="eth0"

EDIT: AAH, nevermind. I think I understand now. I want to bind the addresses of my lan and wireless to the same name each time, instead of them swapping....

EDIT: I think I've run into another problem. Since upgrading to the newest kernel, I've been getting this error:

error binding control socket, seems udevd is already running

I think this may effect the udev rule....?

Last edited by m_ad (2010-02-05 17:43:22)

Offline

#7 2010-02-05 17:48:09

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] Random wireless device name

Have you tried adding the modules in the correct order to the /etc/rc.conf MODULES= array, as was suggested?
This is a much cleaner and expedient solution..

Offline

#8 2010-02-05 17:52:59

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

Misfit138 wrote:

Have you tried adding the modules in the correct order to the /etc/rc.conf MODULES= array, as was suggested?
This is a much cleaner and expedient solution..

I'm not quite sure what the "correct" order is, though...

And actually, after adding the udev rules I still get random naming. For example, after rebooting only ONCE after creating the udev rules, my eth1 has the opposite address that I binded it to in 10-network.rules

Last edited by m_ad (2010-02-05 17:54:11)

Offline

#9 2010-02-05 17:54:41

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] Random wireless device name

Put the module for eth0 first, followed by the module for eth1.
Hopefully that sorts it out.

Offline

#10 2010-02-05 18:08:58

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

Misfit138 wrote:

Have you tried adding the modules in the correct order to the /etc/rc.conf MODULES= array, as was suggested?
This is a much cleaner and expedient solution..

So far this seems to have worked. If the problem comes up again after a few reboots, I'll post back. Until then, I'll mark the thread solved.

Thanks everyone!

Offline

#11 2010-02-05 19:58:19

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] Random wireless device name

m_ad wrote:
Misfit138 wrote:

Have you tried adding the modules in the correct order to the /etc/rc.conf MODULES= array, as was suggested?
This is a much cleaner and expedient solution..

So far this seems to have worked. If the problem comes up again after a few reboots, I'll post back. Until then, I'll mark the thread solved.

Thanks everyone!

You should be fine. Arch's /etc/rc.conf arrays are beautiful; they allow you to specify and/or blacklist modules and daemons, as well as the order in which they load.
Good to keep in mind, especially when udev acts up as it seems it just did for you, and creates /dev nodes in random order.
smile

Offline

#12 2010-02-05 20:43:15

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

AAHH, unfortunately this is not solved.

I've rebooted around 4 times throughout the day, and each time it changes device name! As soon as I change it to eth0, next boot it changes to eth1 and vice versa!

As mentioned above, the udev rules didn't work either. What could be going on?

Offline

#13 2010-02-05 21:58:47

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] Random wireless device name

Are you sure you specified the correct modules for your lan and wlan? Please post your MODULES= array and the output of lspci | grep -i net

Offline

#14 2010-02-05 22:00:32

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

Misfit138 wrote:

Are you sure you specified the correct modules for your lan and wlan? Please post your MODULES= array.

MODULES=(acpi_cpufreq cpufreq_ondemand cpufreq_powersave wl lib80211_crypt_tkip !b43 !ssb)

Offline

#15 2010-02-05 22:17:42

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [SOLVED] Random wireless device name

m_ad wrote:
Misfit138 wrote:

Are you sure you specified the correct modules for your lan and wlan? Please post your MODULES= array.

MODULES=(acpi_cpufreq cpufreq_ondemand cpufreq_powersave wl lib80211_crypt_tkip !b43 !ssb)

Ok, my Broadcom knowledge is sketchy at best, but it appears you are using wl and lib80211_crypt_tkip which are both for your Broadcom wireless. These need to go before your wired lan module in the array. What module are you using for your wired lan? Plop that in there after wl and lib80211_crypt_tkip..

Offline

#16 2010-02-05 22:45:36

m_ad
Member
Registered: 2009-09-24
Posts: 36

Re: [SOLVED] Random wireless device name

Misfit138 wrote:

Ok, my Broadcom knowledge is sketchy at best, but it appears you are using wl and lib80211_crypt_tkip which are both for your Broadcom wireless. These need to go before your wired lan module in the array. What module are you using for your wired lan? Plop that in there after wl and lib80211_crypt_tkip..

Yeah, I see.

Following this guide, I added the tg3 module (for my BCM5906M) before wl and lib80211_crypt_tkip so it looks like this....

MODULES=(acpi_cpufreq cpufreq_ondemand cpufreq_powersave wl lib80211_crypt_tkip tg3 !b43 !ssb)

I followed the directions....

#  Your wireless card will be eth0
# Your ethernet card will be eth1

I switched my netcfg profile to use eth0. Rebooting, my wireless is eth1!!

EDIT: After rebooting twice, the device has remained eth1. Let's see how long it lasts.

UPDATE: a few more reboots, the device remains eth1. I think it worked!

Last edited by m_ad (2010-02-06 14:07:49)

Offline

Board footer

Powered by FluxBB