g.k*_*tev 6 wireless ralink wpa-supplicant
我的 WiFi 卡在 Ubuntu 上遇到了一个非常令人费解的问题。重新启动后,它始终处于禁用状态,除了暂停或关闭笔记本电脑外,无法将其恢复。根据网络管理器的状态是“设备未准备好”。这种情况一直发生。
我的系统的一些背景:
4.4.9-040409-generic
(4.4.0-22-generic
在从主线升级之前 - 与 WiFi 没有区别)。在升级发行版之前,我使用了一个版本的rt3290sta/2.6.0.0
驱动程序(从源代码编译并通过 DKMS 加载),该版本的性能大多很好,但它不适用于较新的内核,而且似乎已经被放弃了。所以现在我不得不恢复rt2800
并从那时起遇到这个问题。
这似乎是一个非常古老但反复出现的问题。我通读了我能找到的所有线程,但到目前为止还没有运气。幸运的是,这对我来说并不重要,因为我很少重新启动,但至少它仍然很烦人和令人烦恼。
以下是一些可能感兴趣的命令的输出(这是重新启动后的状态):
lshw -c network
说接口被禁用:
# 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
Run Code Online (Sandbox Code Playgroud)
但是,rfkill list
不同意:
# rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
Run Code Online (Sandbox Code Playgroud)
# 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.
Run Code Online (Sandbox Code Playgroud)
但是我们不能提出来:
# ifconfig wlan0 up
SIOCSIFFLAGS: Input/output error
Run Code Online (Sandbox Code Playgroud)
dmesg
显示了以下几个错误:
# 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)
...
Run Code Online (Sandbox Code Playgroud)
最后,其中一部分syslog
看起来与我有关:
# 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
Run Code Online (Sandbox Code Playgroud)
驱动程序 rt2800pci 需要从设备卸载固件,该固件在重新启动期间仍然存在。在 Ubuntu 16.04 中,在重新启动之前,您需要执行以下命令:
sudo rmmod rt2800pci
Run Code Online (Sandbox Code Playgroud)
然后重新启动。
为了自动执行重启任务,请创建一个包含/etc/init.d/rt3290removedriver
以下内容的 shell 脚本:
sudo rmmod rt2800pci
Run Code Online (Sandbox Code Playgroud)
然后使用命令更新脚本
sudo update-rc.d rt3290removedriver defaults
Run Code Online (Sandbox Code Playgroud)
你就完成了。将脚本中的 youruser 替换为您的用户名。在配备 Ubuntu 16.04 和 rt3290 wifi pci 卡的 HP Pavilion 上进行了测试。
归档时间: |
|
查看次数: |
26410 次 |
最近记录: |