Ubuntu – How to permanently install WiFi driver Realtek 8723DE in Ubuntu 18.04

18.04driversnetworkingrealtek

I installed Ubuntu 18.04 on my brand-new (2019) HP 15-da1005dx laptop, in dual boot with Windows 10. Unfortunately, ubuntu 18 does not support the Realtek 8723 Wi-Fi adapter, so when Ubuntu starts I get the "No Wi-Fi Adapter Found" warning and only ethernet wired connection is allowed. I installed the drivers and obtained Wi-Fi connection for a few months (WiFi adapter not found in Ubuntu 18.04), first with weak signal and then with a decent signal after reading and following MANY linux forums posts like this one (https://connectwww.com/how-to-solve-realtek-rtl8723be-weak-wifi-signal-problem-in-ubuntu/4625/). However, for some reason the driver stops working periodically and the "No Wi-Fi Adapter Found" warning reappears. I suspect this happens due to automatic system updates, but I'm not sure. Anyway, this last time I can't find a way to fix the problem.

Here I copy some relevant info:

  • inxi -SMNxxz:

System: Host: jdc-hp Kernel: 5.0.0-36-generic x86_64 bits: 64 gcc: 7.4.0
Desktop: Gnome 3.28.4 (Gtk 3.22.30-1ubuntu4) dm: gdm3
Distro: Ubuntu 18.04.3 LTS

Machine: Device: laptop System: HP product: HP Laptop 15-da1xxx v: Type1ProductConfigId serial: N/A
Mobo: HP model: 8532 v: 70.31 serial: N/A
UEFI: Insyde v: F.21 date: 07/25/2019
Chassis: type: 10 serial: N/A

Network: Card-1: Realtek RTL8111/8168/8411 PCIE Gigabit Ethernet Controller
driver: r8169 port: 4000 bus-ID: 01:00.0 chip-ID: 10ec:8168
Card-2: Realtek Device d723
port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:d723

  • I installed kernell>5 for some reason: uname -r = 5.0.0.36-generic

  • dkms status: rtl8723de, 5.1.1.8_21285.20171026_COEX20170111-1414, 5.0.0-36-generic, x86_64: installed (WARNING! Diff between built and installed module!) #I have installed and removed different drivers and evend dkms purge but keep getting the same warning

  • iwconfig: eno1/lo no wireless extensions

  • sudo modprobe rtl8723de: modprobe: ERROR: could not insert 'rtl8723de': Operation not permitted

Best Answer

Ok, I managed to solve the problem by doing the following:

1) In the BIOS boot options disabled the Secure Boot option.

2) Remove and reinstall the driver with these commands:

sudo dkms remove rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414 --all
sudo dkms add ./rtl8723de
sudo dkms install rtl8723de/5.1.1.8_21285.20171026_COEX20170111-1414

3) At this point a UEFI Secure Boot configuration window pops up. Generate a Machine-Owner Key (MOK). Then follow with reboot:

sudo depmod -a
reboot

4) When reebooting, a blue screen appeares to confirm the change using the previously generated MOK. Select the "Enroll MOK" option and enter the key.

After reboot I have WiFi connectivity in Ubuntu 18 again. In my previous attemps to install this driver I was not aware of this MOK option. Hope this time the driver keeps installed permanently. Cheers!

Related Question