# wpa_supplicant: Could not set interface wlan0 flags

## zeroth

```
helios caibbor # /etc/init.d/wpa_supplicant start

* Caching service dependencies...                                                             [ ok ]

* Starting WPA Supplicant Daemon...

Could not set interface wlan0 flags: No such file or directory

Failed to initialize driver interface

* start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'

* Failed to start wpa_supplicant                                                              [ !! ]

* ERROR: wpa_supplicant failed to start

helios caibbor # 
```

I've googled this and can't find the same error anywhere.

I'm wondering if there's just some directory missing, or if this is a kernel thing, something missing in /sys or such... though I haven't recompiled any kernels since I last had this working.

what seemed to break it was an 'emerge --depclean', after carefully selecting which deps to remove. I did a revdep-rebuild directly afterward, including an emerge -Dutv system and emerge -Dutv world

the only other thing that I notice which broke was my ecomorph compositing with e17, though I doubt that's relevant.

----------

## d2_racing

Hi, can you post this :

```

# emerge --info

# lspci -n

# ifconfig -a

# iwconfig

```

----------

## zeroth

```
helios caibbor # emerge --info

--- Invalid atom in /etc/portage/package.unmask: games-fps/cube-20050829

--- Invalid atom in /etc/portage/package.unmask: =dev-db/sqlite-3.6.2 ~* # dep for firefox

Error during set creation: Redefinition of set 'enlightenment' (sections: 'usersets', 'enlightenment-niifaq sets')

Portage 2.2_rc33 (default/linux/x86/10.0, gcc-4.4.2, glibc-2.11-r1, 2.6.32-gentoo-r2 i686)

=================================================================

System uname: Linux-2.6.32-gentoo-r2-i686-Intel-R-_Core-TM-2_Duo_CPU_P8400_@_2.26GHz-with-gentoo-2.0.1

Timestamp of tree: Sat, 06 Feb 2010 20:15:01 +0000

app-shells/bash:     4.0_p37

dev-java/java-config: 1.3.7-r1, 2.1.10

dev-lang/python:     2.4.6, 2.5.4-r4, 2.6.4-r1, 3.1.1-r1

dev-util/cmake:      2.8.0-r2

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.0-r1

sys-apps/sandbox:    2.2

sys-devel/autoconf:  2.13, 2.65

sys-devel/automake:  1.5-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20

sys-devel/gcc:       4.1.2, 4.3.4, 4.4.2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86 ~x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -pipe -march=i686"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe -march=i686"

DISTDIR="/usr/portage/distfiles"

FEATURES="collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirrors.cs.wmich.edu/gentoo/ ftp://lug.mtu.edu/gentoo/"

LANG="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/portage/local/layman/pcsx2 /usr/portage/local/layman/sabayon /usr/portage/local/layman/kde /usr/portage/local/layman/sunrise /usr/portage/local/layman/mozilla /usr/portage/local/layman/enlightenment /usr/portage/local/layman/games /usr/portage/local/layman/enlightenment-niifaq /usr/portage/local/zeroth /usr/portage/local/layman/sunrise /usr/portage/local/layman/games /usr/portage/local/layman/enlightenment /usr/portage/local/layman/enlightenment-niifaq /usr/portage/local/layman/mozilla /usr/portage/local/layman/pcsx2"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="X aac acl acpi akode alsa apache apache2 arts asf audacious bash-completion berkdb bzip2 cdparanioa cdr cli cracklib crypt css cups cxx dbus doomsday dri dv dvd dvdr dvdread ethereal ffmpeg firefox flac fortran gdbm gif gnutls gsm gtk gtk2 hal iconv jack jpeg kde lame logitech-mouse mad midi mikmod mmx modules mp3 mp4 mpeg mudflap musepack mysql ncurses networkmanager nls nptl nptlonly nvidia ogg oggvorbis openal opengl openmp pam pcmcia pcre pda pdf perl php png pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection samba scanner sdl session speex spell spl sse sse2 sse3 ssl ssse3 sysfs tcpd theora tiff timidity truetype unicode usb vorbis webdav webdav-neon webdav-serf wifi win32codecs wireshark wma wmf wmv x86 xcomposite xine xinerama xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

helios caibbor # lspci -n

00:00.0 0600: 8086:2a40 (rev 07)

00:01.0 0604: 8086:2a41 (rev 07)

00:1a.0 0c03: 8086:2937 (rev 03)

00:1a.1 0c03: 8086:2938 (rev 03)

00:1a.2 0c03: 8086:2939 (rev 03)

00:1a.7 0c03: 8086:293c (rev 03)

00:1b.0 0403: 8086:293e (rev 03)

00:1c.0 0604: 8086:2940 (rev 03)

00:1c.1 0604: 8086:2942 (rev 03)

00:1c.2 0604: 8086:2944 (rev 03)

00:1c.5 0604: 8086:294a (rev 03)

00:1d.0 0c03: 8086:2934 (rev 03)

00:1d.1 0c03: 8086:2935 (rev 03)

00:1d.2 0c03: 8086:2936 (rev 03)

00:1d.7 0c03: 8086:293a (rev 03)

00:1e.0 0604: 8086:2448 (rev 93)

00:1f.0 0601: 8086:2917 (rev 03)

00:1f.2 0106: 8086:2929 (rev 03)

01:00.0 0300: 10de:062b (rev a1)

03:00.0 0280: 8086:4232

06:00.0 0200: 10ec:8168 (rev 02)

07:01.0 0c00: 1180:0832 (rev 05)

07:01.1 0805: 1180:0822 (rev 22)

07:01.2 0880: 1180:0843 (rev 12)

07:01.3 0880: 1180:0592 (rev 12)

07:01.4 0880: 1180:0852 (rev 12)

helios caibbor # ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:23:54:24:bc:2b  

          inet addr:192.168.0.198  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::223:54ff:fe24:bc2b/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:5859 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5798 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:4637230 (4.4 MiB)  TX bytes:895008 (874.0 KiB)

          Interrupt:25 Base address:0x4000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:36 errors:0 dropped:0 overruns:0 frame:0

          TX packets:36 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:2176 (2.1 KiB)  TX bytes:2176 (2.1 KiB)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:21:5d:0e:e3:3c  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

helios caibbor # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  Mode:Managed  Access Point: Not-Associated   

          Tx-Power=15 dBm   

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          

sit0      no wireless extensions.

helios caibbor # 
```

----------

## d2_racing

Can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i kill

# cat .config | grep -i 802

# cat .config | grep -i iwl

```

```

# iwlist scan

# dmesg | tail

```

```

# qlist -ICv iwl

# cat /etc/conf.d/net

# rc-update show

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## zeroth

```
# CONFIG_VLAN_8021Q is not set

# CONFIG_IEEE802154 is not set

CONFIG_CFG80211=y

# CONFIG_NL80211_TESTMODE is not set

# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set

# CONFIG_CFG80211_REG_DEBUG is not set

CONFIG_CFG80211_DEFAULT_PS=y

CONFIG_CFG80211_DEFAULT_PS_VALUE=1

# CONFIG_CFG80211_DEBUGFS is not set

CONFIG_LIB80211=y

# CONFIG_LIB80211_DEBUG is not set

CONFIG_MAC80211=y

CONFIG_MAC80211_RC_MINSTREL=y

# CONFIG_MAC80211_RC_DEFAULT_PID is not set

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

CONFIG_WLAN_PRE80211=y

CONFIG_WLAN_80211=y

# CONFIG_MAC80211_HWSIM is not set

helios linux # cat .config | grep -i iwl 

CONFIG_IWLWIFI=y

CONFIG_IWLWIFI_LEDS=y

# CONFIG_IWLWIFI_SPECTRUM_MEASUREMENT is not set

# CONFIG_IWLWIFI_DEBUG is not set

CONFIG_IWLAGN=y

# CONFIG_IWL4965 is not set

CONFIG_IWL5000=y

# CONFIG_IWL3945 is not set

helios linux # iwlist scan 

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wlan0     Interface doesn't support scanning : Network is down

sit0      Interface doesn't support scanning.

helios linux # dmesg | tail 

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-2.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-1.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-1.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: Could not read microcode: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-2.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-1.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-1.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: Could not read microcode: -2

helios linux # dmesg | tail  -c 50

iwlagn 0000:03:00.0: Could not read microcode: -2

helios linux # dmesg | tail  -n 50

ata5.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA

ata5.00: configured for UDMA/133

scsi 4:0:0:0: Direct-Access     ATA      WDC WD5000BEVT-7 01.0 PQ: 0 ANSI: 5

sd 4:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)

sd 4:0:0:0: [sdb] Write Protect is off

sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00

sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

sd 4:0:0:0: Attached scsi generic sg2 type 0

 sdb: sdb1 sdb2

sd 4:0:0:0: [sdb] Attached SCSI disk

ata6: SATA link down (SStatus 0 SControl 300)

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with writeback data mode.

VFS: Mounted root (ext3 filesystem) readonly on device 8:7.

Freeing unused kernel memory: 376k freed

udev: starting version 151

nvidia: module license 'NVIDIA' taints kernel.

Disabling lock debugging due to kernel taint

nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

nvidia 0000:01:00.0: setting latency timer to 64

NVRM: loading NVIDIA UNIX x86 Kernel Module  190.53  Tue Dec  8 18:51:41 PST 2009

EXT3 FS on sda7, internal journal

kjournald starting.  Commit interval 5 seconds

EXT3-fs warning: maximal mount count reached, running e2fsck is recommended

EXT3 FS on sdb1, internal journal

EXT3-fs: mounted filesystem with writeback data mode.

r8169: eth0: link up

r8169: eth0: link up

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-2.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-1.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-1.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: Could not read microcode: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-2.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-1.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-1.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: Could not read microcode: -2

Adding 4996172k swap on /dev/sda6.  Priority:-1 extents:1 across:4996172k 

eth0: no IPv6 routers present

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-2.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-1.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-1.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: Could not read microcode: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-2.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-2.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: firmware: requesting iwlwifi-5000-1.ucode

iwlagn 0000:03:00.0: iwlwifi-5000-1.ucode firmware file req failed: -2

iwlagn 0000:03:00.0: Could not read microcode: -2

helios linux # qlist -ICv iwl 

helios linux # cat /etc/conf.d/net 

#This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

dns_domain_lo="zeroth"

#config_eth0=( "" )

#dns_servers_wlan0="192.168.0.1"

#config_wlan0=( "192.168.0.198 brd 192.168.0.255 netmask 255.255.255.0" )

#routes_eth0=( "default via 192.168.0.1" )

# Prefer wpa_supplicant over wireless-tools

modules=( "wpa_supplicant" )

# It's important that we tell wpa_supplicant which driver we should

# be using as it's not very good at guessing yet

#wpa_supplicant_eth0="-Dmadwifi"

helios linux # rc-update show

          consolefont |                                    boot       

                samba |                  default                      

           localmount |                                    boot       

                local |                  default nonetwork            

        device-mapper |                                    boot       

   zeroth_touchpadled |                                    boot       

 zeroth_logitech_mouse |                  default                      

               sysctl |                                    boot       

                 fsck |                                    boot       

             bootmisc |                                    boot       

                 sshd |                  default                      

                dmesg |          sysinit                              

                 root |                                    boot       

            savecache | shutdown                                      

               net.lo |                                    boot       

                  vnc |                  default                      

              hwclock |                                    boot       

           vixie-cron |                  default                      

            killprocs | shutdown                                      

                devfs |          sysinit                              

             netmount |                  default                      

              modules |                                    boot       

              privoxy |                  default                      

         termencoding |                                    boot       

       udev-postmount |                  default                      

              urandom |                                    boot       

                 swap |                                    boot       

               procfs |                                    boot       

                 hald |                  default                      

          zeroth_oled |                                    boot       

                 udev |          sysinit                              

        zeroth_tweaks |                  default                      

              keymaps |                                    boot       

             iptables |                  default                      

             mount-ro | shutdown                                      

             hostname |                                    boot       

                  xdm |                  default                      

                 mtab |                                    boot       

helios linux # cat /etc/wpa_supplicant/wpa_supplicant.conf

# The below line not be changed otherwise we refuse to work

ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers

network={

  ssid="edited"

  psk="edited"

  proto=WPA2

  key_mgmt=WPA-PSK

  pairwise=CCMP

#  group=CCMP TKIP WEP104 WEP40

  # The higher the priority the sooner we are matched

  priority=5

}

```

----------

## zeroth

got quite a few cfgs to deal with, doing that now.

----------

## d2_racing

Hi, you need to install this :

```

# emerge -v net-wireless/iwl5000-ucode

```

After that reboot your box and post this :

```

# iwconfig

# iwlist scan

# dmesg | tail 

```

----------

## d2_racing

For the record, I use this :

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

   ssid="my_SSID"

   psk="my_PASSPHRASE"

   proto=WPA2

   key_mgmt=WPA-PSK

   pairwise=CCMP

   group=CCMP

   priority=5

}

```

And my /etc/conf.d/net is this :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

----------

## zeroth

it works again. thank you kindly.

----------

## d2_racing

Nice  :Razz: 

----------

## jody

Hi

I've got the same symptoms as zeroth, but i have different Wireless card (Centrino Advanced-N 6235),

for which i found out i had to install 'net-wireless/iwl6030-ucode'.

With iwconfig i see wlan0:

```
jody@raven ~ $ /sbin/iwconfig

lo        no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:off/any  

          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Power Management:off

          

eth0      no wireless extensions.

```

My /etc/conf.d/net:

```
modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext"

config_wlan0="dhcp"

auto_wlan0="true"

auto_eth0="true"

config_eth0="192.168.1.29/24"

routes_eth0="default via 192.168.1.1"

enable_ipv6="false"

dns_domain_lo="home"

dns_servers_eth0="192.168.1.1"

```

My /etc/wpa_supplicant/wpa_supplicant.conf:

```
ctrl_interface_group=0

ap_scan=1

ctrl_interface=/var/run/wpa_supplicant

network={

   priority=5

   ssid="idastrasse"

   psk="not_telling:)"

}

```

When i start net.wlano or wpa_supplicant i get the errors zeroth had reported, too:

```
raven jody # /etc/init.d/net.wlan0 start

 * Bringing up interface wlan0

 *   Starting wpa_supplicant on wlan0 ...

Could not set interface wlan0 flags: Input/output error

Failed to initialize driver interface

 *   start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'       [ !! ]

 * ERROR: net.wlan0 failed to start

raven jody # /etc/init.d/wpa_supplicant start

 * Starting WPA Supplicant Daemon ...

Could not set interface wlan0 flags: Input/output error

Failed to initialize driver interface

 * start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant'

 * Failed to start wpa_supplicant                                        [ !! ]

 * ERROR: wpa_supplicant failed to start

```

Can anybody help me here?

Thank You

  Jody

----------

