濰坊網(wǎng)站建設(shè)聯(lián)系方式東莞網(wǎng)站seo公司哪家大
文章目錄
- 設(shè)備信息
- 1. Ubuntu WiFi不可用解決方式
- 查看Mac的網(wǎng)卡型號(hào)
- 根據(jù)網(wǎng)卡型號(hào)搜索獲取到的解決方法
- 查看WiFi名字
- 問(wèn)題
- 參考鏈接
- 2. 解決WiFi重啟后失效問(wèn)題
- 打開(kāi)終端創(chuàng)建.sh腳本文件
- 編輯腳本文件
- 復(fù)制粘貼腳本
- 修改腳本權(quán)限
- 創(chuàng)建并編輯systemd service文件
- 復(fù)制粘貼下文到systemd service文件
- 啟動(dòng)service
- 設(shè)置service開(kāi)機(jī)自啟
- 重啟即可
- 如何撤銷(xiāo)上面的操作
- 參考鏈接
- 3. 解決 5G WiFi的問(wèn)題
- 下載 brcmfmac43602-pcie.txt 文件
- 修改文件中macaddr地址
- 把文件復(fù)制到/lib/firmware/brcm,然后重啟
- 參考鏈接
Mac(macOS 13.3)中安裝Ubuntu 22.04.3,Ubuntu的WiFi和WiFi 5G網(wǎng)絡(luò)不可以使用,通過(guò)查找找到解決方案,記錄下。
設(shè)備信息
Mac:macOS 13.3
Ubuntu 22.04.3
網(wǎng)卡型號(hào):Broadcom Inc. and subsidiaries BCM43602 802.11ac Wireless LAN SoC
1. Ubuntu WiFi不可用解決方式
因?yàn)閁buntu的網(wǎng)卡驅(qū)動(dòng)不可用導(dǎo)致的問(wèn)題。
查看Mac的網(wǎng)卡型號(hào)
lspci | less # 搜索network controller
# 結(jié)果例如:Network controller: Broadcom Inc. and subsidiaries BCM43602 802.11ac Wireless LAN SoC
根據(jù)網(wǎng)卡型號(hào)搜索獲取到的解決方法
sudo apt-get purge bcmwl-kernel-source
sudo apt update
sudo update-pciids
sudo apt install firmware-b43-installer
reboot
查看WiFi名字
使用ifconfig或者ip addr查看。
然后執(zhí)行命令
sudo iwconfig wlp3s0 txpower 10dBm #wlp3s0是剛查看的WiFi名字
問(wèn)題
安裝Ubuntu網(wǎng)卡驅(qū)動(dòng)后,WiFi可以使用了,但是還有兩個(gè)問(wèn)題。
問(wèn)題一:
sudo iwconfig wlp3s0 txpower 10dBm #wlp3s0是剛查看的WiFi名字
每次重啟后失效,開(kāi)機(jī)后都需要手動(dòng)輸入。
問(wèn)題二:
只有2.4G WiFi可以使用,5G WiFi不可以使用。
參考鏈接
https://zhuanlan.zhihu.com/p/60617749?utm_id=0
https://github.com/Dunedan/mbp-2016-linux
2. 解決WiFi重啟后失效問(wèn)題
把iwconfig wlp3s0 txpower 10dBm命令添加到root啟動(dòng)項(xiàng)中。
打開(kāi)終端創(chuàng)建.sh腳本文件
sudo touch /opt/captain.sh # 在/opt中創(chuàng)建captain.sh文件
編輯腳本文件
gedit admin:///opt/captain.sh
復(fù)制粘貼腳本
iwconfig wlp3s0 txpower 10dBm #已經(jīng)有root權(quán)限了,不再需要添加sudo
修改腳本權(quán)限
sudo chmod u+x /opt/captain.sh
創(chuàng)建并編輯systemd service文件
sudo touch /etc/systemd/system/captain.service
gedit admin:///etc/systemd/system/captain.service
復(fù)制粘貼下文到systemd service文件
[Unit]
Description=Captain service
After=network.target[Service]
ExecStart=/opt/captain.sh[Install]
WantedBy=multi-user.target
啟動(dòng)service
sudo systemctl start captain
設(shè)置service開(kāi)機(jī)自啟
sudo systemctl enable captain
重啟即可
reboot
如何撤銷(xiāo)上面的操作
按順序執(zhí)行下面命令并重啟即可撤銷(xiāo)上面的操作。
sudo systemctl stop captainsudo systemctl disable captainsudo rm -v /opt/captain.shsudo rm -v /etc/systemd/system/captain.service
參考鏈接
https://gist.github.com/torresashjian/e97d954c7f1554b6a017f07d69a66374
https://easylinuxtipsproject.blogspot.com/p/root-command-startup.html
3. 解決 5G WiFi的問(wèn)題
下載 brcmfmac43602-pcie.txt 文件
下載地址:https://bugzilla.kernel.org/attachment.cgi?id=285753
修改文件中macaddr地址
使用 ifconfig 查看網(wǎng)卡信息,ether 字段值就是 macaddr,復(fù)制粘貼到brcmfmac43602-pcie.txt的macaddr中。
#需要替換的內(nèi)容
macaddr=xx:xx:xx:xx:xx:xx
把文件復(fù)制到/lib/firmware/brcm,然后重啟
sudo cp brcmfmac43602-pcie.txt /lib/firmware/brcm
reboot
參考鏈接
https://github.com/Dunedan/mbp-2016-linux/issues/47