You are not logged in.

#1 2011-07-10 20:04:15

UncleNinja
Member
From: Georgia, USA
Registered: 2011-07-09
Posts: 10
Website

Wifi works sporadically

I really don't know how to explain my problem because it's so obscure. I'm sorry if I'm missing something obvious, but I've been working for 3 days trying to fix this problem and I just don't understand it. It's completely irrational.

To start off, here's my wireless hardware (My laptop is a Compaq CQ60-419WM Notebook. Here's the specs page.):

[austin@gerald ~]$ lspci | grep -i net
00:0a.0 Ethernet controller: nVidia Corporation MCP77 Ethernet (rev a2)
07:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)

I'm using networkmanager and network-manager-applet (since I'm using GNOME 3). I've also tried netcfg and wicd but they had trouble too. Ethernet works fine, but wireless does one of several things:

  1. Becomes "Unavailable" according to networkmanager
    This never happens initially at bootup, strangely. It occurs after I restart networkmanager or turn wifi off and try to turn it on again, though.

    When I try to raise wlan0, this error is output:

    [austin@gerald ~]$ sudo ifconfig wlan0 up
    SIOCSIFFLAGS: Operation not possible due to RF-kill

    However, if I get a list of blocked stuff from rfkill (I know I don't have to use sudo for this, but just in case wink):

    [austin@gerald ~]$ sudo rfkill list all
    0: hp-wifi: Wireless LAN
        Soft blocked: no
        Hard blocked: no
    1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: yes

    Nothing is blocked for hp-wifi! I know hp-wifi is connected to my wifi button because when I run rfkill event and press it repeatedly, I see things changing:

    [austin@gerald ~]$ sudo rfkill event
    Password: 
    1310323762.943138: idx 0 type 1 op 0 soft 0 hard 0
    1310323762.943193: idx 1 type 1 op 0 soft 0 hard 1
    1310323766.204853: idx 0 type 1 op 2 soft 0 hard 1
    1310323767.511692: idx 0 type 1 op 2 soft 0 hard 0
    1310323768.620914: idx 0 type 1 op 2 soft 0 hard 1
    1310323769.628311: idx 0 type 1 op 2 soft 0 hard 0
    1310323770.684464: idx 0 type 1 op 2 soft 0 hard 1
    1310323771.742245: idx 0 type 1 op 2 soft 0 hard 0
    1310323772.798061: idx 0 type 1 op 2 soft 0 hard 1
    1310323866.844567: idx 0 type 1 op 2 soft 0 hard 0

    Those first two lines appear for some reason when I run the command, but all the other ones are the result of me pressing my wifi button repeatedly (8 times to be exact).

    That's the only wifi button my computer has, and I checked my BIOS, but there was nothing even related to my wireless card in there.

  2. Networkmanager freezes randomly, apparently because of wpa_supplicant? hmm
    This happens after bootup most of the time. Sometimes it works and I'm connected to my wifi network. I don't understand why it sometimes works and sometimes not. Once gdm is launched and I log in and see the networkmanager applet. It's frozen "connecting" to my wifi network (Adams24), but if I look at /var/log/daemon.log, I see:

    Jul 10 15:23:00 localhost NetworkManager[1789]: <info> (wlan0): now managed
    Jul 10 15:23:00 localhost NetworkManager[1789]: <info> (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
    Jul 10 15:23:00 localhost NetworkManager[1789]: <info> (wlan0): bringing up device.
    Jul 10 15:23:00 localhost NetworkManager[1789]: <info> (wlan0): deactivating device (reason: 2).
    Jul 10 15:23:00 localhost NetworkManager[1789]: <error> [1310325780.801260] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
    Jul 10 15:23:00 localhost NetworkManager[1789]: <info> (wlan0): supplicant interface state: starting -> down

    wpa_supplicant had caused problems when I was messing with netcfg too. I don't get why wpa would be causing problems, especially because my wireless network uses wep (internet tv we have uses wireless to connect to the internet and doesn't support wpa, otherwise we'd be using it, but that's not relevant wink). Here's the "Auto Adams24" file in "/etc/NetworkManager/system-connections/Auto Adams24", which was generated one of the times that it worked:

    [connection]
    id=Auto Adams24
    uuid=f260183b-0041-4628-8b3b-eea0869a3dcc
    type=802-11-wireless
    
    [802-11-wireless]
    ssid=Adams24
    mode=infrastructure
    mac-address=0:24:2c:6e:67:5
    security=802-11-wireless-security
    
    [802-11-wireless-security]
    key-mgmt=none
    wep-key0=(I don't want the world to see my wifi password, so I removed it, but I promise it was correct)
    
    [ipv4]
    method=auto
    
    [ipv6]
    method=auto
    may-fail=true

    Anyway, whenever that happens I either turn off wifi and back on again via the network-manager-applet or just restart networkmanager via /etc/rc.d/networkmanager restart. Either seems to trigger problem 1, which is weird.

Here's my rc.conf:

[austin@gerald ~]$ cat /etc/rc.conf
#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
# startup and during the boot process. If set to 'no', the C locale is used.
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
#   in the hardware clock being left untouched (useful for virtualization)
#   Note: Using "localtime" is discouraged.
# 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
# VERBOSE: Verbose level (from 1 to 8). man 3 syslog for level info
#
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="America/New_York"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
VERBOSE="3"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
#   Replace every !module by an entry as on the following line in a file in
#   /etc/modprobe.d:
#     blacklist module
#   See "man modprobe.conf" for details.
#
MODULES=()

# Udev settle timeout (default to 30)
UDEV_TIMEOUT=30

# Scan for FakeRAID (dmraid) Volumes at startup
USEDMRAID="no"

# Scan for BTRFS volumes at startup
USEBTRFS="no"

# 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="gerald"

# Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
#
# Wired network setup
#   - interface: name of device (required)
#   - address: IP address (leave blank for DHCP)
#   - netmask: subnet mask (ignored for DHCP)
#   - gateway: default route (ignored for DHCP)
# 
# Static IP example
# interface=eth0
# address=192.168.0.2
# netmask=255.255.255.0
# gateway=192.168.0.1
#
# DHCP example
# interface=eth0
# address=
# netmask=
# gateway=

# Commented to install networkmanager
#interface=eth0
#address=192.168.1.194
#netmask=255.255.255.0
#gateway=192.168.1.1


# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"

# Enable these netcfg profiles at boot-up. These are useful if you happen to
# need more advanced network features than the simple network service
# supports, such as 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 requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# 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
#
# If something other takes care of your hardware clock (ntpd, dual-boot...)
# you should disable 'hwclock' here.
#
# network disabled because of networkmanager 
DAEMONS=(hwclock syslog-ng netfs crond dbus rfkill networkmanager)

If you notice, in daemons I have rfkill, which I have installed and configured to unblock everything at startup (which is the default anyway. :3). Just in case though, here's my "/etc/conf.d/rfkill.conf":

[austin@gerald system-connections]$ cat /etc/conf.d/rfkill
#
# /etc/conf.d/rfkill
# Configuration for the rfkill startup script
#

# List of devices to block on startup (space-separated)
RFKILL_BLOCK=""

# List of devices to unblock on startup (space-separated)
RFKILL_UNBLOCK="all"

# Supported device names are: all, wifi, bluetooth, umb, wimax, wwan, gps and specific device names like phy0, hci0, ...
# See "rfkill list" for available devices
# Examples:
#
# Block all bluetooth devices:
# RFKILL_BLOCK="bluetooth"
#
# Unblock the phy0 wifi device and all wwan devices:
# RFKILL_UNBLOCK="phy0 wwan"

After startup, here's the rfkill list:

[austin@gerald ~]$ sudo rfkill list all
0: hp-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

Here's my wimpy "/etc/NetworkManager/NetworkManager.conf" file:

[austin@gerald]$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile

And here's my "/etc/conf.d/wireless" file, which I just found. No idea if it's even relevant, but here it is:

[austin@gerald]$ cat /etc/conf.d/wireless
#
# Settings for wireless cards
#
# For each wireless interface declared in INTERFACES (in rc.conf), declare
# a wlan_${IF} variable that contains the arguments to be passed to
# iwconfig(8).  Then list the original interface name in the
# WLAN_INTERFACES array.
#

#wlan_eth0="eth0 mode managed essid default"
#WLAN_INTERFACES=(eth0)

If posting the results of a command or something would be helpful, I'll be happy to do it!

Thanks!
smile

Last edited by UncleNinja (2011-07-10 20:05:10)

Offline

#2 2011-07-11 13:08:29

UncleNinja
Member
From: Georgia, USA
Registered: 2011-07-09
Posts: 10
Website

Re: Wifi works sporadically

Actually, problem 2 isn't networkmanager freezing, it's networkmanager getting stuck connecting to my wifi network. The solution is to go into network setting and select a different network ("jim", my neighbor's wifi network named after himself, for example) and then select my wireless network. And it turns out that that really doesn't happen as often as I thought. (EDIT: for this to work it all, it seems, you have to set up NetworkManager to automatically connect to the network)

Problem 1 seems to be the more serious issue here. It's as if after I turn wifi off after startup (on a software or a hardware level), I can't get it back on again (it is marked as "Unavailable" in network-manager-applet). I think this is the more serious problem here, not really problem 2.

Does anyone know how to fix problem 1?

Last edited by UncleNinja (2011-07-11 16:24:51)

Offline

#3 2011-07-11 16:22:11

UncleNinja
Member
From: Georgia, USA
Registered: 2011-07-09
Posts: 10
Website

Re: Wifi works sporadically

NetworkManager seems to be getting stuck here while connecting to wifi:

Jul 11 12:11:47 localhost NetworkManager[797]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) scheduled...
Jul 11 12:11:47 localhost NetworkManager[797]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) started...
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   address 192.168.1.107
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   prefix 24 (255.255.255.0)
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   gateway 192.168.1.1
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   nameserver '192.168.1.1'
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   nameserver '68.87.68.166'
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   nameserver '68.87.74.166'
Jul 11 12:11:47 localhost NetworkManager[797]: <info>   domain name 'hsd1.ga.comcast.net.'
Jul 11 12:11:47 localhost NetworkManager[797]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) complete.

It just seems to get stuck after completing "stage 4 of 5". weird. As I said, this doesn't happen all the time, maybe 1/3 of the time it connects successfully on the initial automatic try.

Here's what I get when I grep for NetworkManager in /var/log/errors.log:

Jul 10 16:41:48 localhost NetworkManager[1789]: <error> [1310330508.813853] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 16:41:48 localhost NetworkManager[1789]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 10 17:02:47 localhost NetworkManager[1789]: <error> [1310331767.278134] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 17:02:47 localhost NetworkManager[1789]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 10 18:14:14 localhost NetworkManager[1789]: <error> [1310336054.858533] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 18:14:14 localhost NetworkManager[1789]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 10 20:09:57 localhost NetworkManager[1789]: <error> [1310342997.60408] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 20:09:57 localhost NetworkManager[1789]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 10 20:37:40 localhost NetworkManager[3702]: <error> [1310344660.416021] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 20:37:40 localhost NetworkManager[3702]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 10 20:40:23 localhost NetworkManager[3790]: <error> [1310344823.671170] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 20:40:23 localhost NetworkManager[3790]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 10 23:16:35 localhost NetworkManager[3790]: <error> [1310354195.973739] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 10 23:16:35 localhost NetworkManager[3790]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 11 08:51:36 localhost NetworkManager[3790]: <error> [1310388696.554504] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 11 08:51:36 localhost NetworkManager[3790]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 11 08:57:26 localhost NetworkManager[772]: real_stop: assertion `priv->pid > 0' failed
Jul 11 08:58:10 localhost NetworkManager[772]: <error> [1310389090.65071] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 11 08:58:10 localhost NetworkManager[772]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 11 09:11:04 localhost NetworkManager[773]: real_stop: assertion `priv->pid > 0' failed
Jul 11 09:11:24 localhost NetworkManager[773]: real_stop: assertion `priv->pid > 0' failed
Jul 11 09:11:41 localhost NetworkManager[773]: real_stop: assertion `priv->pid > 0' failed
Jul 11 09:11:51 localhost NetworkManager[773]: get_secret_flags: assertion `is_secret_prop (setting, secret_name, error)' failed
Jul 11 09:22:07 localhost NetworkManager[745]: real_stop: assertion `priv->pid > 0' failed
Jul 11 09:23:05 localhost NetworkManager[745]: real_stop: assertion `priv->pid > 0' failed
Jul 11 09:23:37 localhost NetworkManager[745]: real_stop: assertion `priv->pid > 0' failed
Jul 11 09:23:45 localhost NetworkManager[745]: <error> [1310390625.472365] [nm-supplicant-interface.c:564] interface_add_cb(): (wlan0): error adding interface: wpa_supplicant couldn't grab this interface.
Jul 11 09:23:45 localhost NetworkManager[745]: dbus_g_proxy_cancel_call: assertion `pending != NULL' failed
Jul 11 09:28:17 localhost NetworkManager[797]: real_stop: assertion `priv->pid > 0' failed
Jul 11 12:10:27 localhost NetworkManager[797]: real_stop: assertion `priv->pid > 0' failed
Jul 11 12:11:18 localhost NetworkManager[797]: real_stop: assertion `priv->pid > 0' failed
Jul 11 12:13:28 localhost NetworkManager[797]: real_stop: assertion `priv->pid > 0' failed

I've rebooted several times today while experimenting, if that helps.

Last edited by UncleNinja (2011-07-11 16:23:53)

Offline

#4 2011-07-11 17:07:10

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Wifi works sporadically

Perhaps you need a time-delay in your command execution to allow the network to setup before connecting.......


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2011-07-14 16:34:02

UncleNinja
Member
From: Georgia, USA
Registered: 2011-07-09
Posts: 10
Website

Re: Wifi works sporadically

lilsirecho wrote:

Perhaps you need a time-delay in your command execution to allow the network to setup before connecting.......

How would I do that?

(sorry for my ignorance)

Offline

#6 2011-07-14 18:03:23

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Wifi works sporadically

If you use netcfg, I believe it has such a thing in its scripts...I may be mis-remembering.  Check the netcfg man page and/or wiki?

Offline

#7 2011-07-14 19:08:18

UncleNinja
Member
From: Georgia, USA
Registered: 2011-07-09
Posts: 10
Website

Re: Wifi works sporadically

MoonSwan wrote:

If you use netcfg, I believe it has such a thing in its scripts...I may be mis-remembering.  Check the netcfg man page and/or wiki?

Good point, thanks!
https://wiki.archlinux.org/index.php/Ne … on_Failure says:

My new favorite wiki page wrote:

Some driver+hardware combinations drop associations sometimes. Use the pre and post commands to add/remove the driver and use a script like the following to fix the current connection:

File: "/usr/local/bin/netcfgd"

#!/bin/bash
log() { logger -t "$( basename $0 )" "$*" ; }

main() {
        local host
        while sleep 1; do
                [[ "$( netcfg current )" = "" ]] && continue

                host=$( route -n | awk '/^0.0.0.0/ { print $2 }' )
                ping -c 1 $host && continue

                log "trying to reassociate"
                wpa_cli reassociate
                ping -c 1 $host && continue

                log "reassociate failed, reconfiguring network"
                netcfg -r $( netcfg current )
        done
}

exec 1>/dev/null
[[ $EUID != 0 ]] && { log "must be root"; exit 1; }

for cmd in wpa_cli ping netcfg; do
        ! which $cmd && {
                log "can't find command ${cmd}, exiting..."
                exit 1
        }
done

log 'starting...'
main 

How did I not notice that? yikes
Sorry guys!

Is there a way I can do that with NetworkManager (which is what I'd rather use)?

Last edited by UncleNinja (2011-07-14 19:12:54)

Offline

Board footer

Powered by FluxBB