我刚刚在我的HP-149tx和 Windows 上安装了 16.04。我无法从 Ubuntu 访问 Wifi。即使我将笔记本电脑靠近路由器,信号也太弱。我可以确认这是驱动程序问题,因为我可以从 Windows 完美访问我的 Wifi。
我尝试纠正此问题的方法是尝试按照此处指定的说明下载并安装 wifi 驱动程序。安装驱动程序时遇到的问题如下:
(Reading database ... 174937 files and directories currently installed.)
Preparing to unpack rtlwifi-new-dkms_0.10_all.deb ...
------------------------------
Deleting module version: 0.10
completely from the DKMS tree.
------------------------------
Done.
Unpacking rtlwifi-new-dkms (0.10) over (0.10) ...
Setting up rtlwifi-new-dkms (0.10) ...
Loading new rtlwifi-new-0.10 DKMS files...
First Installation: checking all kernels...
Building only for 4.8.0-36-generic
Building for architecture x86_64
Building initial module for 4.8.0-36-generic
Error! Bad return status for module build on kernel: 4.8.0-36-generic (x86_64)
Consult /var/lib/dkms/rtlwifi-new/0.10/build/make.log for more information.
make.log 的内容也如下:
DKMS make.log for rtlwifi-new-0.10 for kernel 4.8.0-36-generic (x86_64)
Sun Jul 30 17:10:27 IST 2017
make: Entering directory '/usr/src/linux-headers-4.8.0-36-generic'
LD /var/lib/dkms/rtlwifi-new/0.10/build/built-in.o
CC [M] /var/lib/dkms/rtlwifi-new/0.10/build/base.o
In file included from /var/lib/dkms/rtlwifi-new/0.10/build/base.c:30:0:
/var/lib/dkms/rtlwifi-new/0.10/build/wifi.h:1327:40: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function)
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
^
/var/lib/dkms/rtlwifi-new/0.10/build/base.c:138:10: error: ‘IEEE80211_BAND_2GHZ’ undeclared here (not in a function)
.band = IEEE80211_BAND_2GHZ,
^
/var/lib/dkms/rtlwifi-new/0.10/build/base.c:150:10: error: ‘IEEE80211_BAND_5GHZ’ undeclared here (not in a function)
.band = IEEE80211_BAND_5GHZ,
^
scripts/Makefile.build:289: recipe for target '/var/lib/dkms/rtlwifi-new/0.10/build/base.o' failed
make[1]: *** [/var/lib/dkms/rtlwifi-new/0.10/build/base.o] Error 1
Makefile:1491: recipe for target '_module_/var/lib/dkms/rtlwifi-new/0.10/build' failed
make: *** [_module_/var/lib/dkms/rtlwifi-new/0.10/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.8.0-36-generic'
我可以确认我的 wifi 网卡是 Realtek RTL8723BE 设备,因为这是我的 Windows 操作系统识别它的设备,并且我已经为它安装了 Windows 等效驱动程序并且它在那里工作正常。
modinfo rtl8723be 的输出如下:
alex@alex-HP-Notebook:~/Desktop/rtlwifi_new-master$ modinfo rtl8723be
filename: /lib/modules/4.8.0-36-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723be/rtl8723be.ko
firmware: rtlwifi/rtl8723befw.bin
description: Realtek 8723BE 802.11n PCI wireless
license: GPL
author: Realtek WlanFAE <[email protected]>
author: PageHe <[email protected]>
srcversion: 1520FD8B69687790125304A
alias: pci:v000010ECd0000B723sv*sd*bc*sc*i*
depends: rtlwifi,rtl8723-common,rtl_pci,btcoexist,mac80211
intree: Y
vermagic: 4.8.0-36-generic SMP mod_unload modversions
parm: swenc:Set to 1 for software crypto (default 0)
(bool)
parm: ips:Set to 0 to not use link power save (default 1)
(bool)
parm: swlps:Set to 1 to use SW control power save (default 0)
(bool)
parm: fwlps:Set to 1 to use FW control power save (default 1)
(bool)
parm: msi:Set to 1 to use MSI interrupts mode (default 0)
(bool)
parm: debug:Set debug level (0-5) (default 0) (int)
parm: disable_watchdog:Set to 1 to disable the watchdog (default 0)
(bool)
parm: ant_sel:Set to 1 or 2 to force antenna number (default 0)
我的路由器也配置了以下参数:
Wireless Band: 2.4 GHz
802.11 Mode: Mixed 802.11n, 802.11g, 802.11b
Auto Channel Scan enabled
Wireless Channel : 2.437 GHz - CH 6
Channel Width: Auto 20/40 MHz
很多时候,弱信号是天线线连接到卡上的连接 #1 的症状,而默认驱动程序希望在连接 #2 上看到信号。当然,您可以打开笔记本电脑并切换电线,或者您可以指示驱动程序明确选择工作天线连接。首先,尝试连接 #1:
重新启动并测试。如果这无效,请尝试#2:
4.8 或 4.10 内核不需要该
rtkwifi-new
模块。你需要卸载它。跑
然后使用这个答案来解决弱信号问题。
您尝试编译的代码可能适用于低于 4.7 的内核版本。这是删除这些枚举的特定提交。
在驱动程序的源代码中,您可以尝试将此作为快速修复。
你检查过你的wifi信号强度吗?我建议您使用 wifi 扫描仪https://www.netspotapp.com/wireless-network-wifi-scanner.html来监控您的网络并首先确定问题区域。我认为问题可能在于您家的背景噪音水平。