Linux下无线网卡驱动异常解决办法

查看本机无线网卡型号:lspci | grep Network    本机型号是RTL8723BE

在 https://github.com/lwfinger/rtlwifi_new 找到自己对应型号的驱动


阅读README.md 

rtlwifi_new
A repo for the newest Realtek rtlwifi codes.

This code will build on any kernel 4.2 and newer as long as the distro has not modified any of the kernel APIs. IF YOU RUN UBUNTU, YOU CAN BE ASSURED THAT THE APIs HAVE CHANGED. NO, I WILL NOT MODIFY THE SOURCE FOR YOU. YOU ARE ON YOUR OWN!!!!!

It includes the following drivers:

rtl8192ce, rtl8192cu, rtl8192se, rtl8192de, rtl8188ee, rtl8192ee, rtl8723ae, rtl8723be, and rtl8821ae.

If you are looking for the driver for rtl8822be or rtl8723de, then execute the following command:

git checkout origin/extended -b extended
Installation instruction

You can find <> using lspci | grep Wireless. Afterwards, execute the following lines of codes in your shell:

You will need to install "make", "gcc", "kernel headers", "kernel build essentials", and "git".

If you are running Ubuntu, then

 sudo apt-get install linux-headers-generic build-essential git

Please note the first paragraph above.

For all distros:
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
sudo make install
sudo modprobe -r <<YOUR WIRELESS DRIVER CODE>>
sudo modprobe <<YOUR WIRELESS DRIVER CODE>>

#### Option configuration
If it turns out that your system needs one of the configuration options, then do the following:

vim /etc/modprobe.d/<<YOUR WIRELESS DRIVER CODE>>.conf 

There, enter the line below:
`options <<YOUR WIRELESS DRIVER CODE>> <<driver_option_name>>=<value>`

首先知道要内核版本至少要4.2版本(uname -r查看内核版本),若不符合要求则需要编译内核。

下载内核源码并解压进入源码安装包 推荐下载地址 https://www.kernel.org/ 找到合适版本的内核下载,我用的是4.4.126。

下载完成后执行下面命令

tar xvf linux-4.4.126.tar.xz -C /usr/src/kernels/ && cd /usr/src/kernels/linux-4.4.126
make oldconfig        //会出现很多选项,选择默认
make bzImage && make modules && make modules_install && make install     //等待编译安装完成
cat /boot/grub2/grub.cfg | grep menuentry        //查看系统可用内核
grub2-set-default 'Red Hat Enterprise Linux Server (4.4.126) 7.2 (Maipo)'    //修改开机默认使用的内核

执行完毕后重启即可。编译过程可参考https://blog.csdn.net/GuoQiiang/article/details/75810075

继续进入到要安装目录执行 make,若make出错

错误内容:“make: * /lib/modules/2.6.32-431.el6.x86_64/build:没有那个文件或目录”
-安装kernel-header和kernel-devel 解决错误     //kernel-header和kernel-devel可在 https://pkgs.org/ 上找到
-重新make
-make完成执行 make install
-最后执行 modprobe rtl8723be
注意:以上命令要在root用户下执行
然后重启系统你会发现你的无线网卡已经可以用了

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值