Eu encontrei um problema muito intrigante com o meu cartão WiFi no Ubuntu. Após a reinicialização, ele é sempre desativado e não há como voltar atrás, exceto suspender ou desligar o laptop. Status de acordo com o Network Manager é "dispositivo não está pronto". Isso ocorre de forma consistente.
Algumas informações do meu sistema:
- O laptop é o HP 350 G1.
- A placa WLAN é o infame Ralink RT3290. (Se eu soubesse quantos problemas eu teria com isso, eu nunca teria comprado).
- O Ubuntu é o último LTS 16.04, recentemente atualizado.
- O kernel é
4.4.9-040409-generic
(foi 4.4.0-22-generic
antes de atualizar da linha principal - sem diferença de WiFi).
Antes de atualizar a distro, eu estava usando uma versão do driver rt3290sta/2.6.0.0
(compilada da fonte e carregada via DKMS) que funcionava muito bem, mas não funciona com os kernels mais novos e parece abandonada de qualquer maneira. Então agora eu tive que reverter para rt2800
e ter esse problema desde então.
Esta parece ser uma questão muito antiga, mas recorrente. Eu li todos os tópicos que pude encontrar, mas até agora sem sorte. Felizmente, isso não é crítico para mim porque eu raramente reinicio, mas ainda é irritante e irritante, pelo menos.
Abaixo estão as saídas de alguns comandos que podem ser de interesse (este é o estado após a reinicialização):
lshw -c network
diz que a interface está desativada:
# lshw -c network
*-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:01:00.0
logical name: eth0
version: 10
serial: c4:34:6b:05:5f:ff
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:43 ioport:4000(size=256) memory:b2504000-b2504fff memory:b2500000-b2503fff
*-network DISABLED
description: Wireless interface
product: RT3290 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 00
serial: 00:71:cc:6b:fe:f1
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt2800pci driverversion=4.4.9-040409-generic firmware=0.37 latency=0 link=no multicast=yes wireless=IEEE 802.11bgn
resources: irq:17 memory:b2410000-b241ffff
*-network DISABLED
description: Ethernet interface
physical id: 1
logical name: virbr0-nic
serial: 52:54:00:e5:13:31
size: 10Mbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s
No entanto, rfkill list
não concorda:
# rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
# iwconfig
virbr0-nic no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
virbr0 no wireless extensions.
lo no wireless extensions.
Não podemos falar sobre isso:
# ifconfig wlan0 up
SIOCSIFFLAGS: Input/output error
dmesg
mostra alguns desses erros:
# dmesg
...
[ 27.648857] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 29.248929] ieee80211 phy0: rt2800_wait_wpdma_ready: Error - WPDMA TX/RX busy [0x00000068]
[ 29.248936] ieee80211 phy0: rt2800pci_set_device_state: Error - Device failed to enter state 4 (-5)
...
Finalmente, parte do syslog
que parece relevante para mim:
# cat /var/log/syslog | grep -i wlan
...
May 10 22:09:25 hp350g1 NetworkManager[820]: [1462910965.2639] devices added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/wlan0, iface: wlan0)
May 10 22:09:25 hp350g1 NetworkManager[820]: [1462910965.2639] device added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/wlan0, iface: wlan0): no ifupdown configuration found.
May 10 22:09:25 hp350g1 NetworkManager[820]: [1462910965.6626] (wlan0): using nl80211 for WiFi device control
May 10 22:09:25 hp350g1 NetworkManager[820]: [1462910965.6645] device (wlan0): driver supports Access Point (AP) mode
May 10 22:09:25 hp350g1 NetworkManager[820]: [1462910965.6813] manager: (wlan0): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/0)
May 10 22:09:25 hp350g1 NetworkManager[820]: [1462910965.6882] device (wlan0): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
May 10 22:09:25 hp350g1 kernel: [ 5.704724] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
May 10 22:09:29 hp350g1 NetworkManager[820]: [1462910969.0227] device (wlan0): supplicant interface state: init -> starting
May 10 22:09:32 hp350g1 wpa_supplicant[1339]: Could not set interface wlan0 flags (UP): Input/output error
May 10 22:09:32 hp350g1 wpa_supplicant[1339]: nl80211: Could not set interface 'wlan0' UP
May 10 22:09:32 hp350g1 wpa_supplicant[1339]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 10 22:09:35 hp350g1 wpa_supplicant[1339]: Could not set interface wlan0 flags (UP): Input/output error
May 10 22:09:35 hp350g1 wpa_supplicant[1339]: WEXT: Could not set interface 'wlan0' UP
May 10 22:09:35 hp350g1 wpa_supplicant[1339]: wlan0: Failed to initialize driver interface
May 10 22:09:35 hp350g1 NetworkManager[820]: [1462910975.4904] sup-iface[0x2450570,wlan0]: error adding interface: wpa_supplicant couldn't grab this interface.
May 10 22:09:35 hp350g1 NetworkManager[820]: [1462910975.4904] device (wlan0): supplicant interface state: starting -> down
May 10 22:09:46 hp350g1 NetworkManager[820]: [1462910986.0143] device (wlan0): re-acquiring supplicant interface (#1).
May 10 22:09:49 hp350g1 wpa_supplicant[1339]: Could not set interface wlan0 flags (UP): Input/output error
May 10 22:09:49 hp350g1 wpa_supplicant[1339]: nl80211: Could not set interface 'wlan0' UP
May 10 22:09:49 hp350g1 wpa_supplicant[1339]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 10 22:09:52 hp350g1 wpa_supplicant[1339]: Could not set interface wlan0 flags (UP): Input/output error
May 10 22:09:52 hp350g1 wpa_supplicant[1339]: WEXT: Could not set interface 'wlan0' UP
May 10 22:09:52 hp350g1 wpa_supplicant[1339]: wlan0: Failed to initialize driver interface
May 10 22:09:52 hp350g1 NetworkManager[820]: [1462910992.4485] sup-iface[0x24506d0,wlan0]: error adding interface: wpa_supplicant couldn't grab this interface.
... (after couple more tries)
May 10 22:11:00 hp350g1 NetworkManager[820]: [1462911060.4668] device (wlan0): supplicant interface state: starting -> down
May 10 22:11:00 hp350g1 NetworkManager[820]: [1462911060.4669] device (wlan0): supplicant interface keeps failing, giving up