我正在使用ubuntu 14.04.3
Atheros kernel version 3.13.0-67
Wifi 卡AR93xx
。很多时候,系统启动时检测不到无线。以下是我检测到的问题。
无线网卡应该被内核检测为“网络控制器”,但内核却将其检测为“以太网控制器”。以下是命令lspci -nn
日志。
00:00.0 Host bridge [0600]: Intel Corporation ValleyView SSA-CUnit [8086:0f00] (rev 0e)
00:02.0 VGA compatible controller [0300]: Intel Corporation ValleyView Gen7 [8086:0f31] (rev 0e)
00:13.0 SATA controller [0106]: Intel Corporation ValleyView 6-Port SATA AHCI Controller [8086:0f23] (rev 0e)
00:14.0 USB controller [0c03]: Intel Corporation ValleyView USB xHCI Host Controller [8086:0f35] (rev 0e)
00:1a.0 Encryption controller [1080]: Intel Corporation ValleyView SEC [8086:0f18] (rev 0e)
00:1b.0 Audio device [0403]: Intel Corporation ValleyView High Definition Audio Controller [8086:0f04] (rev 0e)
00:1c.0 PCI bridge [0604]: Intel Corporation ValleyView PCI Express Root Port [8086:0f48] (rev 0e)
00:1c.1 PCI bridge [0604]: Intel Corporation ValleyView PCI Express Root Port [8086:0f4a] (rev 0e)
00:1c.2 PCI bridge [0604]: Intel Corporation ValleyView PCI Express Root Port [8086:0f4c] (rev 0e)
00:1c.3 PCI bridge [0604]: Intel Corporation ValleyView PCI Express Root Port [8086:0f4e] (rev 0e)
00:1f.0 ISA bridge [0601]: Intel Corporation ValleyView Power Control Unit [8086:0f1c] (rev 0e)
00:1f.3 SMBus [0c05]: Intel Corporation ValleyView SMBus Controller [8086:0f12] (rev 0e)
02:00.0 Ethernet controller [0200]: Qualcomm Atheros Device [168c:abcd] (rev 01)
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
这也是系统日志,它确认设备检测错误。
May 25 19:14:35 ubuntu kernel: [ 0.208784] pci 0000:02:00.0: [168c:abcd] type 00 class 0x020000
May 25 19:14:35 ubuntu kernel: [ 0.208807] pci 0000:02:00.0: reg 0x10: [mem 0xd0700000-0xd071ffff 64bit]
May 25 19:14:35 ubuntu kernel: [ 0.208846] pci 0000:02:00.0: reg 0x30: [mem 0xd0720000-0xd072ffff pref]
May 25 19:14:35 ubuntu kernel: [ 0.208901] pci 0000:02:00.0: supports D1
May 25 19:14:35 ubuntu kernel: [ 0.208905] pci 0000:02:00.0: PME# supported from D0 D1 D3hot
May 25 19:14:35 ubuntu kernel: [ 0.208947] pci 0000:02:00.0: System wakeup disabled by ACPI
如果正确检测到 wifi 卡,我应该在lspci -nn
输出中看到以下内容。
02:00.0 Network controller [0280]: Qualcomm Atheros AR93xx Wireless Network Adapter [168c:0030] (rev 01)
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
而在 syslog 中以下几行。
Apr 8 16:44:06 ubuntu kernel: [ 0.208677] pci 0000:02:00.0: [168c:0030] type 00 class 0x028000
Apr 8 16:44:06 ubuntu kernel: [ 0.208709] pci 0000:02:00.0: reg 0x10: [mem 0xd0700000-0xd071ffff 64bit]
Apr 8 16:44:06 ubuntu kernel: [ 0.208773] pci 0000:02:00.0: reg 0x30: [mem 0xd0720000-0xd072ffff pref]
我尝试的解决方案是移除并重新扫描该设备。
sudo sh -c "echo 1 > /sys/bus/pci/devices/0000\:02\:00.0/remove"
sudo sh -c "echo 1 > /sys/bus/pci/rescan "
但这再次显示了相同的内容。无线 pci 卡仍被检测为以太网控制器。我知道内核以错误的方式检测到它,但最好的方法是对设备进行真正的重新扫描(无需重新启动)或强制内核检测正确的设备类型。
以下是生成的完整日志无线信息脚本按照 ubuntu 论坛上的建议。
########## wireless info START ##########
Report from: 30 May 2016 12:32 IST +0530
Booted last: 30 May 2016 11:40 IST +0530
Script from: 26 May 2016 21:56 UTC +0000
##### release ###########################
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
##### kernel ############################
Linux 3.13.0-67-generic #110-Ubuntu SMP Fri Oct 23 13:24:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Parameters: ro, text
##### desktop ###########################
sed: can't read /home/ubuntu/.dmrc: No such file or directory
Could not be determined.
##### lspci #############################
02:00.0 Ethernet controller [0200]: Qualcomm Atheros Device [168c:abcd] (rev 01)
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Intel Corporation Device [8086:2055]
Kernel driver in use: r8169
##### lsusb #############################
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
##### PCMCIA card info ##################
##### rfkill ############################
##### lsmod #############################
ath9k 164164 0
ath9k_common 13551 1 ath9k
ath9k_hw 453856 2 ath9k_common,ath9k
ath 28698 3 ath9k_common,ath9k,ath9k_hw
mac80211 630728 1 ath9k
cfg80211 484040 3 ath,ath9k,mac80211
##### interfaces ########################
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.20.10
netmask 255.255.255.0
##### ifconfig ##########################
eth0 Link encap:Ethernet HWaddr <MAC 'eth0' [IF1]>
inet addr:192.168.1.53 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::<IP6 'eth0' [IF1]>/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5616 errors:0 dropped:0 overruns:0 frame:0
TX packets:4084 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:707839 (707.8 KB) TX bytes:3170000 (3.1 MB)
##### iwconfig ##########################
eth0 no wireless extensions.
lo no wireless extensions.
##### route #############################
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
##### resolv.conf #######################
nameserver 0.0.0.0
nameserver 127.0.0.1
nameserver 192.168.1.10
nameserver 127.0.0.1
search domain.name
##### network managers ##################
Installed:
NetworkManager
Running:
None found.
##### NetworkManager info ###############
** (process:3060): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files
** (process:3060): WARNING **: error: could not connect to NetworkManager
NetworkManager Tool
State: unknown
##### NetworkManager.state ##############
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=false
WimaxEnabled=true
##### NetworkManager.conf ###############
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
no-auto-default=<MAC address>,C0:3F:D5:69:4A:55,00:A0:C6:67:04:30,C0:3F:D5:69:72:1C,C0:3F:D5:69:0D:BD,B8:AE:ED:70:45:10,
[ifupdown]
managed=false
##### NetworkManager profiles ###########
[[/etc/NetworkManager/system-connections/Zaya Office 2 1]] (600 root)
[connection] id=Zaya Office 2 1 | type=802-11-wireless
[802-11-wireless] ssid=Zaya Office 2 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/my Office 3]] (600 root)
[connection] id=my Office 3 | type=802-11-wireless
[802-11-wireless] ssid=my Office 3 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/my Office1]] (600 root)
[connection] id=my Office1 | type=802-11-wireless
[802-11-wireless] ssid=my Office1 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/WRTD-303N_d2f567]] (600 root)
[connection] id=WRTD-303N_d2f567 | type=802-11-wireless
[802-11-wireless] ssid=WRTD-303N_d2f567 | mac-address=<MAC address>
[ipv6] method=auto
[ipv4] method=auto
[[/etc/NetworkManager/system-connections/Zaya Office 2]] (600 root)
[connection] id=Zaya Office 2 | type=802-11-wireless
[802-11-wireless] ssid=Zaya Office 2 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/office-3_2GEXT]] (600 root)
[connection] id=office-3_2GEXT | type=802-11-wireless
[802-11-wireless] ssid=office-3_2GEXT | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/office-4]] (600 root)
[connection] id=office-4 | type=802-11-wireless
[802-11-wireless] ssid=office-4 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/office-3]] (600 root)
[connection] id=office-3 | type=802-11-wireless
[802-11-wireless] ssid=office-3 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/office-3 1]] (600 root)
[connection] id=office-3 1 | type=802-11-wireless
[802-11-wireless] ssid=office-3 | mac-address=<MAC address>
[ipv4] method=auto
[ipv6] method=auto
##### iw reg get ########################
Region: Asia/Kolkata (based on set time zone)
country 00:
(2402 - 2472 @ 40), (3, 20)
(2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (3, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
##### iwlist channels ###################
eth0 no frequency information.
lo no frequency information.
##### iwlist scan #######################
eth0 Interface doesn't support scanning.
lo Interface doesn't support scanning.
##### module infos ######################
[ath9k]
filename: /lib/modules/3.13.0-67-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
license: Dual BSD/GPL
description: Support for Atheros 802.11n wireless LAN cards.
author: Atheros Communications
srcversion: E7A57F092F500DEC330BD56
depends: ath9k_hw,mac80211,ath9k_common,cfg80211,ath
intree: Y
vermagic: 3.13.0-67-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 2E:7A:AB:A0:3B:9A:BA:73:02:BA:CB:8F:81:3D:80:FF:AC:23:04:50
sig_hashalgo: sha512
parm: debug:Debugging mask (uint)
parm: nohwcrypt:Disable hardware encryption (int)
parm: blink:Enable LED blink on activity (int)
parm: btcoex_enable:Enable wifi-BT coexistence (int)
parm: bt_ant_diversity:Enable WLAN/BT RX antenna diversity (int)
parm: ps_enable:Enable WLAN PowerSave (int)
[ath9k_common]
filename: /lib/modules/3.13.0-67-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_common.ko
license: Dual BSD/GPL
description: Shared library for Atheros wireless 802.11n LAN cards.
author: Atheros Communications
srcversion: 93644B269B570BC55CF5154
depends: ath,ath9k_hw
intree: Y
vermagic: 3.13.0-67-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 2E:7A:AB:A0:3B:9A:BA:73:02:BA:CB:8F:81:3D:80:FF:AC:23:04:50
sig_hashalgo: sha512
[ath9k_hw]
filename: /lib/modules/3.13.0-67-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
license: Dual BSD/GPL
description: Support for Atheros 802.11n wireless LAN cards.
author: Atheros Communications
srcversion: 65C14EF588BF1A68181643C
depends: ath
intree: Y
vermagic: 3.13.0-67-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 2E:7A:AB:A0:3B:9A:BA:73:02:BA:CB:8F:81:3D:80:FF:AC:23:04:50
sig_hashalgo: sha512
[ath]
filename: /lib/modules/3.13.0-67-generic/kernel/drivers/net/wireless/ath/ath.ko
license: Dual BSD/GPL
description: Shared library for Atheros wireless LAN cards.
author: Atheros Communications
srcversion: 88A67C5359B02C5A710AFCF
depends: cfg80211
intree: Y
vermagic: 3.13.0-67-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 2E:7A:AB:A0:3B:9A:BA:73:02:BA:CB:8F:81:3D:80:FF:AC:23:04:50
sig_hashalgo: sha512
[mac80211]
filename: /lib/modules/3.13.0-67-generic/kernel/net/mac80211/mac80211.ko
license: GPL
description: IEEE 802.11 subsystem
srcversion: CD516ABEC909374CB2C52DC
depends: cfg80211
intree: Y
vermagic: 3.13.0-67-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 2E:7A:AB:A0:3B:9A:BA:73:02:BA:CB:8F:81:3D:80:FF:AC:23:04:50
sig_hashalgo: sha512
parm: max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm: max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm: beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm: probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm: ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)
[cfg80211]
filename: /lib/modules/3.13.0-67-generic/kernel/net/wireless/cfg80211.ko
description: wireless configuration support
license: GPL
author: Johannes Berg
srcversion: 695424C2F5CD23A91B67E25
depends:
intree: Y
vermagic: 3.13.0-67-generic SMP mod_unload modversions
signer: Magrathea: Glacier signing key
sig_key: 2E:7A:AB:A0:3B:9A:BA:73:02:BA:CB:8F:81:3D:80:FF:AC:23:04:50
sig_hashalgo: sha512
parm: ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm: cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)
##### module parameters #################
[ath9k]
blink: 0
bt_ant_diversity: 0
btcoex_enable: 0
nohwcrypt: 1
ps_enable: 0
[mac80211]
beacon_loss_count: 7
ieee80211_default_rc_algo: minstrel_ht
max_nullfunc_tries: 2
max_probe_tries: 5
probe_wait_ms: 500
[cfg80211]
cfg80211_disable_40mhz_24ghz: N
ieee80211_regdom: 00
##### /etc/modules ######################
lp
rtc
ath9k
##### modprobe options ##################
[/etc/modprobe.d/ath9k.conf]
options ath9k nohwcrypt=1
[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci
[/etc/modprobe.d/blacklist.conf]
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist i2c_i801
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac
[/etc/modprobe.d/blacklist-rare-network.conf]
alias net-pf-3 off
alias net-pf-6 off
alias net-pf-9 off
alias net-pf-11 off
alias net-pf-12 off
alias net-pf-19 off
alias net-pf-21 off
alias net-pf-36 off
[/etc/modprobe.d/iwlwifi.conf]
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211
[/etc/modprobe.d/mlx4.conf]
softdep mlx4_core post: mlx4_en
##### rc.local ##########################
/bin/sh /usr/local/bin/startServer.sh
/bin/echo never > /sys/kernel/mm/transparent_hugepage/enabled
exit 0
##### pm-utils ##########################
##### udev rules ########################
[/etc/udev/rules.d/70-persistent-net.rules]
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'eth0' [IF1]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x0030 (ath9k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC address>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
##### dmesg #############################
########## wireless info END ############
任何帮助是极大的赞赏。
答案1
我建议将内核升级到 4.4。它支持新的 Quallcom 无线适配器。在终端中运行
sudo apt-get install linux-generic-lts-xenial
然后重新启动。
答案2
因此,我尝试升级到最新的内核,发现问题不在于内核,而在于无线网卡和主板集成。无线网卡通过 pci 连接,与制造商交谈后得出结论:“无线网卡在启动特定主板时没有发送正确的信号”,因此出现了此问题。不过,一个可能的解决方案似乎是重新启动设备(手动或使用脚本)