LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   iwlist scanning "Allocation failed" on working wireless device (https://www.linuxquestions.org/questions/linux-networking-3/iwlist-scanning-allocation-failed-on-working-wireless-device-4175602642/)

thethinker 03-27-2017 11:17 AM

iwlist scanning "Allocation failed" on working wireless device
 
I'm Running Slackware 14.2 on a MacBook. I believe my wireless card is being loaded correctly (details below). What happens is every time I run iwlist, I get the following:

Code:

# iwlist scanning
lo        Interface doesn't support scanning.

print_scanning_info: Allocation failed
eth0      Interface doesn't support scanning.

I found a bug report that might be relevant, on Arch: https://bugs.archlinux.org/task/15363. This claims that it's some kind of buffer issue, which might apply to me; the only two places I've tried this both have a large number of access points. And I am able to connect when I do it by hand via iwconfig and dhcpcd.

But, it says it's fixed in wireless tools version 29, which is what I'm running:

Code:

# iwlist --version
iwlist    Wireless-Tools version 29
          Compatible with Wireless Extension v11 to v22.

Kernel    Currently compiled with Wireless Extension v22.

eth1      Recommend Wireless Extension v21 or later,
          Currently compiled with Wireless Extension v22.

Of course, this says "compatible with v11-v22", does that mean I have to somehow upgrade iwlist to get to v29? Seems like probably not. This also applies to Wicd; it doesn't list any wireless networks when I scan.

Anyone have any idea why I can't see any access points, while my wireless interface seems to be functional?

Other data:
Code:

# lsmod | grep wl
wl                  6436883  0
cfg80211              524168  1 wl

# iwconfig
lo        no wireless extensions.

eth1      IEEE 802.11abg  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated  Tx-Power=200 dBm 
          Retry short limit:7  RTS thr:off  Fragment thr:off
          Encryption key:off
          Power Management:off
         
eth0      no wireless extensions.


nini09 03-30-2017 02:56 PM

What's output of dmesg during boot-up for the WiFi card?

thethinker 03-31-2017 11:56 AM

Quote:

Originally Posted by nini09 (Post 5690471)
What's output of dmesg during boot-up for the WiFi card?

mmmm doens't seem to be anything useful, at least using the only way I think I know how to do that:

Code:

# dmesg | grep -iC 5 "wireless"
[  11.677587] [drm] Initialized i915 1.6.0 20151010 for 0000:00:02.0 on minor 0
[  11.737133] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2
[  12.013974] fbcon: inteldrmfb (fb0) is primary device
[  12.329102] wl: module license 'MIXED/Proprietary' taints kernel.
[  12.329103] Disabling lock debugging due to kernel taint
[  12.468280] eth1: Broadcom BCM4331 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)
[  12.498324] intel_rapl: Found RAPL domain package
[  12.498326] intel_rapl: Found RAPL domain core
[  12.498329] intel_rapl: Found RAPL domain uncore
[  12.533265] [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder A
[  12.533289] [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun


nini09 04-05-2017 02:55 PM

Yes, no useful information. You can remove and reload wireless module to find out exact message for the module.

thethinker 04-06-2017 09:56 AM

Quote:

Originally Posted by nini09 (Post 5693083)
Yes, no useful information. You can remove and reload wireless module to find out exact message for the module.

Ok how about this:
Code:

# modprobe -r wl
# modprobe wl
# dmesg |grep -iC 50 "wireless"
......
[  436.106594] cfg80211: World regulatory domain updated:
[  436.106601] cfg80211:  DFS Master region: unset
[  436.106603] cfg80211:  (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[  436.106607] cfg80211:  (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[  436.106611] cfg80211:  (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[  436.106614] cfg80211:  (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[  436.106617] cfg80211:  (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[  436.106619] cfg80211:  (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[  436.106622] cfg80211:  (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[  436.106624] cfg80211:  (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[  436.106628] cfg80211:  (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[  436.245866] eth1: Broadcom BCM4331 802.11 Hybrid Wireless Controller 6.30.223.271 (r587334)

Just booted back into Ubuntu to check how everything is working over there - which it does perfectly. I don't see any obvious settings which are not being set in Slackware (although I'm not entirely sure what I should be looking for).

nini09 04-06-2017 02:47 PM

WiFi region isn't set. WiFi handshake can't start. You can use following command to set region, USA. This is for reload. For boot-up, it is complex. You can try following command to make sure your WiFi card start working at first.

iw reg set US

thethinker 04-06-2017 03:53 PM

Quote:

Originally Posted by nini09 (Post 5693520)

iw reg set US

Wow that worked! I'll work on getting that set at startup, or maybe check out how Ubuntu does it since it seems to be automatic.

Thanks, that was certainly the problem.

limpingstone 09-13-2017 04:29 PM

I am currently using Slackware64 14.2 with Wicd v29.
I have the same allocation failed problem sometimes, and the command does not work for me.

Code:

iw reg set US
It did show me a list of stuff but also a bunch of unknown IEs.

And by the way, I don't have the wl module on my computer.

nini09 09-19-2017 02:15 PM

How do you know this is same problem?

thethinker 10-13-2017 08:24 PM

Quote:

Originally Posted by limpingstone (Post 5758532)
I am currently using Slackware64 14.2 with Wicd v29.
I have the same allocation failed problem sometimes, and the command does not work for me.

Code:

iw reg set US
It did show me a list of stuff but also a bunch of unknown IEs.

And by the way, I don't have the wl module on my computer.

I will add that although I marked this as "Solved", I don't consider it so. Maybe 80% of the time I have to find a wifi network, I have to do *something* else besides wicd. Occasionally "iw reg set US" works, sometimes just running "iw dev eth1 scan" works, but wicd often *first* replies with no wifi networks.

I read some things about iw being superior to iwlist and iwconfig for these kinds of things, so maybe it's just that wicd is running iwlist instead.

In any case, the problem is intermittent and fixable with a hack on my system.

JeffSilverman 10-19-2017 05:34 PM

iwlist scanning "Allocation failed" on working wireless device on Fedora 26
 
I think I am having a similar problem

Code:

[root@jeffs-laptop ~]# iwlist wlp12s0 scan
print_scanning_info: Allocation failed
[root@jeffs-laptop ~]# uname -a
Linux jeffs-laptop 4.13.4-200.fc26.x86_64 #1 SMP Thu Sep 28 20:46:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@jeffs-laptop ~]# cat /etc/fedora-release
Fedora release 26 (Twenty Six)
[root@jeffs-laptop ~]#
[root@jeffs-laptop ~]# lsmod
Module                  Size  Used by
vfat                  20480  1
fat                    65536  1 vfat
fuse                  102400  3
xt_CHECKSUM            16384  1
ipt_MASQUERADE        16384  3
nf_nat_masquerade_ipv4    16384  1 ipt_MASQUERADE
tun                    32768  1
rpcsec_gss_krb5        32768  0
auth_rpcgss            61440  1 rpcsec_gss_krb5
nfsv4                569344  0
dns_resolver          16384  1 nfsv4
nfs                  241664  1 nfsv4
lockd                  90112  1 nfs
grace                  16384  1 lockd
fscache                65536  2 nfsv4,nfs
nf_conntrack_netbios_ns    16384  1
nf_conntrack_broadcast    16384  1 nf_conntrack_netbios_ns
xt_CT                  16384  1
ip6t_rpfilter          16384  1
ip6t_REJECT            16384  2
nf_reject_ipv6        16384  1 ip6t_REJECT
xt_conntrack          16384  22
ip_set                36864  0
nfnetlink              16384  1 ip_set
ebtable_nat            16384  1
ebtable_broute        16384  1
bridge                143360  1 ebtable_broute
stp                    16384  1 bridge
llc                    16384  2 bridge,stp
ip6table_nat          16384  1
nf_conntrack_ipv6      20480  12
nf_defrag_ipv6        36864  1 nf_conntrack_ipv6
nf_nat_ipv6            16384  1 ip6table_nat
ip6table_mangle        16384  1
ip6table_raw          16384  1
ip6table_security      16384  1
iptable_nat            16384  1
nf_conntrack_ipv4      16384  16
nf_defrag_ipv4        16384  1 nf_conntrack_ipv4
nf_nat_ipv4            16384  1 iptable_nat
nf_nat                28672  3 nf_nat_ipv6,nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack          131072  11 nf_conntrack_ipv6,nf_conntrack_ipv4,ipt_MASQUERADE,nf_conntrack_broadcast,nf_conntrack_netbios_ns,xt_CT,nf_nat_ipv6,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
libcrc32c              16384  2 nf_conntrack,nf_nat
iptable_mangle        16384  1
iptable_raw            16384  1
iptable_security      16384  1
ebtable_filter        16384  1
ebtables              32768  3 ebtable_filter,ebtable_nat,ebtable_broute
ip6table_filter        16384  1
ip6_tables            28672  5 ip6table_mangle,ip6table_filter,ip6table_security,ip6table_raw,ip6table_nat
vboxpci                24576  0
vboxnetadp            28672  0
vboxnetflt            28672  0
vboxdrv              466944  3 vboxnetadp,vboxnetflt,vboxpci
sunrpc                331776  6 auth_rpcgss,rpcsec_gss_krb5,nfsv4,lockd,nfs
iTCO_wdt              16384  0
gpio_ich              16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
coretemp              16384  0
ppdev                  20480  0
kvm_intel            200704  0
mei_wdt                16384  0
kvm                  585728  1 kvm_intel
dell_rbtn              16384  0
dell_laptop            20480  0
dell_smm_hwmon        16384  0
uvcvideo              90112  0
videobuf2_vmalloc      16384  1 uvcvideo
irqbypass              16384  1 kvm
videobuf2_memops      16384  1 videobuf2_vmalloc
videobuf2_v4l2        24576  1 uvcvideo
videobuf2_core        40960  2 uvcvideo,videobuf2_v4l2
videodev              176128  3 uvcvideo,videobuf2_core,videobuf2_v4l2
media                  40960  2 uvcvideo,videodev
arc4                  16384  2
iwldvm                237568  0
mac80211              753664  1 iwldvm
dell_wmi              16384  0
dell_smbios            16384  2 dell_wmi,dell_laptop
dcdbas                16384  1 dell_smbios
sparse_keymap          16384  1 dell_wmi
joydev                20480  0
wmi_bmof              16384  0
iwlwifi              196608  1 iwldvm
snd_hda_codec_hdmi    49152  1
snd_hda_codec_idt      57344  1
snd_hda_codec_generic    73728  1 snd_hda_codec_idt
cfg80211              614400  3 iwlwifi,mac80211,iwldvm
snd_hda_intel          40960  7
i2c_i801              24576  0
snd_hda_codec        126976  4 snd_hda_intel,snd_hda_codec_idt,snd_hda_codec_hdmi,snd_hda_codec_generic
lpc_ich                24576  0
snd_hda_core          81920  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_idt,snd_hda_codec_hdmi,snd_hda_codec_generic
snd_hwdep              20480  1 snd_hda_codec
snd_seq                65536  0
snd_seq_device        16384  1 snd_seq
snd_pcm                98304  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
rfkill                28672  7 dell_laptop,dell_rbtn,cfg80211
tpm_tis                16384  0
snd_timer              32768  2 snd_seq,snd_pcm
acpi_als              16384  0
snd                    81920  24 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_hda_codec_idt,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_pcm
kfifo_buf              16384  1 acpi_als
tpm_tis_core          20480  1 tpm_tis
tpm                    53248  2 tpm_tis,tpm_tis_core
parport_pc            28672  0
shpchp                36864  0
parport                49152  2 parport_pc,ppdev
mei_me                40960  1
mei                  102400  3 mei_me,mei_wdt
industrialio          69632  2 acpi_als,kfifo_buf
acpi_cpufreq          20480  1
soundcore              16384  1 snd
binfmt_misc            20480  1
dm_crypt              36864  1
mmc_block              36864  2
nouveau              1638400  43
serio_raw              16384  0
sdhci_pci              28672  0
sdhci                  45056  1 sdhci_pci
firewire_ohci          40960  0
mmc_core              139264  3 sdhci,sdhci_pci,mmc_block
firewire_core          65536  1 firewire_ohci
mxm_wmi                16384  1 nouveau
i2c_algo_bit          16384  1 nouveau
drm_kms_helper        159744  1 nouveau
crc_itu_t              16384  1 firewire_core
ttm                    94208  1 nouveau
drm                  352256  33 nouveau,ttm,drm_kms_helper
e1000e                245760  0
ptp                    20480  1 e1000e
pps_core              20480  1 ptp
ata_generic            16384  0
pata_acpi              16384  0
wmi                    24576  4 dell_wmi,wmi_bmof,mxm_wmi,nouveau
video                  40960  3 dell_wmi,dell_laptop,nouveau
[root@jeffs-laptop ~]#
[root@jeffs-laptop ~]# dmesg | fgrep wl
[  18.781679] iwlwifi 0000:0c:00.0: can't disable ASPM; OS doesn't have ASPM control
[  18.792022] iwlwifi 0000:0c:00.0: loaded firmware version 8.83.5.1 build 33692 op_mode iwldvm
[  18.874449] iwlwifi 0000:0c:00.0: CONFIG_IWLWIFI_DEBUG enabled
[  18.874451] iwlwifi 0000:0c:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[  18.874452] iwlwifi 0000:0c:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
[  18.874454] iwlwifi 0000:0c:00.0: Detected Intel(R) Ultimate N WiFi Link 5300 AGN, REV=0x24
[  18.934569] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[  19.388087] iwlwifi 0000:0c:00.0 wlp12s0: renamed from wlan0
[  24.316146] IPv6: ADDRCONF(NETDEV_UP): wlp12s0: link is not ready
[  24.322588] iwlwifi 0000:0c:00.0: Radio type=0x0-0x2-0x0
[  24.472614] iwlwifi 0000:0c:00.0: Radio type=0x0-0x2-0x0
[  24.515984] IPv6: ADDRCONF(NETDEV_UP): wlp12s0: link is not ready
[  24.536587] iwlwifi 0000:0c:00.0: Radio type=0x0-0x2-0x0
[  24.686630] iwlwifi 0000:0c:00.0: Radio type=0x0-0x2-0x0
[  24.737159] IPv6: ADDRCONF(NETDEV_UP): wlp12s0: link is not ready
[  24.939714] IPv6: ADDRCONF(NETDEV_UP): wlp12s0: link is not ready
[  71.239668] iwlwifi 0000:0c:00.0: Radio type=0x0-0x2-0x0
[  71.392213] iwlwifi 0000:0c:00.0: Radio type=0x0-0x2-0x0
[  71.422262] IPv6: ADDRCONF(NETDEV_UP): wlp12s0: link is not ready
[  73.843068] wlp12s0: authenticate with 02:18:5a:1c:2f:31
[  73.873927] wlp12s0: send auth to 02:18:5a:1c:2f:31 (try 1/3)
[  73.928487] wlp12s0: authenticated
[  73.953906] wlp12s0: waiting for beacon from 02:18:5a:1c:2f:31
[  74.027024] wlp12s0: associate with 02:18:5a:1c:2f:31 (try 1/3)
[  74.031266] wlp12s0: RX AssocResp from 02:18:5a:1c:2f:31 (capab=0x1101 status=0 aid=12)
[  74.036399] wlp12s0: associated
[  74.036439] IPv6: ADDRCONF(NETDEV_CHANGE): wlp12s0: link becomes ready
[  74.128771] wlp12s0: Limiting TX power to 30 (30 - 0) dBm as advertised by 02:18:5a:1c:2f:31
[root@jeffs-laptop ~]#
[root@jeffs-laptop ~]# ip link show dev wlp12s0
3: wlp12s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 00:21:6a:53:14:10 brd ff:ff:ff:ff:ff:ff
[root@jeffs-laptop ~]# ip addr show dev wlp12s0
3: wlp12s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:21:6a:53:14:10 brd ff:ff:ff:ff:ff:ff
    inet 192.168.247.94/23 brd 192.168.247.255 scope global dynamic wlp12s0
      valid_lft 3893sec preferred_lft 3893sec
    inet6 fe80::a092:e36:5650:4103/64 scope link
      valid_lft forever preferred_lft forever
[root@jeffs-laptop ~]# ping linuxquestions.org -c 4
PING linuxquestions.org (75.126.162.205) 56(84) bytes of data.
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=1 ttl=52 time=66.4 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=2 ttl=52 time=68.4 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=3 ttl=52 time=61.7 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=4 ttl=52 time=64.6 ms

--- linuxquestions.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 61.799/65.337/68.441/2.470 ms
[root@jeffs-laptop ~]# route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
default        gateway        0.0.0.0        UG    600    0        0 wlp12s0
192.168.122.0  0.0.0.0        255.255.255.0  U    0      0        0 virbr0
192.168.246.0  0.0.0.0        255.255.254.0  U    600    0        0 wlp12s0
[root@jeffs-laptop ~]#

Now, as it happens, I am at a museum in downtown Seattle, and the number of networks is relatively large. I'm going to try this stunt later this evening at home where the number of networks is relatively small.


Thank you

Jeff

nini09 10-20-2017 02:40 PM

Quote:

[root@jeffs-laptop ~]# iwlist wlp12s0 scan
print_scanning_info: Allocation failed
Based on above information, it look like allocation has problem. But based on dmesg output, I don't see any issue. Link is up and ping can go through.
What's problem?

JeffSilverman 10-21-2017 12:08 AM

I expected to see a list of access points and the attributes of those access points.

For example, this is what I see when I am at home:

Code:

jeffs@jeffs-laptop:~ $ sudo iwlist wlp12s0 scan
sudo password for jeffs:
wlp12s0  Scan completed :
          Cell 01 - Address: 04:BF:6D:D9:8A:B5
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=55/70  Signal level=-55 dBm 
                    Encryption key:on
                    ESSID:"ZoopCentury"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=000003f6e589efa5
                    Extra: Last beacon: 139ms ago
                    IE: Unknown: 000B5A6F6F7043656E74757279
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 030101
                    IE: Unknown: 2A0100
                    IE: Unknown: 2F0100
...

                    IE: Unknown: 32040C121860
                    IE: Unknown: 2D1AAC181BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: 3D160B081500000000000000000000000000000000000000
                    IE: Unknown: 7F080000000000000040
                    IE: Unknown: DD180050F204104A00011010440001021049000600372A000120
                    IE: Unknown: DD090010180207000C0000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00

jeffs@jeffs-laptop:~ $
jeffs@jeffs-laptop:~ $ sudo iwlist wlp12s0 scan | fgrep Cell
          Cell 01 - Address: 04:BF:6D:D9:8A:B5
          Cell 02 - Address: 2C:59:E5:F0:00:40
          Cell 03 - Address: 60:31:97:25:90:0E
          Cell 04 - Address: 58:8B:F3:85:A0:1B
          Cell 05 - Address: 40:8B:07:AE:3C:D5
          Cell 06 - Address: 2E:24:81:DC:39:C5
          Cell 07 - Address: AC:9E:17:42:D9:A8
          Cell 08 - Address: 30:91:8F:89:B3:E9
          Cell 09 - Address: F4:F2:6D:6F:DC:24
          Cell 10 - Address: C4:EA:1D:87:A1:37
jeffs@jeffs-laptop:~ $ sudo iwlist wlp12s0 scan | wc -l
235
jeffs@jeffs-laptop:~ $

The difference is that there are way more than 10 APs at the museum (I didn't count them, my bad).

Thank you

Jeff

thethinker 10-29-2017 12:00 PM

I'm going to take the position that Wicd is probably using iwlist rather than iw to look for wireless connections, and therefore runs into some kind of memory allocation error as discussed here: https://bugs.archlinux.org/task/15363. There is a patch there for Arch, but I'd rather just use a different system to manage my wireless networks.

So I've simply switched to Network Manager on Slackware running XFCE. Remove Wicd:

Code:

removepkg wicd
Then make network manager executable and start it

Code:

chomd +x /etc/rc.d/rc.networkmanager
/etc/rc.d/rc.networkmanager start

When you connect to a network for the first time, you get an error, so just right click on the icon in the tray -> Edit connections first. Then you should be able to connect.

nini09 11-01-2017 02:46 PM

Hi JeffSilverman,

Based on your WiFi scan result, signal strength is good enough but noise is big. So signal quality is bad.


All times are GMT -5. The time now is 07:21 AM.