I had this TP-LINK TL-WN722N working on previous versions of ubuntu. 17.04 is a clean install and Wifi connection is not kept.

I can click on connect and it tries to connect but then I get a message saying wireless is disconnected.

sudo modprobe ath9k_htc returns nothing

$ iwconfig
bnep0     no wireless extensions.

wlx10feed20305c  IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

eno1      no wireless extensions.

lo        no wireless extensions.

$ lsusb
Bus 002 Device 005: ID 0b05:179c ASUSTek Computer, Inc.
Bus 002 Device 004: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 002 Device 003: ID 177f:0250 Sweex
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 004: ID 046d:c05b Logitech, Inc. M-U0004 810-001317 [B110 Optical USB Mouse]
Bus 005 Device 003: ID 413c:2010 Dell Computer Corp. Keyboard
Bus 005 Device 002: ID 413c:1003 Dell Computer Corp. Keyboard Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0bda:0136 Realtek Semiconductor Corp.
Bus 001 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


$ dmesg |  grep -e wlan -e ath9k
[    8.492093] usb 1-1.1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[    8.492104] usbcore: registered new interface driver ath9k_htc
[    8.781521] usb 1-1.1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[    9.033804] ath9k_htc 1-1.1:1.0: ath9k_htc: HTC initialized with 33 credits
[    9.303670] ath9k_htc 1-1.1:1.0: ath9k_htc: FW Version: 1.4
[    9.303672] ath9k_htc 1-1.1:1.0: FW RMW support: On
[    9.313272] ath9k_htc 1-1.1:1.0 wlx10feed20305c: renamed from wlan0
[  873.694860] usb 1-1.1: ath9k_htc: USB layer deinitialized
[ 1163.949779] usb 1-1.1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 1164.236649] usb 1-1.1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[ 1164.488920] ath9k_htc 1-1.1:1.0: ath9k_htc: HTC initialized with 33 credits
[ 1164.757511] ath9k_htc 1-1.1:1.0: ath9k_htc: FW Version: 1.4
[ 1164.757514] ath9k_htc 1-1.1:1.0: FW RMW support: On
[ 1164.769568] ath9k_htc 1-1.1:1.0 wlx10feed20305c: renamed from wlan0

[UPDATE]

$ dpkg -l network-manager
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                         Version                     Architecture                Description
+++-============================================-===========================-===========================-==============================================================================================
ii  network-manager                              1.4.4-1ubuntu3              amd64                       network management framework (daemon and userspace tools)

[/UPDATE]

  • Please edit the output of dpkg -l network-manager into your post as this may be related to a bug with new mac address randomization. Thank you for helping us help you! – Elder Geek Apr 14 '17 at 14:05
  • There is an open bug for this problem – mata May 2 '17 at 15:09

I had a similar problem updating from 16.10 to 17.04. The Problem was solved by adding the following lines to /etc/NetworkManager/NetworkManager.conf and then restarting the computer.

[device]

wifi.scan-rand-mac-address=0

  • This worked for me but I would like to help Elder Geek and community to find and fix a possible bug – rojanu Apr 14 '17 at 21:49
  • Typically recommended fix of compiling backports and reinstalling firmware didn't work for me: 'make' always failed. But this fix has worked perfectly, thank you very much. – Antonio Sánchez May 15 '17 at 10:54
  • Worked on my machine as well. – ubuntico Oct 25 '17 at 9:10

I was facing similar issue after upgrading from 16.10 to 17.04. It is likely that this is happening because your device's MAC address is being randomised automatically. You can verify that by checking your MAC address using the ifconfig command (if you remembered the original address).

How to fix:

Add the following line to /etc/NetworkManager/NetworkManager.conf:

[device]
...
wifi.scan-rand-mac-address=0

Now save the file and restart network manager using:

sudo systemctl restart network-manager

Now reboot.

  • props for mentioning that network manager needs to be restarted! – Ratul Jul 4 '17 at 5:09
  • I did not have to restart. It worked after these commands sudo systemctl restart network-manager and sudo systemctl restart network-manager.service – ubuntico Oct 25 '17 at 9:11

protected by Community Nov 27 '17 at 9:01

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.