Ubuntu 伺服器不想啟用我的筆記型電腦(Lenovo 300e 第二代)上的 wifi 網路介面:wlp0s12f0:State DOWN
我嘗試了 ifup、iwconfig 和 ifconfig。我想將我的筆記型電腦連接到 wifi,但它似乎不起作用,而且當我嘗試掃描 ESSID(wifi 網路)時也沒有結果,我對 Linux 很陌生,這是我迄今為止最大的問題。
我可以透過乙太網路存取互聯網,但我想使用 wifi。我還嘗試下載英特爾驅動程式(Intel® Wireless-AC 9560)https://www.intel.com/content/www/us/en/support/articles/000005511/wireless.html 並按照自述文件中的說明進行操作,但它似乎不起作用。也許我錯誤地安裝了韌體?
順便說一句,rfkill 顯示一切都已暢通無阻,無論是硬塊還是軟塊。
我甚至無法調出介面。當我用 iwlist 掃描附近網路時,結果是:「介面不支援掃描」。雖然我之前在筆記型電腦上使用過 WiFi,但當時我的筆記型電腦上有 Windows(而且效果很好)。
任何幫助,將不勝感激!我會盡力遵循解釋。
命令結果:
結果inxi -F
System: Host: tinisan Kernel: 5.4.0-92-generic x86_64 bits: 64 Console: tty 0
Distro: Ubuntu 20.04.3 LTS (Focal Fossa)
Machine: Type: Convertible System: LENOVO product: 81M9 v: Lenovo 300e 2nd Gen
serial: <superuser/root required>
Mobo: LENOVO model: LNVNB161216 v: SDK0K13476 WIN serial: <superuser/root required>
UEFI: LENOVO v: 9ZCN52WW date: 01/14/2021
Battery: ID-1: BAT1 charge: 26.8 Wh condition: 38.8/42.0 Wh (92%)
CPU: Topology: Quad Core model: Intel Celeron N4100 bits: 64 type: MCP L2 cache: 4096 KiB
Speed: 1274 MHz min/max: 800/2400 MHz Core speeds (MHz): 1: 1359 2: 1492 3: 1115
4: 1437
Graphics: Device-1: Intel UHD Graphics 605 driver: i915 v: kernel
Display: server: No display server data found. Headless machine? tty: 99x31
Message: Advanced graphics data unavailable in console. Try -G --display
Audio: Device-1: Intel driver: snd_hda_intel
Sound Server: ALSA v: k5.4.0-92-generic
Network: Device-1: Intel driver: iwlwifi
IF: wlp0s12f0 state: down mac: dc:fb:48:86:58:ee
Device-2: TP-Link USB 10/100/1000 LAN type: USB driver: r8152
IF: enx60a4b7714185 state: up speed: 1000 Mbps duplex: full mac: 60:a4:b7:71:41:85
Drives: Local Storage: total: 119.24 GiB used: 8.32 GiB (7.0%)
ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN520 SDAPMUW-128G-1101
size: 119.24 GiB
Partition: ID-1: / size: 116.38 GiB used: 8.31 GiB (7.1%) fs: ext4 dev: /dev/nvme0n1p2
Sensors: System Temperatures: cpu: 24.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info: Processes: 146 Uptime: 15m Memory: 3.65 GiB used: 349.3 MiB (9.3%) Init: systemd
runlevel: 5 Shell: bash inxi: 3.0.38
結果sudo modprobe iwlwifi && sudo dmesg | grep -e iwl -e wlp
:
[ 8.048173] iwlwifi 0000:00:0c.0: loaded firmware version 46.4d093a30.0 op_mode iwlmvm
[ 8.108533] iwlwifi 0000:00:0c.0: Detected Intel(R) Dual Band Wireless AC 9560, REV=0x318
[ 8.163397] iwlwifi 0000:00:0c.0: base HW address: dc:fb:48:86:58:ee
[ 8.228987] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[ 8.354235] iwlwifi 0000:00:0c.0 wlp0s12f0: renamed from wlan0
結果ls /etc/netplan
:
00-installer-config-wifi.yaml 00-installer-config.yaml
結果cat /etc/netplan/*.yaml
# This is the network config written by 'subiquity'
network:
version: 2
wifis: {}
# This is the network config written by 'subiquity'
network:
ethernets:
enx60a4b7714185:
dhcp4: true
version: 2
遺憾的是這沒有用。填寫了所有內容,更改了名稱和密碼,但仍處於 DOWN 狀態
2: wlp0s12f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether dc:fb:48:86:58:ee brd ff:ff:ff:ff:ff:ff
sudo dmesg | grep wlp
應用新產生的 netplan 配置後的結果。
[34755.190465] wlp0s12f0: authenticate with b4:fb:e4:78:75:cd
[34755.201294] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 1/3)
[34755.279308] wlp0s12f0: authenticated
[34755.284008] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 1/3)
[34755.385325] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 2/3)
[34755.388226] wlp0s12f0: RX AssocResp from b4:fb:e4:78:75:cd (capab=0x411 status=0 aid=4)
[34755.391786] wlp0s12f0: associated
[34807.753881] wlp0s12f0: Connection to AP b4:fb:e4:78:75:cd lost
[38541.222178] wlp0s12f0: authenticate with b4:fb:e4:78:75:cd
[38541.233213] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 1/3)
[38541.275182] wlp0s12f0: authenticated
[38541.279868] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 1/3)
[38541.286145] wlp0s12f0: RX AssocResp from b4:fb:e4:78:75:cd (capab=0x411 status=0 aid=4)
[38541.291834] wlp0s12f0: associated
[38543.403938] wlp0s12f0: Connection to AP b4:fb:e4:78:75:cd lost
[42456.806210] wlp0s12f0: authenticate with b4:fb:e4:78:75:cd
[42456.816128] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 1/3)
[42456.870032] wlp0s12f0: authenticated
[42456.873037] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 1/3)
[42456.879343] wlp0s12f0: RX AssocResp from b4:fb:e4:78:75:cd (capab=0x411 status=0 aid=4)
[42456.884181] wlp0s12f0: associated
[42475.575404] wlp0s12f0: Connection to AP b4:fb:e4:78:75:cd lost
[44469.947395] wlp0s12f0: authenticate with b4:fb:e4:78:75:cd
[44469.956658] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 1/3)
[44469.999258] wlp0s12f0: authenticated
[44470.001978] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 1/3)
[44470.102939] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 2/3)
[44470.204198] wlp0s12f0: associate with b4:fb:e4:78:75:cd (try 3/3)
[44470.345939] wlp0s12f0: association with b4:fb:e4:78:75:cd timed out
[72354.380233] wlp0s12f0: authenticate with b4:fb:e4:78:75:cd
[72354.390174] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 1/3)
[72354.529904] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 2/3)
[72354.728173] wlp0s12f0: send auth to b4:fb:e4:78:75:cd (try 3/3)
[72354.830578] wlp0s12f0: authentication with b4:fb:e4:78:75:cd timed out
編輯:碰撞。
我認為問題與無法運行的驅動程式或韌體有關,但是我如何知道我需要什麼軟體/韌體?再次強調,任何幫助將不勝感激!
答案1
我建議您編輯 netplan 檔案:
sudo nano /etc/netplan/00-installer-config-wifi.yaml
將文件修改為:
network:
version: 2
renderer: networkd
wifis:
wlp0s12f0:
dhcp4: yes
access-points:
"********":
password: "********"
當然,請在此處替換您的具體詳細資訊。 Netplan對縮排、間距等要求嚴格,所以要仔細校對兩次。
儲存 (Ctrl+o) 並退出 (Ctrl+x) 文字編輯器 nano。
跟隨:
sudo netplan generate
sudo netplan apply
您的無線網路現在應該可以工作,但是可能需要重新啟動。
如果您需要靜態 IP 位址,請參閱範本:
cat /usr/share/doc/netplan/examples/static.yaml
我還建議您將另一個文件修改為:
network:
ethernets:
enx60a4b7714185:
dhcp4: true
optional: true
version: 2
我認為,一旦無線工作正常,您就很少使用乙太網路。啟動不需要或不應在啟動期間等待的介面應具有可選:真密鑰已新增至其中。這將防止可能無法啟動的介面長時間延遲啟動。 (1)
再次儲存、退出並:
sudo netplan generate
sudo netplan apply
編輯:我們在您的日誌中反覆注意到這一點:
與 AP b4:fb:e4:78:75:cd 的連線遺失
我建議您使用我的建議來解決路由器中的設定:在 ubuntu 18.04 連線一段時間後 wifi 停止運作