为什么我的 xenial 16.04 无线每 5 分钟就会断开一次?

为什么我的 xenial 16.04 无线每 5 分钟就会断开一次?

我正在运行我的无线网络每隔几分钟就会断开连接,我不知道为什么。我找到了答案另一篇帖子隐藏在评论中:

来自@Pilot6

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi disable_11n=1"

现在我的问题似乎有所好转,因为我的 wifi 不会每 5 分钟掉线一次;但是,它仍然会掉线(我必须通过单击右上角的 wifi 图标来重置连接)。所以我想知道更多关于我可以做些什么来解决我的 wifi 问题的信息,但我也想知道解决我的 wifi 问题的过程,特别是上面显示的@Pilot6 的命令。

<<<理解"options iwlwifi disable_11n=1"作为输入传递到命令的其余部分,在这种情况下,tee我非常确定(就像管道的三通一样)将输出管道传输到文本文件/etc/modprobe.d/iwlwifi-opt.confstdout(因此我在屏幕上看到它)。我可以确认:

server@thinkpad:~/Desktop$ cat /etc/modprobe.d/iwlwifi-opt.conf
options iwlwifi 11n_disable=1

因此,按照真正的 *nix 方式,将一行文本放在正确的配置文件中解决了我所有的问题 ;),但我想知道的是为什么?@Pilot6 到底是怎么知道把它放在那里的?

我知道这/etc/modeprobe.dmodprobe 的配置目录,并man modprobe告诉我们:

modprobe——在 Linux 内核中添加和删除模块

这更能解释为什么该目录中有这么多文本文件,如下所示blacklist*.conf

所以再看一下iwlwifi-opt.conf

options iwlwifi 11n_disable=1

Pilot6 似乎想说这样的话:“Linux 内核中有一个当前启用的模块正在导致问题,所以让我们禁用它”

从高层次上看这基本上正确吗?

然后,为什么这对我有用(至少在某种程度上)? Pilot6 怎么知道要尝试这个?

附件是来自以下脚本的输出:另一篇帖子

谢谢您的帮助 :)

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

Report from: 14 Aug 2016 21:24 PDT -0700

Booted last: 14 Aug 2016 00:00 PDT -0700

Script from: 08 Jul 2016 02:16 UTC +0000

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

Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial

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

Linux 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

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

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

Ubuntu

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

00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
    Subsystem: Lenovo 82579LM Gigabit Network Connection [17aa:21ce]
    Kernel driver in use: e1000e

03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8176] (rev 01)
    Subsystem: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8195]
    Kernel driver in use: rtl8192ce

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

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04f2:b221 Chicony Electronics Co., Ltd integrated camera
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

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

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

0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

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

rtl8192ce              57344  0
rtl_pci                28672  1 rtl8192ce
rtl8192c_common        53248  1 rtl8192ce
rtlwifi                77824  3 rtl_pci,rtl8192c_common,rtl8192ce
mac80211              737280  3 rtl_pci,rtlwifi,rtl8192ce
cfg80211              565248  2 mac80211,rtlwifi
wmi                    20480  0

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

auto lo
iface lo inet loopback

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

enp0s25   Link encap:Ethernet  HWaddr <MAC 'enp0s25' [IF1]>  
          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)
          Interrupt:20 Memory:f2600000-f2620000 

wlp3s0    Link encap:Ethernet  HWaddr <MAC 'wlp3s0' [IF2]>  
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::99:136a:8178:e9be/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22117 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18726 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17135383 (17.1 MB)  TX bytes:2771222 (2.7 MB)

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

lo        no wireless extensions.

enp0s25   no wireless extensions.

wlp3s0    IEEE 802.11bgn  ESSID:"Comcast"  
          Mode:Managed  Frequency:2.417 GHz  Access Point: <MAC 'Comcast' [AC1]>   
          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=69/70  Signal level=-41 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:58   Missed beacon:0

##### 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    600    0        0 wlp3s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp3s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0

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

nameserver 127.0.1.1

##### network managers ##################

Installed:

    NetworkManager

Running:

root       763     1  0 20:13 ?        00:00:04 /usr/sbin/NetworkManager --no-daemon

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

GENERAL.DEVICE:                         wlp3s0
GENERAL.TYPE:                           wifi
GENERAL.NM-TYPE:                        NMDeviceWifi
GENERAL.VENDOR:                         Realtek Semiconductor Co., Ltd.
GENERAL.PRODUCT:                        RTL8188CE 802.11b/g/n WiFi Adapter
GENERAL.DRIVER:                         rtl8192ce
GENERAL.DRIVER-VERSION:                 4.4.0-34-generic
GENERAL.FIRMWARE-VERSION:               N/A
GENERAL.HWADDR:                         <MAC 'wlp3s0' [IF2]>
GENERAL.MTU:                            0
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlp3s0
GENERAL.IP-IFACE:                       wlp3s0
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     Comcast
GENERAL.CON-UUID:                       4e14a31d-a324-4ae7-9c52-c8fe0088bac3
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/0
GENERAL.METERED:                        no (guessed)
CAPABILITIES.CARRIER-DETECT:            no
CAPABILITIES.SPEED:                     72 Mb/s
CAPABILITIES.IS-SOFTWARE:               no
WIFI-PROPERTIES.WEP:                    yes
WIFI-PROPERTIES.WPA:                    yes
WIFI-PROPERTIES.WPA2:                   yes
WIFI-PROPERTIES.TKIP:                   yes
WIFI-PROPERTIES.CCMP:                   yes
WIFI-PROPERTIES.AP:                     yes
WIFI-PROPERTIES.ADHOC:                  yes
WIFI-PROPERTIES.2GHZ:                   yes
WIFI-PROPERTIES.5GHZ:                   no
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: /org/freedesktop/NetworkManager/Settings/{1,0}
CONNECTIONS.AVAILABLE-CONNECTIONS[1]:   4e14a31d-a324-4ae7-9c52-c8fe0088bac3 | Comcast
CONNECTIONS.AVAILABLE-CONNECTIONS[2]:   5affbcb4-41d3-4ccd-90af-c854fc397162 | DIRECT-56-HP OfficeJet 3830
IP4.ADDRESS[1]:                         192.168.1.10/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             192.168.1.1
DHCP4.OPTION[1]:                        requested_routers = 1
DHCP4.OPTION[2]:                        requested_domain_search = 1
DHCP4.OPTION[3]:                        requested_time_offset = 1
DHCP4.OPTION[4]:                        requested_domain_name = 1
DHCP4.OPTION[5]:                        requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[6]:                        requested_broadcast_address = 1
DHCP4.OPTION[7]:                        requested_netbios_scope = 1
DHCP4.OPTION[8]:                        requested_wpad = 1
DHCP4.OPTION[9]:                        next_server = 0.0.0.0
DHCP4.OPTION[10]:                       expiry = 1471317244
DHCP4.OPTION[11]:                       requested_interface_mtu = 1
DHCP4.OPTION[12]:                       requested_subnet_mask = 1
DHCP4.OPTION[13]:                       dhcp_lease_time = 86400
DHCP4.OPTION[14]:                       dhcp_message_type = 5
DHCP4.OPTION[15]:                       ip_address = 192.168.1.10
DHCP4.OPTION[16]:                       requested_static_routes = 1
DHCP4.OPTION[17]:                       requested_domain_name_servers = 1
DHCP4.OPTION[18]:                       routers = 192.168.1.1
DHCP4.OPTION[19]:                       broadcast_address = 192.168.1.255
DHCP4.OPTION[20]:                       requested_ntp_servers = 1
DHCP4.OPTION[21]:                       requested_netbios_name_servers = 1
DHCP4.OPTION[22]:                       domain_name_servers = 192.168.1.1
DHCP4.OPTION[23]:                       requested_ms_classless_static_routes = 1
DHCP4.OPTION[24]:                       subnet_mask = 255.255.255.0
DHCP4.OPTION[25]:                       network_number = 192.168.1.0
DHCP4.OPTION[26]:                       requested_host_name = 1
DHCP4.OPTION[27]:                       dhcp_server_identifier = 192.168.1.1
IP6.ADDRESS[1]:                         fe80::99:136a:8178:e9be/64
IP6.GATEWAY:                            
IP6.DNS[1]:                             2001:558:feed::1
IP6.DNS[2]:                             2001:558:feed::2

GENERAL.DEVICE:                         enp0s25
GENERAL.TYPE:                           ethernet
GENERAL.NM-TYPE:                        NMDeviceEthernet
GENERAL.VENDOR:                         Intel Corporation
GENERAL.PRODUCT:                        82579LM Gigabit Network Connection
GENERAL.DRIVER:                         e1000e
GENERAL.DRIVER-VERSION:                 3.2.6-k
GENERAL.FIRMWARE-VERSION:               0.13-3
GENERAL.HWADDR:                         <MAC 'enp0s25' [IF1]>
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.REASON:                         2 (Device is now managed)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:19.0/net/enp0s25
GENERAL.IP-IFACE:                       
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     --
GENERAL.CON-UUID:                       --
GENERAL.CON-PATH:                       --
GENERAL.METERED:                        unknown
CAPABILITIES.CARRIER-DETECT:            yes
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               no
WIRED-PROPERTIES.CARRIER:               off
CONNECTIONS.AVAILABLE-CONNECTION-PATHS: 

SSID                         BSSID              MODE   CHAN  FREQ      RATE       SIGNAL  BARS  SECURITY   ACTIVE  * 
--                           <MAC '' [AC6]>  Infra  2     2417 MHz  54 Mbit/s  84      ▂▄▆█  WPA1 WPA2  no        
Comcast                      <MAC 'Comcast' [AC4]>  Infra  2     2417 MHz  54 Mbit/s  80      ▂▄▆_  WPA1 WPA2  no        
--                           <MAC '' [AC2]>  Infra  2     2417 MHz  54 Mbit/s  74      ▂▄▆_  WPA1 WPA2  no        
xfinitywifi                  <MAC 'xfinitywifi' [AC7]>  Infra  2     2417 MHz  54 Mbit/s  74      ▂▄▆_  --         no        
Comcast                      <MAC 'Comcast' [AC1]>  Infra  2     2417 MHz  54 Mbit/s  72      ▂▄▆_  WPA2       yes     * 
TP-LINK_49E1                 <MAC 'TP-LINK_49E1' [AC16]>  Infra  11    2462 MHz  54 Mbit/s  54      ▂▄__  WPA2       no        
rvac                         <MAC 'rvac' [AN7]>  Infra  11    2462 MHz  54 Mbit/s  50      ▂▄__  WPA1 WPA2  no        
DIRECT-56-HP OfficeJet 3830  <MAC 'DIRECT-56-HP OfficeJet 3830' [AN8]>  Infra  6     2437 MHz  54 Mbit/s  47      ▂▄__  WPA2       no        
2WIRE665                     <MAC '2WIRE665' [AC14]>  Infra  11    2462 MHz  54 Mbit/s  44      ▂▄__  WPA1 WPA2  no        
eTours360                    <MAC 'eTours360' [AN10]>  Infra  6     2437 MHz  54 Mbit/s  40      ▂▄__  WPA2       no        
ATTwIBX8I2                   <MAC 'ATTwIBX8I2' [AC15]>  Infra  1     2412 MHz  54 Mbit/s  34      ▂▄__  WPA1 WPA2  no        
rvac                         <MAC 'rvac' [AC5]>  Infra  1     2412 MHz  54 Mbit/s  34      ▂▄__  WPA1 WPA2  no        
--                           <MAC '

相关内容