“无法设置接口 wlan0 标志(UP):输入/输出错误”RT3290

“无法设置接口 wlan0 标志(UP):输入/输出错误”RT3290

我在 Ubuntu 上遇到了一个非常令人费解的 WiFi 卡问题。重启后它总是被禁用,除了暂停或关闭笔记本电脑外没有其他方法可以恢复。根据网络管理器显示的状态为“设备未就绪”。这种情况一直发生。

关于我的系统的一些背景信息:

  • 该笔记本电脑是 HP 350 G1。
  • WLAN 卡是臭名昭著的 Ralink RT3290。(如果我知道它会给我带来这么多麻烦,我就不会买它了)。
  • Ubuntu 最新的是 LTS 16.04,最近升级了。
  • 内核是4.4.9-040409-generic4.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

但是,rfkill list不同意:

# 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.

但我们不能提起这件事:

# ifconfig wlan0 up
SIOCSIFFLAGS: Input/output error

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)
...

最后,其中一部分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

答案1

rt2800pci 驱动程序需要从设备中卸载固件,该固件在重启期间仍然存在。在 Ubuntu 16.04 中,在重启之前,您需要执行以下命令:

sudo rmmod rt2800pci

然后重新启动。

为了自动执行重启任务,请创建一个/etc/init.d/rt3290removedriver包含以下内容的 shell 脚本:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          skeleton
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Example initscript
# Description:       This file should be used to construct scripts to be
#                    placed in /etc/init.d.  This example start a
#                    single forking daemon capable of writing a pid
#                    file.  To get other behavoirs, implemend
#                    do_start(), do_stop() or other functions to
#                    override the defaults in /lib/init/init-d-script.
### END INIT INFO

# /etc/init.d/rt3290removedriver

case "$1" in
   start)
       echo "Removal of driver rt2800pci success" > /home/youruser/rt2800pci.txt
       echo "Power Down" 
   ;;
   stop)
       rmmod rt2800pci
       echo "Removal of driver rt2800pci success" > /home/youruser/rt2800pci.txt
       echo "Power Down"
       exit 1
   ;;
   *)
       rmmod rt2800pci
       echo "Removal of driver rt2800pci success" > /home/youruser/rt2800pci.txt
       echo "Power Down"
       exit 1
   ;;
esac
exit 0

然后使用命令更新脚本

sudo update-rc.d rt3290removedriver defaults

您已完成。将脚本中的 youruser 替换为您的用户名。在装有 Ubuntu 16.04 和 rt3290 wifi pci 卡的 HP Pavilion 上进行了测试。

答案2

如果您有 Windows 双启动,请尝试加载 Windows 然后返回 Ubuntu。在某些笔记本电脑上,Windows 往往会覆盖 BIOS 设置。

我的 ProBook 4540s 也遇到了同样的问题,这个解决了它。

当我在装有 Ubuntu 14.04 的 Live USB 上加载时,我开始怀疑。我在网络管理器菜单中看到了与安装的 16.04 相同的消息。

答案3

无法让它工作。找到解决方案:

http://www.mediafire.com/download/zyfql95clzs24z0/RT3290_u16.tar.gz

sudo ifconfig -a

将列出所有可用的以太网接口。现在通过以下方式激活您的 WIFI 接口:

sudo ifconfig interface-name up

作者:Md Imam Hossain

相关内容