You are not logged in.

#1 2012-11-15 04:06:13

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

netcfg/net-auto-wireless connects on boot less than half the time.

I'm trying to switch from wicd to netcfg because it seems more efficient. Anyway, I have netcfg.service and net-auto-wireless.service enabled. Not sure exactly how it is supposed to work, but it does work some times, at any rate... just not always.

/etc/conf.d/netcfg:

NETWORKS=(eth1-TallMoose)
WIRED_INTERFACE="eth0"
WIRELESS_INTERFACE="eth1"

I know it's weird that my wireless is "eth1", but that's what it is.

/etc/network.d/eth1-TallMoose:

CONNECTION='wireless'
DESCRIPTION='Automatically generated profile by wifi-menu'
INTERFACE='eth1'
SECURITY='wpa'
ESSID=TallMoose
IP='dhcp'
KEY=FakePassword

not sure what's to be done.

Last edited by ninjaaron (2012-11-15 04:20:38)

Offline

#2 2012-11-15 04:19:46

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: netcfg/net-auto-wireless connects on boot less than half the time.

alright, I disabled net-auto-wireless, and everything is the same.

So... I changed something, but nothing is different, if you follow
[edit]
did the opposite. Disabled netcfg and enabled net-auto-wireless, and everything is still the same.

Last edited by ninjaaron (2012-11-15 05:07:14)

Offline

#3 2012-11-15 06:10:39

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: netcfg/net-auto-wireless connects on boot less than half the time.

eh, screw it, I'm going back to wicd until this is sorted upstream.

Offline

#4 2012-11-15 06:16:08

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: netcfg/net-auto-wireless connects on boot less than half the time.

I am not sure what you expect to be sorted upstream.  I think the issues are yours (yet I an not exactly sure what those issues are).  If the problem is the eth1 naming, maybe it would be wise to have udev create a persistent name for your wireless device.  Might I recommend using wlan0, since it kind of seems that is what you expect from the kernel naming.

Edit: I just looked at the times from first to last post, and you seriously gave up after two hours?

Last edited by WonderWoofy (2012-11-15 06:16:53)

Offline

#5 2012-11-15 06:27:01

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: netcfg/net-auto-wireless connects on boot less than half the time.

Awe (after reviewing my post here), I think I found your problem.

In you /etc/conf.d/netcfg
Change the line:

NETWORKS=(eth1-TallMoose)

TO:

NETWORKS=(last)

And add your Wireless netcfg profiles to this array,

# Array of profiles that may be started by net-auto-wireless.
# When not specified, all wireless profiles are considered.
#AUTO_PROFILES=("profile1" "profile2")

If the problem is that net-auto-wireless like only tries one time to find the wireless network then gives up.... You could try like making 3 or 4 copies of the config. Then if it fails one it will go to the next config which will basicaly be a hack to make it try again.
---------------------

Well, I have my Arch server/router use netcfg to auto-connect to my ISP over a wired interface.

I only have the net-auto-wired.service enabled.

I have a problem with the computer flip-floping the eth0 and eth1 interface names. To sove this I set the name based on the MAC address....

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

SUBSYSTEM=="net", ATTRS{address}=="co:fe:co:fe:co:fe", NAME="wan"
SUBSYSTEM=="net", ATTRS{address}=="aa:bb:cc:aa:bb:cc", NAME="lan"

/etc/network.d/wan-dhcp

CONNECTION='ethernet'
DESCRIPTION='A basic dhcp ethernet connection using iproute'
INTERFACE='wan'
IP='dhcp'
DNS=('8.8.8.8')
## for DHCPv6
#IP6='dhcp'
## for IPv6 autoconfiguration
#IP6='stateless'

/etc/conf.d/netcfg

# Enable these netcfg profiles at boot time.
#   - prefix an entry with a '@' to background its startup
#   - set to 'last' to restore the profiles running at the last shutdown
#   - set to 'menu' to present a menu (requires the dialog package)
# Network profiles are found in /etc/network.d
NETWORKS=(last)

# Specify the name of your wired interface for net-auto-wired
WIRED_INTERFACE="wan"

# Specify the name of your wireless interface for net-auto-wireless
WIRELESS_INTERFACE="wlan0"

# Array of profiles that may be started by net-auto-wireless.
# When not specified, all wireless profiles are considered.
#AUTO_PROFILES=("profile1" "profile2")

Last edited by hunterthomson (2012-11-15 06:48:23)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#6 2012-11-15 06:47:52

Perfect Gentleman
Member
Registered: 2012-10-25
Posts: 220

Re: netcfg/net-auto-wireless connects on boot less than half the time.

i got wi-fi.
i have /etc/network.d/Wi-Fi and netcfg@Wi-Fi.service

Offline

#7 2012-11-15 07:05:09

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,323

Re: netcfg/net-auto-wireless connects on boot less than half the time.

ninjaaron wrote:

I'm trying to switch from wicd to netcfg because it seems more efficient. Anyway, I have netcfg.service and net-auto-wireless.service enabled. Not sure exactly how it is supposed to work, but it does work some times, at any rate... just not always.

What error message appears in the log when it does not work?  If the error is 'Cannot find device "eth1"' then you are being affected by a systemd bug.  https://bbs.archlinux.org/viewtopic.php?id=151662 has links to a proposed patch

Offline

#8 2012-11-15 07:12:05

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: netcfg/net-auto-wireless connects on boot less than half the time.

WonderWoofy wrote:

I am not sure what you expect to be sorted upstream.  I think the issues are yours (yet I an not exactly sure what those issues are).

I have another daemon that doesn't start most of the time.  I think it's a systemd problem.

Offline

#9 2012-11-15 07:16:38

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: netcfg/net-auto-wireless connects on boot less than half the time.

hunterthomson wrote:

Awe (after reviewing my post here), I think I found your problem.

In you /etc/conf.d/netcfg
Change the line:

NETWORKS=(eth1-TallMoose)

TO:

NETWORKS=(last)

And add your Wireless netcfg profiles to this array,

# Array of profiles that may be started by net-auto-wireless.
# When not specified, all wireless profiles are considered.
#AUTO_PROFILES=("profile1" "profile2")

I did what you said, and it seems to be working more of the time than before. I kind of expect it to work 99% of the time however (like wicd), and I think we're at about 40% right now, and that may be generous. On the upside, your suggested settings do seem to give better results when resetting the daemon as well.

[edit]
update on this:
it does seem to be connecting to the network most of the time (most, not all), it just fails the ping test (and won't load webpages) until the connection is reset.

Though there are times when it simply does what it is supposed to do, albeit they are relatively few.

Last edited by ninjaaron (2012-11-15 07:26:04)

Offline

#10 2012-11-15 10:26:42

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: netcfg/net-auto-wireless connects on boot less than half the time.

Hum, what dose your journalctl say? Mine gives out put about the connection process.

Nov 14 16:29:02 archpc sudo[1551]: user : TTY=tty1 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/netcfg egg
Nov 14 16:29:02 archpc sudo[1551]: pam_unix(sudo:session): session opened for user root by user(uid=0)
Nov 14 16:29:03 archpc kernel: e1000e 0000:00:19.0: irq 46 for MSI/MSI-X
Nov 14 16:29:03 archpc kernel: e1000e 0000:00:19.0: irq 46 for MSI/MSI-X
Nov 14 16:29:03 archpc kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Nov 14 16:29:03 archpc Tor[407]: Problem bootstrapping. Stuck at 80%: Connecting to the Tor network. (Network is unreachable; NOROUTE; c
Nov 14 16:29:04 archpc Tor[407]: Problem bootstrapping. Stuck at 80%: Connecting to the Tor network. (Network is unreachable; NOROUTE; c
Nov 14 16:29:05 archpc Tor[407]: Problem bootstrapping. Stuck at 80%: Connecting to the Tor network. (Network is unreachable; NOROUTE; c
Nov 14 16:29:06 archpc kernel: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Nov 14 16:29:06 archpc kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Nov 14 16:29:06 archpc sudo[1551]: pam_unix(sudo:session): session closed for user root
Nov 14 16:29:06 archpc Tor[407]: Bootstrapped 85%: Finishing handshake with first hop.
Nov 14 16:29:09 archpc Tor[407]: Bootstrapped 90%: Establishing a Tor circuit.
Nov 14 16:29:12 archpc Tor[407]: Tor has successfully opened a circuit. Looks like client functionality is working.
Nov 14 16:29:12 archpc Tor[407]: Bootstrapped 100%: Done.

OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#11 2012-11-15 15:38:45

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: netcfg/net-auto-wireless connects on boot less than half the time.

-- Reboot --
Nov 14 06:09:12 folio gnome-keyring-daemon[1985]: Gkm: using old keyring directory: /home/ninjaaron/.gnome2/keyrings
Nov 14 06:09:12 folio gnome-keyring-daemon[1985]: Gkm: using old keyring directory: /home/ninjaaron/.gnome2/keyrings
Nov 14 06:09:12 folio gnome-keyring-daemon[1985]: couldn't set environment variable in session: The name org.gnome.SessionManager was not provided by any .service files
Nov 14 06:09:12 folio gnome-keyring-daemon[1985]: keyring alias directory: /home/ninjaaron/.gnome2/keyrings
-- Reboot --
Nov 14 21:33:28 folio vim[1119]: *** info
Nov 14 21:33:28 folio vim[1119]: Warning: closing connection
-- Reboot --
Nov 14 22:45:46 folio mev[1154]: *** err
Nov 14 22:45:46 folio mev[1154]: /usr/bin/mev: Can't open mouse connection

All the other messages from yesterday (when I started using netcfg) are the same ones about gnome-keyring-daemon that you see here at the top (in fact, that comprises a good chunk of the entire journal).

Also, seems like there are many times when resetting the daemon connects to the wireless router, but not the internet. However, if I simply launch netcfg as a command, it works fine.

Offline

#12 2012-11-15 15:55:27

vostok4
Member
Registered: 2010-12-16
Posts: 61

Re: netcfg/net-auto-wireless connects on boot less than half the time.

Try switching to dhclient from dhcpcd.

I have infinitely better results with dhclient over dhcpcd (hate dhcpcd).

Offline

#13 2012-11-15 16:18:51

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 802

Re: netcfg/net-auto-wireless connects on boot less than half the time.

When my wifi wouldn't start reliably on boot, the systemd solution was to make sure the network hardware was initialised before a network connection attempt was made

Copied netcfg.service and added the "After" and "BindTo" lines

[Unit]
After=sys-devices-pci0000:00-0000:00:1c.1-0000:02:00.0-bcma0:0-net-wlan0.device
BindTo=sys-devices-pci0000:00-0000:00:1c.1-0000:02:00.0-bcma0:0-net-wlan0.device

where

systemctl --full

showed me the wifi device name

Offline

#14 2012-11-17 17:27:44

ninjaaron
Member
Registered: 2010-12-10
Posts: 296

Re: netcfg/net-auto-wireless connects on boot less than half the time.

Alright, it had something to do with my system booting so fast that it couldn't use dhcp or whatever. It seems like the threshold is somewhere around 3s. However, this is actually slower than my boot time with wicd, and wicd only adds about 16MB of overhead on the RAM, which doesn't make much of a difference on a 4GB system.

Something about diminishing returns makes the quest for optimization silly at this point. Should I mark it as solved?

Last edited by ninjaaron (2012-11-17 17:28:22)

Offline

Board footer

Powered by FluxBB