在我重新启动系统后,Ubuntu 14.04 中的 Wi-Fi 过了一会儿才工作

在我重新启动系统后,Ubuntu 14.04 中的 Wi-Fi 过了一会儿才工作

我的情况:

我已经在新 HP 笔记本电脑上安装了 Ubuntu 14.04 LTS。

我的问题:

我的系统在启动后能够连接到我的 wifi 路由器,但几分钟后(30-45 分钟)互联网无法工作,即使 wifi 状态显示为已连接。当 wifi 状态显示为已连接时,我执行了 wireless_script,但互联网仍然无法工作。

请找到无线信息.txt

########## wireless info START ##########

Report from: 12 Apr 2015 23:13 IST +0530

Booted last: 12 Apr 2015 22:53 IST +0530

Script from: 06 Apr 2015 17:23 UTC +0000

##### release ###########################

Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:    14.04
Codename:   trusty

##### kernel ############################

Linux 3.16.0-33-generic #44~14.04.1-Ubuntu SMP Fri Mar 13 10:33:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Parameters: ro, quiet, splash, vt.handoff=7

##### desktop ###########################

Ubuntu

##### lspci #############################

08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 07)
    Subsystem: Hewlett-Packard Company Device [103c:2337]
    Kernel driver in use: r8169

0a:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
    Subsystem: Hewlett-Packard Company Device [103c:2231]
    Kernel driver in use: rtl8723be

##### lsusb #############################

Bus 001 Device 002: ID 8087:8001 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 04f2:b40e Chicony Electronics Co., Ltd 
Bus 002 Device 003: ID 0bda:b001 Realtek Semiconductor Corp. 
Bus 002 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

##### PCMCIA card info ##################

##### rfkill ############################

0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

##### lsmod #############################

hp_wmi                 14109  0 
sparse_keymap          13948  1 hp_wmi
rtl8723be              85054  0 
btcoexist              50304  1 rtl8723be
rtl8723_common         23361  1 rtl8723be
rtl_pci                26690  1 rtl8723be
rtlwifi                64255  2 rtl_pci,rtl8723be
mac80211              652718  3 rtl_pci,rtlwifi,rtl8723be
cfg80211              494362  2 mac80211,rtlwifi
mxm_wmi                13021  1 nouveau
wmi                    19193  3 hp_wmi,mxm_wmi,nouveau

##### interfaces ########################

auto lo
iface lo inet loopback

##### ifconfig ##########################

eth0      Link encap:Ethernet  HWaddr <MAC 'eth0' [IF]>  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr <MAC 'wlan0' [IF]>  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1000  Metric:1
          RX packets:7051 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6940 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1940264 (1.9 MB)  TX bytes:1229806 (1.2 MB)

##### iwconfig ##########################

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"Katrina kaif"  
          Mode:Managed  Frequency:2.457 GHz  Access Point: <MAC 'Katrina kaif' [AN7]>   
          Bit Rate=72.2 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-10 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:17   Missed beacon:0

##### route #############################

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0

##### resolv.conf #######################

nameserver 127.0.1.1

##### NetworkManager info ###############

NetworkManager Tool

State: connected (global)

- Device: wlan0  [Katrina kaif] ------------------------------------------------
  Type:              802.11 WiFi
  Driver:            rtl8723be
  State:             connected
  Default:           yes
  HW Address:        <MAC 'wlan0' [IF]>

  Capabilities:
    Speed:           72 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    ArpanPrateek:    Infra, <MAC 'ArpanPrateek' [AN1]>, Freq 2412 MHz, Rate 54 Mb/s, Strength 30 WPA WPA2
    mehack:          Infra, <MAC 'mehack' [AN2]>, Freq 2412 MHz, Rate 54 Mb/s, Strength 44 WPA WPA2
    hell:            Infra, <MAC 'hell' [AN3]>, Freq 2452 MHz, Rate 54 Mb/s, Strength 30 WPA WPA2
    crusaders:       Infra, <MAC 'crusaders' [AN4]>, Freq 2457 MHz, Rate 54 Mb/s, Strength 30 WPA WPA2
    PrAneesh:        Infra, <MAC 'PrAneesh' [AN5]>, Freq 2412 MHz, Rate 54 Mb/s, Strength 34 WPA2
    andhra4infy:     Infra, <MAC 'andhra4infy' [AN6]>, Freq 2412 MHz, Rate 54 Mb/s, Strength 30 WPA WPA2
    *Katrina kaif:   Infra, <MAC 'Katrina kaif' [AN7]>, Freq 2457 MHz, Rate 54 Mb/s, Strength 46 WPA WPA2
    Rockstar:        Infra, <MAC 'Rockstar' [AN8]>, Freq 2437 MHz, Rate 54 Mb/s, Strength 44 WPA2

  IPv4 Settings:
    Address:         192.168.0.100
    Prefix:          24 (255.255.255.0)
    Gateway:         192.168.0.1

    DNS:             192.168.0.1

- Device: eth0 -----------------------------------------------------------------
  Type:              Wired
  Driver:            r8169
  State:             unavailable
  Default:           no
  HW Address:        <MAC 'eth0' [IF]>

  Capabilities:
    Carrier Detect:  yes

  Wired Properties
    Carrier:         off

##### NetworkManager.state ##############

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true

##### NetworkManager.conf ###############

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

[ifupdown]
managed=false

##### NetworkManager profiles ###########

[[/etc/NetworkManager/system-connections/odiyatoka]] (600 root)
[connection] id=odiyatoka | type=802-11-wireless
[802-11-wireless] ssid=odiyatoka | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/XT1068 3606]] (600 root)
[connection] id=XT1068 3606 | type=802-11-wireless
[802-11-wireless] ssid=XT1068 3606 | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/Katrina kaif]] (600 root)
[connection] id=Katrina kaif | type=802-11-wireless
[802-11-wireless] ssid=Katrina kaif | mac-address=<MAC 'wlan0' [IF]> | mtu=1000
[ipv4] method=auto
[ipv6] method=auto

[[/etc/NetworkManager/system-connections/AIRTEL_E5172_170C]] (600 root)
[connection] id=AIRTEL_E5172_170C | type=802-11-wireless
[802-11-wireless] ssid=AIRTEL_E5172_170C | mac-address=<MAC 'wlan0' [IF]>
[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.

wlan0     13 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Current Frequency:2.457 GHz (Channel 10)

##### iwlist scan #######################

eth0      Interface doesn't support scanning.

wlan0     Interface doesn't support scanning : Device or resource busy

lo        Interface doesn't support scanning.

##### module infos ######################

[rtl8723be]
filename:       /lib/modules/3.16.0-33-generic/kernel/drivers/net/wireless/rtlwifi/rtl8723be/rtl8723be.ko
firmware:       rtlwifi/rtl8723befw.bin
description:    Realtek 8723BE 802.11n PCI wireless
license:        GPL
author:         Realtek WlanFAE <[email protected]>
author:         PageHe  <[email protected]>
srcversion:     C94095C986767A931B924EF
depends:        rtlwifi,rtl8723-common,rtl_pci,btcoexist,mac80211
intree:         Y
vermagic:       3.16.0-33-generic SMP mod_unload modversions 
signer:         Magrathea: Glacier signing key
sig_key:        25:26:EE:FE:32:C9:58:B4:CD:85:CA:5F:BF:EB:ED:A1:75:D1:B2:18
sig_hashalgo:   sha512
parm:           swlps:bool
parm:           swenc:using hardware crypto (default 0 [hardware])
 (bool)
parm:           ips:using no link power save (default 1 is open)
 (bool)
parm:           fwlps:using linked fw control power save (default 1 is open)
 (bool)
parm:           msi:Set to 1 to use MSI interrupts mode (default 0)
 (bool)
parm:           debug:Set debug level (0-5) (default 0) (int)

[rtl8723_common]
filename:       /lib/modules/3.16.0-33-generic/kernel/drivers/net/wireless/rtlwifi/rtl8723com/rtl8723-common.ko
description:    Realtek RTL8723AE/RTL8723BE 802.11n PCI wireless common routines
license:        GPL
author:         Larry Finger    <[email protected]>
author:         Realtek WlanFAE <[email protected]>
srcversion:     7410431A59C24B1BC33226E
depends:        
intree:         Y
vermagic:       3.16.0-33-generic SMP mod_unload modversions 
signer:         Magrathea: Glacier signing key
sig_key:        25:26:EE:FE:32:C9:58:B4:CD:85:CA:5F:BF:EB:ED:A1:75:D1:B2:18
sig_hashalgo:   sha512

[rtl_pci]
filename:       /lib/modules/3.16.0-33-generic/kernel/drivers/net/wireless/rtlwifi/rtl_pci.ko
description:    PCI basic driver for rtlwifi
license:        GPL
author:         Larry Finger    <[email protected]>
author:         Realtek WlanFAE <[email protected]>
author:         lizhaoming  <[email protected]>
srcversion:     3273ECD6028617EFD27E4F4
depends:        mac80211,rtlwifi
intree:         Y
vermagic:       3.16.0-33-generic SMP mod_unload modversions 
signer:         Magrathea: Glacier signing key
sig_key:        25:26:EE:FE:32:C9:58:B4:CD:85:CA:5F:BF:EB:ED:A1:75:D1:B2:18
sig_hashalgo:   sha512

[rtlwifi]
filename:       /lib/modules/3.16.0-33-generic/kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko
description:    Realtek 802.11n PCI wireless core
license:        GPL
author:         Larry Finger    <[email protected]>
author:         Realtek WlanFAE <[email protected]>
author:         lizhaoming  <[email protected]>
srcversion:     8362106E96F806A9DBAE565
depends:        mac80211,cfg80211
intree:         Y
vermagic:       3.16.0-33-generic SMP mod_unload modversions 
signer:         Magrathea: Glacier signing key
sig_key:        25:26:EE:FE:32:C9:58:B4:CD:85:CA:5F:BF:EB:ED:A1:75:D1:B2:18
sig_hashalgo:   sha512

[mac80211]
filename:       /lib/modules/3.16.0-33-generic/kernel/net/mac80211/mac80211.ko
license:        GPL
description:    IEEE 802.11 subsystem
srcversion:     5410C94462FA26A0A3F256C
depends:        cfg80211
intree:         Y
vermagic:       3.16.0-33-generic SMP mod_unload modversions 
signer:         Magrathea: Glacier signing key
sig_key:        25:26:EE:FE:32:C9:58:B4:CD:85:CA:5F:BF:EB:ED:A1:75:D1:B2:18
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.16.0-33-generic/kernel/net/wireless/cfg80211.ko
description:    wireless configuration support
license:        GPL
author:         Johannes Berg
srcversion:     4A525D9D32B0C6D120CA547
depends:        
intree:         Y
vermagic:       3.16.0-33-generic SMP mod_unload modversions 
signer:         Magrathea: Glacier signing key
sig_key:        25:26:EE:FE:32:C9:58:B4:CD:85:CA:5F:BF:EB:ED:A1:75:D1:B2:18
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 #################

[rtl8723be]
debug: 0
fwlps: Y
ips: Y
msi: N
swenc: N
swlps: N

[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

##### modprobe options ##################

[/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/custom-wireless.conf]
options ath5k nohwcrypt

[/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

[/etc/modprobe.d/modesetting.conf]
options cirrus modeset=1
options mgag200 modeset=1

##### rc.local ##########################

exit 0

##### pm-utils ##########################

##### udev rules ########################

[/etc/udev/rules.d/70-persistent-net.rules]
# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'eth0' [IF]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0xb723 (rtl8723be)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'wlan0' [IF]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

##### dmesg #############################

[   11.682997] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   11.683225] rtlwifi: wireless switch is on
[   16.023693] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   17.024236] wlan0: authenticate with <MAC 'Katrina kaif' [AN7]>
[   17.034441] wlan0: send auth to <MAC 'Katrina kaif' [AN7]> (try 1/3)
[   17.037434] wlan0: authenticated
[   17.042932] wlan0: associate with <MAC 'Katrina kaif' [AN7]> (try 1/3)
[   17.046764] wlan0: RX AssocResp from <MAC 'Katrina kaif' [AN7]> (capab=0x431 status=0 aid=6)
[   17.046977] wlan0: associated
[   17.046984] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

########## wireless info END ############

答案1

这个答案已经过时了,请参阅 Pilot6 的答案这里

第一次尝试

$ echo "options rtl8723be fwlps=0 swlps=0" | sudo tee /etc/modprobe.d/rtl8723be.conf

重新启动,如果仍然有问题,请按照以下说明安装反向移植

$ sudo apt-get install build-essential linux-headers-generic
$ wget -N -t 5 -T 10 https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.19-rc1/backports-3.19-rc1-1.tar.gz
$ tar -xf backports-3.19-rc1-1.tar.xz
$ cd ~/backports-3.19-rc1-1
$ make defconfig-rtlwifi
$ make
$ sudo make install

重新启动系统。

笔记

反向移植的唯一问题是,它们需要为任何通过更新安装的新内核进行构建,当这种情况发生时,

$ cd ~/backports-3.19-rc1-1
$ make clean
$ make defconfig-rtlwifi
$ make
$ sudo make install

您可能还想检查 wifi 路由器加密设置,看看它们是否加密加密或者WPA2仅按其偏好进行。

编辑(支持其他无线内核驱动程序)

rtlwifi在上面,我们为HP 笔记本电脑的无线/网卡驱动程序添加了反向移植支持。其他笔记本电脑制造商提供其他提供商的无线卡,因此首先您必须找到无线卡支持的内核驱动程序的名称,您只需lspci在 shell 中运行命令,转到Network Controller并查看它的最后一行即可获得该名称。

$ lspci -v
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 [Rainbow Peak] (rev 34)
        Subsystem: Intel Corporation Centrino Advanced-N 6230 AGN
        Flags: bus master, fast devsel, latency 0, IRQ 36
        Memory at f1b00000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: <access denied>
        Kernel driver in use: iwlwifi

在我的笔记本电脑中,我已iwlwifi命名网卡的内核驱动程序。因此,命令如下:-

$ cd ~/backports-3.19-rc1-1
$ make clean
$ make defconfig-iwlwifi
$ make
$ sudo make install

相关内容