我的 wifi 过一会儿就断线了

我的 wifi 过一会儿就断线了

所以我的 wifi 可以工作一小会儿(比如说 5-10 分钟)没有问题。之后它就停止了。

观察结果:

  1. 当我在 Wi-Fi 停止工作后单击它时,我仍然连接到网络(只是没有连接到互联网)
  2. 当我查看周围的网络列表时,我只能看到我所连接的网络。
  3. 这件事在我升级到 Bionic Beaver 时开始发生。
  4. 如果我再次打开并关闭 wifi,它将完全不可用(即计算机似乎认为 wifi 硬件不存在)

lshw内容 :

  8-bit              
        description: Notebook
        product: Inspiron 5559 (06B2)
        vendor: Dell Inc.
        serial: 2YJXDC2
        width: 64 bits
        capabilities: smbios-2.8 dmi-2.8 smp vsyscall32
        configuration: boot=normal chassis=docking family=Inspiron sku=06B2 uuid=44454C4C-5900-104A-8058-B2C04F444332
      *-core
           description: Motherboard
           product: 052K07
           vendor: Dell Inc.
           physical id: 0
           version: A00
           serial: /2YJXDC2/CN1296365N0022/
         *-firmware
              description: BIOS
              vendor: Dell Inc.
              physical id: 0
              version: 1.2.8
              date: 02/08/2017
              size: 64KiB
              capacity: 15MiB
              capabilities: pci pnp upgrade shadowing cdboot bootselect edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb smartbattery biosbootspecification netboot uefi
         *-cache:0
              description: L1 cache
              physical id: 41
              slot: L1 Cache
              size: 64KiB
              capacity: 64KiB
              capabilities: synchronous internal write-back data
              configuration: level=1
         *-cache:1
              description: L1 cache
              physical id: 42
              slot: L1 Cache
              size: 64KiB
              capacity: 64KiB
              capabilities: synchronous internal write-back instruction
              configuration: level=1
         *-cache:2
              description: L2 cache
              physical id: 43
              slot: L2 Cache
              size: 512KiB
              capacity: 512KiB
              capabilities: synchronous internal write-back unified
              configuration: level=2
         *-cache:3
              description: L3 cache
              physical id: 44
              slot: L3 Cache
              size: 4MiB
              capacity: 4MiB
              capabilities: synchronous internal write-back unified
              configuration: level=3
         *-cpu
              description: CPU
              product: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
              vendor: Intel Corp.
              physical id: 45
              bus info: cpu@0
              version: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
              serial: To Be Filled By O.E.M.
              slot: U3E1
              size: 498MHz
              capacity: 3100MHz
              width: 64 bits
              clock: 100MHz
              capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves ibpb ibrs stibp dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp cpufreq
              configuration: cores=2 threads=4
         *-memory
              description: System Memory
              physical id: 46
              slot: System board or motherboard
              size: 16GiB
            *-bank:0
                 description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
                 product: KHX1600C9S3L/8G
                 vendor: Kingston
                 physical id: 0
                 serial: 12151215
                 slot: DIMM A
                 size: 8GiB
                 width: 64 bits
                 clock: 1600MHz (0.6ns)
            *-bank:1
                 description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
                 product: KHX1600C9S3L/8G
                 vendor: Kingston
                 physical id: 1
                 serial: 12121212
                 slot: DIMM B
                 size: 8GiB
                 width: 64 bits
                 clock: 1600MHz (0.6ns)
         *-pci
              description: Host bridge
              product: Skylake Host Bridge/DRAM Registers
              vendor: Intel Corporation
              physical id: 100
              bus info: pci@0000:00:00.0
              version: 08
              width: 32 bits
              clock: 33MHz
              configuration: driver=skl_uncore
              resources: irq:0
            *-display
                 description: VGA compatible controller
                 product: HD Graphics 520
                 vendor: Intel Corporation
                 physical id: 2
                 bus info: pci@0000:00:02.0
                 version: 07
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
                 configuration: driver=i915 latency=0
                 resources: irq:125 memory:d1000000-d1ffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff
            *-usb
                 description: USB controller
                 product: Sunrise Point-LP USB 3.0 xHCI Controller
                 vendor: Intel Corporation
                 physical id: 14
                 bus info: pci@0000:00:14.0
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm msi xhci bus_master cap_list
                 configuration: driver=xhci_hcd latency=0
                 resources: irq:122 memory:d2210000-d221ffff
               *-usbhost:0
                    product: xHCI Host Controller
                    vendor: Linux 4.15.0-20-generic xhci-hcd
                    physical id: 0
                    bus info: usb@1
                    logical name: usb1
                    version: 4.15
                    capabilities: usb-2.00
                    configuration: driver=hub slots=12 speed=480Mbit/s
                  *-usb:0
                       description: Generic USB device
                       product: USB2.0-CRW
                       vendor: Generic
                       physical id: 6
                       bus info: usb@1:6
                       version: 39.60
                       serial: 20100201396000000
                       capabilities: usb-2.00
                       configuration: driver=rtsx_usb maxpower=500mA speed=480Mbit/s
                  *-usb:1 UNCLAIMED
                       description: Human interface device
                       product: LGD AIT Touch Controller
                       vendor: Melfas
                       physical id: 7
                       bus info: usb@1:7
                       version: 5.00
                       capabilities: usb-1.10
                       configuration: maxpower=100mA speed=12Mbit/s
                  *-usb:2
                       description: Bluetooth wireless interface
                       vendor: Intel Corp.
                       physical id: 8
                       bus info: usb@1:8
                       version: 0.01
                       capabilities: bluetooth usb-2.00
                       configuration: driver=btusb maxpower=100mA speed=12Mbit/s
               *-usbhost:1
                    product: xHCI Host Controller
                    vendor: Linux 4.15.0-20-generic xhci-hcd
                    physical id: 1
                    bus info: usb@2
                    logical name: usb2
                    version: 4.15
                    capabilities: usb-3.00
                    configuration: driver=hub slots=6 speed=5000Mbit/s
                  *-usb
                       description: Video
                       product: Intel(R) RealSense(TM) 3D Camera (Front F200)
                       vendor: Intel(R) RealSense(TM) 3D Camera (Front F200)
                       physical id: 3
                       bus info: usb@2:3
                       version: 27.80
                       serial: 032150074902
                       capabilities: usb-3.00
                       configuration: driver=uvcvideo maxpower=440mA speed=5000Mbit/s
            *-generic:0
                 description: Signal processing controller
                 product: Sunrise Point-LP Thermal subsystem
                 vendor: Intel Corporation
                 physical id: 14.2
                 bus info: pci@0000:00:14.2
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm msi cap_list
                 configuration: driver=intel_pch_thermal latency=0
                 resources: irq:18 memory:d2230000-d2230fff
            *-generic:1
                 description: Signal processing controller
                 product: Sunrise Point-LP Serial IO I2C Controller #0
                 vendor: Intel Corporation
                 physical id: 15
                 bus info: pci@0000:00:15.0
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm bus_master cap_list
                 configuration: driver=intel-lpss latency=0
                 resources: irq:16 memory:d222f000-d222ffff
            *-generic:2
                 description: Signal processing controller
                 product: Sunrise Point-LP Serial IO I2C Controller #1
                 vendor: Intel Corporation
                 physical id: 15.1
                 bus info: pci@0000:00:15.1
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm bus_master cap_list
                 configuration: driver=intel-lpss latency=0
                 resources: irq:17 memory:d222e000-d222efff
            *-communication
                 description: Communication controller
                 product: Sunrise Point-LP CSME HECI #1
                 vendor: Intel Corporation
                 physical id: 16
                 bus info: pci@0000:00:16.0
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm msi bus_master cap_list
                 configuration: driver=mei_me latency=0
                 resources: irq:127 memory:d222d000-d222dfff
            *-storage
                 description: SATA controller
                 product: Sunrise Point-LP SATA Controller [AHCI mode]
                 vendor: Intel Corporation
                 physical id: 17
                 bus info: pci@0000:00:17.0
                 version: 21
                 width: 32 bits
                 clock: 66MHz
                 capabilities: storage msi pm ahci_1.0 bus_master cap_list
                 configuration: driver=ahci latency=0
                 resources: irq:123 memory:d2228000-d2229fff memory:d222c000-d222c0ff ioport:f090(size=8) ioport:f080(size=4) ioport:f060(size=32) memory:d222b000-d222b7ff
            *-pci:0
                 description: PCI bridge
                 product: Intel Corporation
                 vendor: Intel Corporation
                 physical id: 1c
                 bus info: pci@0000:00:1c.0
                 version: f1
                 width: 32 bits
                 clock: 33MHz
                 capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
                 configuration: driver=pcieport
                 resources: irq:16 ioport:e000(size=4096) memory:c0000000-d00fffff
               *-display
                    description: Display controller
                    product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430]
                    vendor: Advanced Micro Devices, Inc. [AMD/ATI]
                    physical id: 0
                    bus info: pci@0000:01:00.0
                    version: 81
                    width: 64 bits
                    clock: 33MHz
                    capabilities: pm pciexpress msi bus_master cap_list rom
                    configuration: driver=radeon latency=0
                    resources: irq:126 memory:c0000000-cfffffff memory:d0000000-d003ffff ioport:e000(size=256) memory:d0040000-d005ffff
            *-pci:1
                 description: PCI bridge
                 product: Sunrise Point-LP PCI Express Root Port #5
                 vendor: Intel Corporation
                 physical id: 1c.4
                 bus info: pci@0000:00:1c.4
                 version: f1
                 width: 32 bits
                 clock: 33MHz
                 capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
                 configuration: driver=pcieport
                 resources: irq:16 memory:d2100000-d21fffff
               *-network
                    description: Wireless interface
                    product: Wireless 3160
                    vendor: Intel Corporation
                    physical id: 0
                    bus info: pci@0000:02:00.0
                    logical name: wlp2s0
                    version: 83
                    serial: 2c:6e:85:ef:ff:97
                    width: 64 bits
                    clock: 33MHz
                    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                    configuration: broadcast=yes driver=iwlwifi driverversion=4.15.0-20-generic firmware=17.608620.0 ip=192.168.0.21 latency=0 link=yes multicast=yes wireless=IEEE 802.11
                    resources: irq:128 memory:d2100000-d2101fff
            *-pci:2
                 description: PCI bridge
                 product: Sunrise Point-LP PCI Express Root Port #6
                 vendor: Intel Corporation
                 physical id: 1c.5
                 bus info: pci@0000:00:1c.5
                 version: f1
                 width: 32 bits
                 clock: 33MHz
                 capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
                 configuration: driver=pcieport
                 resources: irq:17 ioport:d000(size=4096) memory:d2000000-d20fffff
               *-network
                    description: Ethernet interface
                    product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
                    vendor: Realtek Semiconductor Co., Ltd.
                    physical id: 0
                    bus info: pci@0000:03:00.0
                    logical name: enp3s0
                    version: 07
                    serial: 84:7b:eb:45:9f:1d
                    size: 10Mbit/s
                    capacity: 100Mbit/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 autonegotiation
                    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-1_0.0.1 06/29/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
                    resources: irq:124 ioport:d000(size=256) memory:d2004000-d2004fff memory:d2000000-d2003fff
            *-isa
                 description: ISA bridge
                 product: Sunrise Point-LP LPC Controller
                 vendor: Intel Corporation
                 physical id: 1f
                 bus info: pci@0000:00:1f.0
                 version: 21
                 width: 32 bits
                 clock: 33MHz
                 capabilities: isa bus_master
                 configuration: latency=0
            *-memory UNCLAIMED
                 description: Memory controller
                 product: Sunrise Point-LP PMC
                 vendor: Intel Corporation
                 physical id: 1f.2
                 bus info: pci@0000:00:1f.2
                 version: 21
                 width: 32 bits
                 clock: 33MHz (30.3ns)
                 configuration: latency=0
                 resources: memory:d2224000-d2227fff
            *-multimedia
                 description: Audio device
                 product: Sunrise Point-LP HD Audio
                 vendor: Intel Corporation
                 physical id: 1f.3
                 bus info: pci@0000:00:1f.3
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 capabilities: pm msi bus_master cap_list
                 configuration: driver=snd_hda_intel latency=32
                 resources: irq:129 memory:d2220000-d2223fff memory:d2200000-d220ffff
            *-serial UNCLAIMED
                 description: SMBus
                 product: Sunrise Point-LP SMBus
                 vendor: Intel Corporation
                 physical id: 1f.4
                 bus info: pci@0000:00:1f.4
                 version: 21
                 width: 64 bits
                 clock: 33MHz
                 configuration: latency=0
                 resources: memory:d222a000-d222a0ff ioport:f040(size=32)
         *-scsi:0
              physical id: 1
              logical name: scsi0
              capabilities: emulated
            *-disk
                 description: ATA Disk
                 product: Samsung SSD 850
                 physical id: 0.0.0
                 bus info: scsi@0:0.0.0
                 logical name: /dev/sda
                 version: 3B6Q
                 serial: S3PTNF0JC24293F
                 size: 465GiB (500GB)
                 capabilities: gpt-1.00 partitioned partitioned:gpt
                 configuration: ansiversion=5 guid=d945d3a7-3e90-4378-a83c-7b21f7aee6c2 logicalsectorsize=512 sectorsize=512
               *-volume:0 UNCLAIMED
                    description: Windows FAT volume
                    vendor: mkfs.fat
                    physical id: 1
                    bus info: scsi@0:0.0.0,1
                    version: FAT32
                    serial: 673e-facf
                    size: 510MiB
                    capacity: 511MiB
                    capabilities: boot fat initialized
                    configuration: FATs=2 filesystem=fat name=EFI System Partition
               *-volume:1
                    description: EXT4 volume
                    vendor: Linux
                    physical id: 2
                    bus info: scsi@0:0.0.0,2
                    logical name: /dev/sda2
                    logical name: /
                    version: 1.0
                    serial: 1ea817d6-3df0-4153-b7ea-5ef27eee2d15
                    size: 465GiB
                    capabilities: journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized
                    configuration: created=2018-02-24 18:34:12 filesystem=ext4 lastmountpoint=/ modified=2018-05-12 12:45:14 mount.fstype=ext4 mount.options=rw,relatime,errors=remount-ro,data=ordered mounted=2018-05-12 12:45:15 state=mounted
         *-scsi:1
              physical id: 2
              logical name: scsi1
              capabilities: emulated
            *-cdrom
                 description: DVD-RAM writer
                 product: DVD+-RW SU-208GB
                 vendor: TSSTcorp
                 physical id: 0.0.0
                 bus info: scsi@1:0.0.0
                 logical name: /dev/cdrom
                 logical name: /dev/cdrw
                 logical name: /dev/dvd
                 logical name: /dev/dvdrw
                 logical name: /dev/sr0
                 version: H100
                 capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
                 configuration: ansiversion=5 status=nodisc
      *-battery
           product: DELL 991XP65
           vendor: LG
           physical id: 1
           version: 04/28/2016
           serial: 93C6
           slot: Sys. Battery Bay
           capacity: 41440mWh
           configuration: voltage=14.8V 

这是命令的输出lspci(当互联网正常工作时 - 当它再次发生时我会第二次运行它)

$ lspci -knn | grep Net -A3
02:00.0 Network controller [0280]: Intel Corporation Wireless 3160 [8086:08b3] (rev 83)
        Subsystem: Intel Corporation Dual Band Wireless AC 3160 [8086:8470]
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

^^ 这是正在工作的状态。

这些是我现在获得的确切日志(重新安装了 ubuntu)

May 17 17:59:13 8-bits kernel: [  359.017391] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmdsystem 
May 17 17:59:13 8-bits kernel: [  359.017478] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
May 17 17:59:13 8-bits kernel: [  359.017490] iwlwifi 0000:02:00.0: Scan failed! ret -5
May 17 17:59:14 8-bits kernel: [  360.037034] iwlwifi 0000:02:00.0: Failed to wake NIC for hcmd
May 17 17:59:14 8-bits kernel: [  360.037063] iwlwifi 0000:02:00.0: Error sending SCAN_OFFLOAD_REQUEST_CMD: enqueue_hcmd failed: -5
May 17 17:59:14 8-bits kernel: [  360.037066] iwlwifi 0000:02:00.0: Scan failed! ret -5
May 17 17:59:14 8-bits kernel: [  360.660055] usb usb1-port7: Cannot enable. Maybe the USB cable is bad?

答案1

关闭或启用省电功能,如下图所示:

$ cat /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
wifi.powersave = 3
# Slow sleep fix: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1670041
#wifi.powersave = 2
  • 编辑上面显示的网络管理器文件。
  • WiFi.powersave从更改23
  • 如果已经设置为,3请尝试将其设置为2
  • 保存文件后运行sudo systemctl restart NetworkManager

这些值代表什么?

  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2):禁用省电模式
  • NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): 启用省电功能

来源


英特尔具体答案

由此回答你可以试试:

您可以通过在终端中运行来修复它

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

然后重新启动。

您可以通过 恢复它sudo rm /etc/modprobe.d/iwlwifi-opt.conf

要保留 802.11n,您可以尝试该11n_disable=8选项。


由此问答你可以试试:

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi

如果这对当前会话有效,则可以将其设置为在启动时自动运行。

相关内容