Wi-fi only works after suspending.

Asked by satori

Right after booting (or running 'sudo network-manager restart'), the wi-fi is disabled until I suspend and come back. I wouldn't mind just suspending once every time I boot, but there's a compounding problem with suspend where the pc won't come back from it if I have the nvidia proprietary drivers installed.

This is the result of 'sudo lshw -C network; lsb_release -a; uname -a' while the wifi is disabled.

  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 10
       serial: 2c:56:dc:be:61:d2
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:127 ioport:d000(size=256) memory:df204000-df204fff memory:df200000-df203fff
  *-network DISABLED
       description: Wireless interface
       product: AR9462 Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0
       version: 01
       serial: 80:a5:89:6d:ed:3b
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=4.8.0-58-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:df100000-df17ffff memory:df180000-df18ffff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

Cheers.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Jeremy
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you log in and run:

sudo modprobe -r ath9k ; sleep 3; sudo modprobe ath9k

Does it work OK without suspending ?

Revision history for this message
satori (satorin) said :
#2

Nope, no change at all. It says "disabled by hardware switch" on the network manager (it's not)

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What is the output of

rfkill list

immediately after booting when wireless does not work?

Revision history for this message
satori (satorin) said :
#4

Immediately after booting:
1: phy0: Wireless LAN
 Soft blocked: yes
 Hard blocked: no
2: asus-wlan: Wireless LAN
 Soft blocked: yes
 Hard blocked: no
3: asus-bluetooth: Bluetooth
 Soft blocked: yes
 Hard blocked: no

after suspending, with wifi working:

1: phy0: Wireless LAN
 Soft blocked: no
 Hard blocked: no
2: asus-wlan: Wireless LAN
 Soft blocked: no
 Hard blocked: no
3: asus-bluetooth: Bluetooth
 Soft blocked: yes
 Hard blocked: no
6: hci0: Bluetooth
 Soft blocked: no
 Hard blocked: no

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Reboot and run:

sudo rfkill unblock all

Revision history for this message
Jeremy (wa113y3s) said :
#6

What make and model computer?
If it isn't an ASUS, in terminal do

echo "blacklist asus-wmi" | sudo tee /etc/modprobe.d/blacklist-asus.conf

Reboot

Revision history for this message
satori (satorin) said :
#7

It is an ASUS K501UX laptop.

rfkill unblock all makes the flight mode light come on, and it still acts blocked even if I turn it off. "wi-fi is blocked by hardware switch" and phy0 hard blocked on rfkill list.

I'm going to make another question for the suspend problem, as if that's solved then this is just a minor inconvenience. Thank you for the help so far.

Revision history for this message
Best Jeremy (wa113y3s) said :
#8

Ok try

echo "options asus_nb_wmi wapf=4" | sudo tee /etc/modprobe.d/asus-nb-wmi.conf

Reboot

Revision history for this message
satori (satorin) said :
#9

That did it, thank you very much.

Revision history for this message
satori (satorin) said :
#10

Thanks Jeremy, that solved my question.