netplan type wifis needs a device option

Bug #1814012 reported by Gordon Harris on 2019-01-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Steve Langasek (Ubuntu)

Bug Description

Some wifi adaptors need to use the -Ddrivername argument for wpa_supplicant to successfully associate with an AP.

The netplan yaml spec doesn't currently support an optional driver property for the wifis type.

For instance, here's my 01-netcfg.yaml:

  version: 2
  renderer: networkd
      dhcp4: no
      dhcp6: no
      addresses: []
        addresses: [,]
      optional: true
      dhcp4: no
      dhcp6: no
      addresses: []
          password: "mywpapsk"

This isn't currently enough to get the wifi interface to associate. I have to hand-edit:

/<email address hidden> include the proper driver name. E.g.:

ExecStart=/sbin/wpa_supplicant -c /run/netplan/wpa-%I.conf -i%I -Dnl80211

Once that edit has been made and systemctl daemon-reload run, the wifi interface associates.

It would be nice if netplan included a..

  driver: "drivername"

..option for the yaml file that would add the -Ddrivername to the unit file.

That's not quite the device, but a driver value though. I wonder if it wouldn't be best to either always set -Dnl80211 on wireless (and -Dwired for 802.1x on ethernet...), or to make it possible to use an alternative value if matching by driver.

For example:

      driver: wext
      name: wlan1
    dhcp4: yes

Changed in netplan:
status: New → Triaged
importance: Undecided → High
Changed in (Ubuntu):
status: New → Triaged
importance: Undecided → High

Triaged; we will need some input from Steve though to figure out how to addess this in the netplan schema.

It's Triaged High as it actually does potentially impact many devices. There are sadly still lots of devices that either don't do wext, or don't do nl80211, and maybe it wouldn't hurt to be explicit when enabling 802.1x on wired.

Changed in netplan:
assignee: nobody → Steve Langasek (vorlon)
Steve Langasek (vorlon) wrote :

What is the range of possible values for this -D option, and why would you ever want to specify it in the netplan yaml instead of inferring it?

Gordon Harris (wgordonharris) wrote :

Re range of possible values for -D option:

From man wpa_supplicant:

       A summary of available driver backends is below. Support for each of the driver backends is
       chosen at wpa_supplicant compile time. For a list of supported driver backends that may be used
       with the -D option on your system, refer to the help output of wpa_supplicant (wpa_supplicant -h).

       wext Linux wireless extensions (generic).

       wired wpa_supplicant wired Ethernet driver

              wpa_supplicant Broadcom switch driver

       bsd BSD 802.11 support (Atheros, etc.).

       ndis Windows NDIS driver.

from wpa_supplicant --help on my system:

  nl80211 = Linux nl80211/cfg80211
  wext = Linux wireless extensions (generic)
  wired = Wired Ethernet driver
  none = no driver (RADIUS server/WPS ER)

description: updated
Steve Langasek (vorlon) wrote :

I'm afraid I still don't understand from this why one would specify a -D option by hand

Gordon Harris (wgordonharris) wrote :

Here's one (e.g. my) case:

Asus AC1200 USB-AC53 Nano wifi adapter. No linux driver available from the manufacturer. But there are open-source drivers available that work well, but that require the -D parameter in order to be able to use wpa_supplicant.


This driver allows use of wpa_supplicant by using the nl80211 driver wpa_supplicant -Dnl80211

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

Other bug subscribers