I've bought a laptop with Realtek rtl8723bu wifi adapter. Wifi works slowly and with weak signal compared to windows. I've search on the net and there are some solutions that download a driver from github, but none of them worked for me (I get an error since the fist step). What could I do? Thanks a lot.

I've followed these steps:

1st Step:

sudo apt install build-essential dkms
sudo apt install git
git clone https://github.com/lwfinger/rtl8723bu.git
sudo apt install libelf-dev

2nd Step:

sudo -i
echo blacklist rtl8xxxu >> /etc/modprobe.d/blacklist.conf

This ensured that the old driver was not be used for my device. In my case the problematic driver was rtl8xxxu. So I black listed it.

3rd Step: Now I disabled a line in the makefile of the new driver, because without this hack, two instances of the wireless chipset was shown in Network Manager

cd rtl8723bu
nano Makefile

Go down to line 21 and change this line:


To comment it out, like this:


Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor.

4th Step: Now build and install the driver:

source dkms.conf
sudo mkdir /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
sudo cp -r core hal include os_dep platform dkms.conf Makefile rtl8723b_fw.bin /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
sudo dkms autoinstall $PACKAGE_NAME/$PACKAGE_VERSION

5th Step: Finally, install the compiled module with this command:

sudo make install

But I can't dkms fail on fist step. Also I wonder if that's a secure thing to do.

  • 1
    You need to post the steps you are trying and errors that you get.
    – Pilot6
    Sep 19, 2019 at 7:55
  • You can't do make install and dkms at the same time. And what do you mean by "dkms fail on fist step"?
    – Pilot6
    Sep 19, 2019 at 16:48

1 Answer 1


Works fine for me. No build errors. Tested it in VM with Ubuntu 18.04LTS. I did all steps except make and make install, which are not needed and must not be done with DKMS.

make + make install are for manual installation only if you do not use DKMS. Then you have to do make + make install every time you install new kernel or you have no driver with your new kernel. That is why DKMS was inveted - so you do not have to. Everything is automatic with DKMS.

My build log, no errors:

$ sudo dkms autoinstall $PACKAGE_NAME/$PACKAGE_VERSION

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=4.15.0-70-generic -C /lib/modules/4.15.0-70-generic/build M=/var/lib/dkms/rtl8723bu/
cleaning build area...

DKMS: build completed.

Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.0-70-generic/updates/dkms/


DKMS: install completed.

If you did make install, then you have to clean it up before trying again. Try that (replace /path/to with real path):

cd /path/to/rtl8723bu
sudo make uninstall

And then try again without make and make install If you have not done anything else then you probably only need those two lines from 4th step:

source dkms.conf
sudo dkms autoinstall $PACKAGE_NAME/$PACKAGE_VERSION

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.