Wifi-Adapter not found, then fixed, now lost again, same solution does not work: Exec format error

Alex

I am using my new HP laptop with a clean installation of Ubuntu 18.04, named Bionic Beaver. Because the wifi-adapter wasn't detected, I followed the steps in this article: http://ubuntuhandbook.org/index.php/2018/08/no-wifi-adapter-found-hp-laptops-ubuntu-18-04/

And after that it worked fine. Here are those steps:

git clone https://github.com/lwfinger/rtlwifi_new.git

cd rtlwifi_new/ && git checkout origin/extended -b extended

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

sudo make install

sudo modprobe -r rtl8723de

sudo modprobe rtl8723de

It worked! It was weak, but with the following command it got stronger:

sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=2

I was happy, and later I shut down the computer. Today, I started it up, and the wifi-adapter again was not detected. I still had the git repository, and the extended branch, so I ran the commands again, thinking I would have to make a script to run every time on start up.

but running the sudo modprobe rtl8723de command yields the following error:

modprobe: ERROR: could not insert 'rtl8723de': Exec format error

Based on a comment in this thread, which was not conclusively answered, I tried 'sudo make uninstall' comment from Pilot6

But it did not detect the wifi, and when I reinstalled, it was the same.

Why did my fix not 'stick'? And how can I 'reset' or get it to work again?


As directed in a comment, here are the results of running make:

make -C /lib/modules/4.18.0-16-generic/build M=/home/alex/rtlwifi_new modules make[1]: Entering directory '/usr/src/linux-headers-4.18.0-16-generic' Building modules, stage 2. MODPOST 19 modules make[1]: Leaving directory '/usr/src/linux-headers-4.18.0-16-generic'

Separating these commands has no effect on the output from sudo modprobe rtl8723de


Again as directed:

Results of : dpkg -l * 4.18 * | grep ii

ii linux-headers-4.18.0-15 4.18.0-15.16~18.04.1 all Header files related to Linux kernel version 4.18.0 ii linux-headers-4.18.0-15-generic 4.18.0-15.16~18.04.1 amd64 Linux kernel headers for version 4.18.0 on 64 bit x86 SMP ii linux-headers-4.18.0-16 4.18.0-16.17~18.04.1 all Header files related to Linux kernel version 4.18.0 ii linux-headers-4.18.0-16-generic 4.18.0-16.17~18.04.1 amd64 Linux kernel headers for version 4.18.0 on 64 bit x86 SMP ii linux-image-4.18.0-15-generic 4.18.0-15.16~18.04.1 amd64 Signed kernel image generic ii linux-image-4.18.0-16-generic 4.18.0-16.17~18.04.1 amd64 Signed kernel image generic ii linux-modules-4.18.0-15-generic 4.18.0-15.16~18.04.1 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP ii linux-modules-4.18.0-16-generic 4.18.0-16.17~18.04.1 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP ii linux-modules-extra-4.18.0-15-generic 4.18.0-15.16~18.04.1 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP ii linux-modules-extra-4.18.0-16-generic 4.18.0-16.17~18.04.1 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP

results of : modinfo rtl8723de | grep ver

filename: /lib/modules/4.18.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723de/rtl8723de.ko srcversion: 37BE84E7F4EC43A12099BF7 vermagic: 4.18.0-15-generic SMP mod_unload


This is a Make log file for DKMS:

DKMS make.log for rtlwifi_new-0.6 for kernel 4.18.0-16-generic (x86_64) vie mar 15 19:36:12 -05 2019 make: Entering directory '/usr/src/linux-headers-4.18.0-16-generic' scripts/Makefile.build:45: /var/lib/dkms/rtlwifi-new/0.6/build/Makefile: No such file or directory make[1]: *** No rule to make target '/var/lib/dkms/rtlwifi-new/0.6/build/Makefile'. Stop. Makefile:1534: recipe for target '_module_/var/lib/dkms/rtlwifi-new/0.6/build' failed make: *** [_module_/var/lib/dkms/rtlwifi-new/0.6/build] Error 2 make: Leaving directory '/usr/src/linux-headers-4.18.0-16-generic'

heynnema

To solve the current problem, we'll do this...

make clean                        # clean up leftovers
make                              # compile the software
sudo make install                 # install the software
sudo modprobe -r rtl8723de        # unload the driver
sudo modprobe rtl8723de ant_sel=2 # reload the driver with options

That was successful. However, doing it this way will require that you redo this every time the kernel gets updated via Software Updates. Boo.


Lets redo some of our steps, and use dkms, and make it so that it rebuilds itself when the kernel gets updated.

First, set the terminal back into the prior directory, and uninstall the current working driver...

cd ~/rtl8723de         # change directory
sudo modinfo rtl8723de # see the installed driver
sudo make uninstall    # uninstall the driver
sudo modinfo rtl8723de # make sure it's gone
cd                     # change to ~ directory

Now we install using dkms... using the unzipped folder, or the git clone folder...

If any of the following steps fail, then stop and report back.

sudo apt install dkms build-essential     # already done
cd ~/rtlwifi_new                          # enter the directory
sudo make clean                           # clean up from prior "make"
cd                                        # go to ~ directory
sudo cp -a ~/rtlwifi_new /usr/src/rtlwifi-new-0.6    # copy to /usr/src
sudo dkms add rtlwifi-new/0.6             # add the software to dkms
sudo dkms build rtlwifi-new/0.6           # build the software
sudo dkms install rtlwifi-new/0.6         # install the software
dkms status                               # review the status

Update #1:

Due to some naming problems, we have to clean things up a little before continuing. Do these commands first, then go back and do my original (modified) dkms installation instructions, shown immediately above. Pay special attention to hyphens vs underscores.

If any of the following steps fail, then stop and report back.

dkms status # note the name of the rtlwifi driver... probably rtlwifi_new
sudo dkms remove rtlwifi_new/0.6 --all # remove from dkms
sudo rm -r /usr/src/rtlwifi_new-0.6 # delete directory
ls -al /var/lib/dkms # make sure there are no rtlwifi directories left

Update #2:

Once we get the dkms driver properly installed, we need to create a configuration file to select the correct wireless antenna.

sudo -H gedit /etc/modprobe.d/rtl8723de.conf

enter the following line...

options rtl8723de ant_sel=2

save file and quit gedit

reboot and check wireless operation

Update #3:

Success!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to get selected same wifi operator from wifi List again and again in Android?

Docker Exec format error

Calling the same controller method again does not work

Default Activity not found .I see many solution but does not work for me

Ubuntu 20.04 - No wifi adapter found DELL

How to make Wavlink USB wifi adapter work again in Ubuntu 18.04.2 LTS after kernel upgrade

Getting USB wifi adapter to work with Ubuntu 18.04

fish shell : exec format error

How to make the same WiFi adapter work on two different networks with different DHCP configurations?

Why does a USB Adapter set to monitor mode on Linux not capture non-WiFi traffic send on the same frequency (2.4GHz) as WiFi ?

systemd Exec format error

Pipelined Sed does not work on found filename inside Bash command substitution when invoked from Find "-exec"

No wifi adapter found ubuntu 18.04

Adapter.Update() does not work?

"No wifi adapter found"

WiFi adapter is not found and no internet even on lan

Wifi adapter not found Realtek R8822BE

Wifi adapter not found, Ubuntu

18.04 "No wifi adapter found"

no wifi adapter found (after boot from windows)

'no wifi adapter found' Broadcom wifi driver problem

No WiFi Adapter Found on HP Probook

Asus AC1200 USB AC53 Nano Wifi adapter does not work on Ubuntu 18.04

Wifi Adapter not found after update

Wifi adapter not found both on Ubuntu and Windows 10

Ubuntu 20.04: No WiFi Adapter found due to Microcode SW error detected, iwlwifi error code 5

Java LinkedList "Error - Found cycle in the ListNode," why does solution B work but not solution A

How to solve "No Wi-Fi Adapter Found" error with Realtek RTL8852BE WiFi 6 802.11ax PCIe in Ubuntu 22.04?

No wifi adapter found ubuntu 22.04