網路只能工作一兩分鐘,然後就不再運作了

網路只能工作一兩分鐘,然後就不再運作了

大約一分鐘後,wifi 停止工作,如下所示,它仍然連接到 wifi,但沒有資料傳輸。當我將核心升級到 4.17(從 4.15)時,這種情況就開始發生,當我運行 4.17 時,它甚至不會註冊我的 USB 適配器,但只能工作一分鐘左右。如果我使用相同的 wifi 適配器登入同一系統上的 Windows,一切都會正常運作。我已經確認這對我的普通 wifi 來說不是問題,因為當我在同一台機器上啟動到 Windows 時它可以工作,並且它也可以在我也運行 Ubuntu 的筆記型電腦上工作。在此之前,自從我切換到這台電腦以來,它已經工作了 5 個月,沒有出現任何問題。

我按照以下命令安裝驅動程式:

sudo git clone https://github.com/gnab/rtl8812au.git
sudo cp -r rtl8812au  /usr/src/rtl8812au-4.2.2
sudo dkms add -m rtl8812au -v 4.2.2
sudo dkms build -m rtl8812au -v 4.2.2
sudo dkms install -m rtl8812au -v 4.2.2

LSSB

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0bda:a811 Realtek Semiconductor Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 145f:01c1 Trust 
Bus 001 Device 002: ID 0c45:5104 Microdia 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

如果配置

enp33s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 30:9c:23:03:94:d2  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx000f004aa319: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 2600:1700:16e0:6d90:1522:cd74:5f8a:6dc3  prefixlen 64  scopeid 0x0<global>
        inet6 2600:1700:16e0:6d90:be9b:318:b16d:dfcf  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::ae05:cd57:188b:30dd  prefixlen 64  scopeid 0x20<link>
        ether 00:0f:00:4a:a3:19  txqueuelen 1000  (Ethernet)
        RX packets 10399  bytes 13031066 (13.0 MB)
        RX errors 0  dropped 1816  overruns 0  frame 0
        TX packets 5708  bytes 760985 (760.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1011  bytes 93331 (93.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1011  bytes 93331 (93.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sudo lshw -C 網絡

  *-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:21:00.0                                        
       logical name: enp33s0                                             
       version: 15                                                       
       serial: 30:9c:23:03:94:d2                                         
       size: 10Mbit/s                                                    
       capacity: 1Gbit/s                                                 
       width: 64 bits                                                    
       clock: 33MHz                                                      
       capabilities: pm msi pciexpress msix 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=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII speed=10Mbit/s                             
       resources: irq:35 ioport:f000(size=256) memory:fe604000-fe604fff memory:fe600000-fe603fff
  *-network                                                              
       description: Wireless interface                                   
       physical id: 1                                                    
       bus info: usb@3:1                                                 
       logical name: enx000f004aa319                                     
       serial: 00:0f:00:4a:a3:19                                         
       capabilities: ethernet physical wireless                                                                                                       
       configuration: broadcast=yes driver=rtl8812au multicast=yes wireless=IEEE 802.11bgn         

答案1

  • 目前,Ubuntu 已將該驅動程式包含在其儲存庫中。對於 Ubuntu,您必須啟用 Universe 軟體套件來源。

    sudo apt-get 更新

    sudo apt-get install r8168-dkms

重啟

但即便如此,它可能並不完美,因為驅動程式不是開源的,而且核心最新至 4.15此時此刻。

它們可以從以下位置下載https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software

最終他們將更新驅動程序,套件管理器將更新包,因此等待可能是一個選擇,但您需要安裝包才能執行此操作。

  • 因此,第二個選項是將核心降級到 4.15,這樣您就可以確保 WIFI 能夠正常工作。 (無論如何我都會安裝正確的驅動程式。)如何降級內核

相關內容