26

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?

lspci -v | grep -i network
02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723
pomsky
  • 68,507
  • We need more hardware information to help you, can you look at this question and then edit your question adding the information. – J. Starnes Dec 05 '17 at 00:04
  • 1
    Wi-Fi is usually automatically installed. Open your terminal with ++T and type lspci -v | grep -i network copy the screen output and add it to your question. – WinEunuuchs2Unix Dec 05 '17 at 01:45
  • heidy@heidy-HP-Laptop-15-bs0xx:~$ lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723 heidy@heidy-HP-Laptop-15-bs0xx:~$ – heidi silva Dec 05 '17 at 05:47
  • 2
    The requested command does not identify the WiFi device correctly. Please [edit] your question and add output of lspci -knn | grep Net -A3 terminal command instead. –  Dec 05 '17 at 17:35
  • These are the information that come, but I still can not access the wireless network heidy@heidy-HP-Laptop-15-bs0xx:~$ sudo lsmod | grep r81 [sudo] senha para heidy: r8169 81920 0 mii 16384 1 r8169 heidy@heidy-HP-Laptop-15-bs0xx:~$ lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723 heidy@heidy-HP-Laptop-15-bs0xx:~$ – heidi silva Dec 07 '17 at 11:01
  • What do you mean by no icon here exactly? Please [edit] your question and include the output of nmcli d status as well. – dobey Dec 23 '17 at 14:25
  • 3
    The bluetooth device can also be activated. See https://askubuntu.com/questions/1033968/how-to-activate-bluetooth-device-for-rtl8723de – Pilot6 May 09 '18 at 10:28

5 Answers5

26

You may use the driver hosted at Larry Finger's rtlwifi_new git repository. You would have to disable secure boot from the the BIOS/EFI first. Also make sure you have linux-headers for the respective kernel(s) and build-essential package installed. Then follow the steps below (you need to be connected to the internet by some other mean).

  1. Install git and dkms if they're not installed by running

    sudo apt install git dkms
    
  2. Clone the repository

    git clone -b extended --single-branch https://github.com/lwfinger/rtlwifi_new.git
    
  3. Run the following commands to install

    sudo dkms add rtlwifi_new
    sudo dkms install rtlwifi-new/0.6
    
  4. Reboot.

This should also work with newer kernels (and hence on Ubuntu 18.04 too).

Note: If you get very weak signal try changing your antenna selection

sudo tee /etc/modprobe.d/rtl8723de.conf <<< "options rtl8723de ant_sel=2"

(or ant_sel=1 if 2 doesn't help).

(Source)


See this for Bluetooth: How to activate bluetooth device for RTL8723DE?

pomsky
  • 68,507
  • 1
    This worked for me. The laptop I use is HP BS180TX. Ubuntu version 18.04 LTS. Kernel 4.15.0-20-generic. – arshad May 08 '18 at 18:28
  • 2
    The DKMS install is preferable. I suggest leaving only the DKMS way or explaining that. Newbies run all the commands and have trouble. – Pilot6 Jun 06 '18 at 21:27
  • it mount the interface under /sys/class/net and ip link show the wireless listed, but i can't ip link set interface up, itsn't not effective, any idea why? – Error Sep 18 '18 at 16:46
  • https://unix.stackexchange.com/questions/469809/wireless-module-state-cant-be-rendered-up can you help? – Error Sep 18 '18 at 18:15
  • 1
    This worked for me. My laptop model is 15q-ds0009TU – Vishal Zanzrukia Dec 29 '18 at 13:07
  • This didn't work for me, but THIS did. – olfek Feb 17 '19 at 19:30
  • @pomsky Will these commands work for me as well ? This is my ethernet - product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller and I have a Dell vostro 3800 – gansub Nov 03 '19 at 08:08
  • 1
    Working on 19.10, kernel 5-3-0*, HP 14q-cs0025TU. – Zanna Nov 28 '19 at 06:47
  • Not working 18.04.3 fresh install Kernel 5.0.0-23-generic HP 15 db0xxx, Device [10ec:d723] secure boot off, can't make Fails no gcc, can't install gcc, Can't invoke DKMS can't install dkms using working lan. Opening a new question doesn't make sense to me but I will if asked to or if no comment finds me I am truly perplexed. dkms depends dpkg-dev - will not be installed – xtrchessreal Dec 06 '19 at 04:20
  • NOW working HP Notebook - 15-db0015dx same as above comment. Re-installed 18.04.3 with wired lan connection updated during install and directly after, then followed steps above. However I was careful to install dkms first, then git, just to be sure I did not get the broken packages as before. It may be important to have a wired Lan connected to avoid issues such as I had. Its nice to have this behind me - Thanks for all the great information. – xtrchessreal Dec 09 '19 at 06:22
  • https://github.com/lwfinger/rtlwifi_new.git gives me a http 404: not found error page – Dániel Kis Dec 29 '21 at 09:43
11

There is new information on this device! With a temporary working internet connection, open a terminal and do:

sudo apt update
sudo apt install build-essential dkms git
git clone https://github.com/jeremyb31/rtl8723de.git
sudo dkms add ./rtl8723de
sudo dkms build rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
sudo dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414

Reboot and let us hear your report.

This won't work for Ubuntu 18.04 because of the new kernel incompatibility.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
chili555
  • 60,188
  • I think dkms install is necessary too (which invokes build if necessary). – David Foerster Feb 08 '18 at 14:40
  • 4
    when I'm trying to execute last command it shows this: `Kernel preparation unnecessary for this kernel. Skipping...

    Building module: cleaning build area.... 'make' all KVER=4.15.3-041503-generic....(bad exit status: 2) ERROR (dkms apport): binary package for rtl8723de: 5.1.1.8_21285.20171026_COEX20170111-1414 not found Error! Bad return status for module build on kernel: 4.15.3-041503-generic (x86_64) Consult /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/make.log for more information.`

    – Jay Patel Feb 12 '18 at 13:18
  • @JayPatel I suggest that you start your own new question and include the result of: dkms status. – chili555 Feb 12 '18 at 13:52
  • When I tried this got an error when executing the 5th command. ERROR (dkms apport): binary package for rtl8723de: 5.1.1.8_21285.20171026_COEX20170111-1414 not found Error! Bad return status for module build on kernel: 4.15.0-20-generic (x86_64) Consult /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/make.log for more information. – arshad May 08 '18 at 16:52
  • @arshad suggest that you start your own new question and include the result of: cat /var/lib/dkms/rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414/build/make.log – chili555 May 08 '18 at 17:57
  • @chili555 This is my network card - product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller. Will the same commands work for me as well ? – gansub Nov 03 '19 at 08:07
  • @gansub That is ethernet, not wireless. – chili555 Nov 03 '19 at 12:42
2

If you want to keep secure boot enabled, then the previously posted solutions probably will not work for you. Instead I kept secure boot enabled and did the following:

Create a set of keys for signing:

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive common name/"

Import the key. You'll be prompted for a password here, which you'll need to remember. Your BIOS should prompt you for the password after the reboot.

sudo mokutil --import MOK.der

Restart:

reboot

You should have been prompted by your BIOS for the password. Assuming that worked, then you'll want to test that your MOK was successfully enrolled.

mokutil --test-key MOK.der

Now that your MOK has been enrolled. You'll need to install the drivers for you wifi.

git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
git checkout extended
sudo make install

You're drivers are available for adding to your kernel, but you need to sign them first before adding them because you have secure boot enabled. So use the keys you generated earlier to sign your drivers.

sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n rtlwifi)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n rtl_pci)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n btcoexist)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n rtl8723-common)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n phydm_mod)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n rtl8723de)

Finally, add the rtl8723de drivers to the kernel in this order

sudo modprobe -r rtlwifi
sudo modprobe rtlwifi
sudo modprobe -r rtl_pci
sudo modprobe rtl_pci
sudo modprobe -r btcoexist
sudo modprobe btcoexist
sudo modprobe -r rtl8723-common
sudo modprobe rtl8723-common
sudo modprobe -r phydm_mod
sudo modprobe phydm_mod
sudo modprobe -r rtl8723de
sudo modprobe rtl8723de

On a side note: for the final step you might be able to get away with just writing:

sudo modprobe -r rtl8723de
sudo modprobe rtl8723de

modprobe knows which drivers rtl8723de depends on and should therefore be able to add everything that rtl8723de depends on along with rtl8723de. However, I didn't add my drivers this way and thus, can't guarantee this option will work.


Sources: 1, 2, 3

johnnyodonnell
  • 231
  • 2
  • 5
  • Hi @johnnyodonnell, so I was helping a student with this specific card and I have to say thank you. From a couple of days of researching the ONLY one that helped in the case of using Secure Boot was your answer. +1 to you and the amount of time and dedication you put into this because, going through it, step by step, we had no issues at all and it solved the whole wifi problem. Thank you friend. – Luis Alvarado Feb 09 '20 at 17:29
  • 1
    @LuisAlvarado Wow - that's awesome! Glad to hear it worked for you! – johnnyodonnell Feb 09 '20 at 17:36
2

Realtek RTL8723DE module for Linux kernel 5 and later

Install:

sudo apt update 
sudo apt install build-essential dkms git
git clone https://github.com/smlinux/rtl8723de.git -b current
sudo dkms add ./rtl8723de
sudo dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
sudo depmod -a
sudo reboot

Uninstall:

sudo rmmod -f 8723de
sudo dkms uninstall rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414
sudo dkms remove rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414 --all
sudo depmod -a
sudo reboot
karel
  • 114,770
1

For kernels 4.19+ drivers for RTL8822BE, RTL8822CE, RTL8821CE, and RTL8723DE are located in rtw88 branch of Larry Finger's git repo.

Install them by running

sudo apt update
sudo apt install git dkms
git clone https://github.com/lwfinger/rtw88.git
sudo dkms add ./rtw88
sudo dkms install rtlwifi-new/0.6
Pilot6
  • 90,100
  • 91
  • 213
  • 324