[Trusty] hostapd package is broken

Bug #1289047 reported by Michael Murphy
304
This bug affects 64 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Invalid
High
Unassigned
wpa (Ubuntu)
Invalid
High
Unassigned
Nominated for Trusty by Alberto Salvia Novella

Bug Description

When trying to create an access point, I am met with a fatal error with hostapd:

nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started

What worked before no longer works today after a package upgrade.

After installing hostapd deb from Ubuntu 13.10, it works.

WORKAROUND: For this to persist through reboots, execute the following in a terminal:
sudo nano /etc/NetworkManager/NetworkManager.conf

Add the following entry where the x's are replaced with your WiFi MAC address, save, and then reboot:
[keyfile]
unmanaged-devices=mac:xx:xx:xx:xx:xx:xx

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: hostapd 1:2.1-0ubuntu1
Uname: Linux 3.14.0-031400rc5-lowlatency x86_64
ApportVersion: 2.13.2-0ubuntu5
Architecture: amd64
Date: Thu Mar 6 16:57:20 2014
InstallationDate: Installed on 2014-02-01 (33 days ago)
InstallationMedia: Kubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140121.1)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 LANGUAGE=en_CA:en
 SHELL=/bin/bash
SourcePackage: wpa
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Michael Murphy (mmstick) wrote :
Michael Murphy (mmstick)
summary: - [Trusty Packaging Bug] nl80211 could not configure driver mode
+ [Trusty] hostapd package is broken
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wpa (Ubuntu):
status: New → Confirmed
Revision history for this message
Kootee (kootee) wrote :

Is there any mode to disable upgrading this package from 13.10 (which works for me too)? I mean when i use "sudo apt-get upgrade" it upgrades this package to 1:2.1 version, which doesn't work (surely bugged).

I get the same result on new version from hostapd:
nl80211: Could not configure driver mode
nl80211 driver initialization failed.

Revision history for this message
Kootee (kootee) wrote :

Ok, I've found it. If anyone need stop upgrading by apt, you must use "sudo apt-mark hold hostapd". ( For other update managers etc, see here: http://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package )

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

It has a severe impact on a large portion of Ubuntu users.

Changed in wpa (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Ezmer DeKleaner (edekleaner) wrote :

Interestingly it appears that now the driver (vers 2.1) does something with error, and before it ignored it.

a solution (in desktop cases) is to do following to release resource.. then hostapd has no error....

sudo nmcli nm wifi off
sudo rfkill unblock wlan

this info has been gleaned from https://bbs.archlinux.org/viewtopic.php?pid=1221799

Revision history for this message
Mehdi Hassanpour (mehdi) wrote :

Simple workaround is to downgrade/re-install the package to saucy version which is hostapd_1.0-3ubuntu2.1_i386.deb...

Revision history for this message
Bruno Medeiros (brunojcm) wrote :

> sudo nmcli nm wifi off
> sudo rfkill unblock wlan

It works on Ubuntu 14.04! My complete script to set the AP up now is:

    sudo nmcli nm wifi off
    sudo rfkill unblock wlan

    sudo ifconfig wlan0 10.15.0.1/24 up
    sleep 1
    sudo service isc-dhcp-server restart
    sudo service hostapd restart

Revision history for this message
Sergio Benjamim (sergio-br2) wrote :

I'm using ap-hotspot (script that use hostapd), and with the older package from saucy i can see mon.wlan0 when type ifconfig. With this new package, there is no mon.wlan0. Is it a new behavior or a bug?

Revision history for this message
Michael Murphy (mmstick) wrote :

This new package has a bug that completely broke it, so the reason you can't see it is because the package doesn't even work.

Revision history for this message
C.Lee Taylor (leenx-leet) wrote :

Using U13.10 package, but would like to help if can with debugging or test packages.

Revision history for this message
Joni-Pekka Kurronen (joni-kurronen) wrote :

hi,

Upgraded from 12.04 to 14.04 and lost wlan0,...
but problem was at configuration, I forget from interfaces,

iface wlan0 inet manual
        pre-up iw dev wlan0 set type __ap
        hostapd /etc/hostapd/hostapd.conf

two last lines !

my hostapd.conf :

interface=wlan0
bridge=br0
driver=nl80211
macaddr_acl=1
accept_mac_file=/etc/hostapd.accept
ssid=HARASOO
hw_mode=g
channel=3
wpa=2
wpa_passphrase=xXXxxXXXx
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
wpa_ptk_rekey=600

I have 1USD chines wifi ship's at all machines and
creating 4 wifi hotspots's that brideg giganet.
Manual so can ifup wlan0 and ifdown wlan0
at cron,...

Revision history for this message
Joni-Pekka Kurronen (joni-kurronen) wrote :

I have still one machien not solved,...

Changed in wpa (Ubuntu):
importance: Critical → High
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → High
Changed in wpa (Ubuntu):
status: Confirmed → Triaged
Changed in hundredpapercuts:
status: Confirmed → Triaged
penalvch (penalvch)
description: updated
Revision history for this message
god (humper) wrote :

So what's the proper workaround for 14.04 to automatically start hostapd on boot?
Do I have to put smth into /etc/network/interfaces? Or disable interface in NetworkManager.conf?

Revision history for this message
Andrea Olivo (andryandrew) wrote :

I'm on 15.04 and the bug persists. The workarounds still work but the syntax for nmcli has become:

sudo nmcli radio wifi off

Instead of

sudo nmcli nm wifi off

Is there hope for a bugfix soon?

Revision history for this message
Phil (ph35sm) wrote :

Hello,

Is there any news (ie correction) with the latest ubuntu version 15.04 or 15.10?
Thanks - Phil.

Revision history for this message
Andrea Olivo (andryandrew) wrote :

Still present in 15.10.

Using a previous version of hostapd is not a valid workaround.

Revision history for this message
kenn (whatnext) wrote :

It's unbelievable to see that the buggy package ist still in repo and no fix has proposed yet!

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

I am still using the pinned-down version hostapd_1.0-3ubuntu2.1 which (seems to) work. If anyone lands here and it's stuck with the bug, here: http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html you have the instruction on how to get it working.

Having it fixed for good would be nice, but the workaround does work, at least last time I checked.

tags: added: xenial
Revision history for this message
Andrej Shadura (andrew.sh) wrote :

You can't have the same device managed by both hostapd and network-manager.

Changed in wpa (Ubuntu):
status: Triaged → Invalid
Changed in hundredpapercuts:
status: Triaged → Invalid
Revision history for this message
Heiri (phlomos) wrote :

I don't have NetworkManager installed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.