Code Monkey home page Code Monkey logo

Comments (10)

morrownr avatar morrownr commented on June 17, 2024

We need more information. What Linux distro and version are you using? What hardware are you using?

Edit: FYI: I did a clean install on a amd64 based system with a v5.4 kernel today. No problems noted. We need a lot more information, such as what I asked for above, to even start to help. Something to keep in mind. This site gets around 1000 hits per week. If there was a big problem, we would be inundated with problem reports but as you can see, very few problem reports. There is likely a problem in your system but we don't know what system you are running. Cheers.

from 88x2bu.

w407022008 avatar w407022008 commented on June 17, 2024

Hi, @morrownr .
Sorry for that, which should be necessary.
Well, the Linux distro and version: Ubuntu 18.04.1 5.4.0-72-generic x86_64 GNU/Linux
the hardware: the PC is Dell Optiplex 7060, well i don't know what kind of motherboard it is. the wifi device is this which has the chip of rtl8812bu.

In fact, I have been using the driver you provided normally for the past six months until the day before yesterday when I was prompted for a software update. Maybe, I'm just guessing, it conflicted with dkms after the update or something. When I turned on my computer yesterday and found that I couldn't search for wifi, I initially planned to remove and reinstall it, but I found that I couldn't remove it completely, and when I installed it again, he reminded me that the driver was already installed, so I manually removed the rtl package in the var/lib/dkms path and the corresponding files (/usr/src/${DRV_NAME}-${DRV_ VERSION}, /etc/modprobe.d), and when I bash install_driver.sh again, I found that dkms could not be successfully built.

Thanks a lot.

from 88x2bu.

morrownr avatar morrownr commented on June 17, 2024

Okay. Well. I recently did some work on the installation and remove scripts to try to prevent a situation where it is sort of half installed and remove would not clean it up. This may be where you are or were.

If you have an alternate means of internet access for the computer in question, how about trying the following:

Destroy your current driver along with its folder: ~/src/88x2bu

Go through the installation process until it is time to run install-driver.sh but instead run remove-driver.sh first and the install-driver.sh.

Let me know what happens.

from 88x2bu.

w407022008 avatar w407022008 commented on June 17, 2024

Hi, @morrownr
I tried to do what you said. I destroyed the current driver and I made sure that there are no files under these three paths(/usr/src/; /etc/modprobe.d/; /var/lib/dkms/) that we want to add. I removed the folder (~/src/88x2bu), and then re-cloned it according to the git guide. Before installing it, I ran the file (remove-driver.sh) as you said, and then the terminal showed:

Start removal.
Error! There are no instances of module: rtl88x2bu
5.8.7.4 located in the DKMS tree.
Deleting 88x2bu.conf from: /etc/modprobe.d
Deleting source files from: /usr/src/rtl88x2bu-5.8.7.4
The driver was removed successfully.
Are you ready to reboot now? [y/n]

I selected yes, and after rebooting, I ran 'install-driver.sh'. So the terminal showed:

Running: install-driver.sh version 20210421
Start installation.
Copying source files to: /usr/src/rtl88x2bu-5.8.7.4
Copying 88x2bu.conf to: /etc/modprobe.d

Creating symlink /var/lib/dkms/rtl88x2bu/5.8.7.4/source ->
/usr/src/rtl88x2bu-5.8.7.4

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
'make' -j12 KVER=5.4.0-72-generic KSRC=/lib/modules/5.4.0-72-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.4 not found
Error! Bad return status for module build on kernel: 5.4.0-72-generic (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.8.7.4/build/make.log for more information.
An error occurred. dkms build error = 10
Please report this error.

This is the same mistake as before. It seems to be because of this kernel. And, when I try to make it with (make KSRC=/lib/modules/4.15.0-142-generic/build), the build is safe to complete. But since ubuntu actually uses the 5.4 kernel, after 'make install', it will be installed as a file called '88x2bu.ko' under the path (/lib/modules/5.4.0-72-generic/kernel/drivers/net/wireless/). The terminal showed:

install -p -m 644 88x2bu.ko /lib/modules/5.4.0-72-generic/kernel/drivers/net/wireless/
/sbin/depmod -a 5.4.0-72-generic

Unfortunately, after a reboot it still does not show that there is an available driver.

Now, I tried again to remove it (remove-driver.sh) and the terminal showed:

Start removal.

------------------------------
Deleting module version: 5.8.7.4
completely from the DKMS tree.
------------------------------
Done.
Deleting 88x2bu.conf from: /etc/modprobe.d
Deleting source files from: /usr/src/rtl88x2bu-5.8.7.4
The driver was removed successfully.
Are you ready to reboot now? [y/n] n

And run 'remove-driver.sh' again,

Start removal.
Error! There are no instances of module: rtl88x2bu
5.8.7.4 located in the DKMS tree.
Deleting 88x2bu.conf from: /etc/modprobe.d
Deleting source files from: /usr/src/rtl88x2bu-5.8.7.4
The driver was removed successfully.
Are you ready to reboot now? [y/n] n

from 88x2bu.

morrownr avatar morrownr commented on June 17, 2024

I guess we need this to be hard because if it was easy, it wouldn't be fun.

Let's try to do some stuff manually. Open a terminal and do the following:

$ cd ~/src/88x2bu

$ clear

$ make clean

$ make

Now copy everything that appears onscreen after $ make and paste it here.

from 88x2bu.

w407022008 avatar w407022008 commented on June 17, 2024

log.txt

Well, It is too long, but all the errors are related to an expected identifier or '('.

from 88x2bu.

morrownr avatar morrownr commented on June 17, 2024

Something is causing the compilation to fail. I just tried to duplicate your results using the same kernel...

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.0-72-generic/build M=/home/morrow/src/88x2bu modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-72-generic'
CC [M] /home/morrow/src/88x2bu/core/rtw_cmd.o
CC [M] /home/morrow/src/88x2bu/core/rtw_security.o
CC [M] /home/morrow/src/88x2bu/core/rtw_debug.o
CC [M] /home/morrow/src/88x2bu/core/rtw_io.o
CC [M] /home/morrow/src/88x2bu/core/rtw_ioctl_query.o
CC [M] /home/morrow/src/88x2bu/core/rtw_ioctl_set.o
CC [M] /home/morrow/src/88x2bu/core/rtw_ieee80211.o
.
.
.
CC [M] /home/morrow/src/88x2bu/hal/phydm/txbf/haltxbf8822b.o
CC [M] /home/morrow/src/88x2bu/hal/btc/halbtc8822bwifionly.o
CC [M] /home/morrow/src/88x2bu/hal/btc/halbtc8822b1ant.o
CC [M] /home/morrow/src/88x2bu/hal/btc/halbtc8822b2ant.o
CC [M] /home/morrow/src/88x2bu/platform/platform_ops.o
CC [M] /home/morrow/src/88x2bu/core/rtw_mp.o
LD [M] /home/morrow/src/88x2bu/88x2bu.o
Building modules, stage 2.
MODPOST 1 modules
CC [M] /home/morrow/src/88x2bu/88x2bu.mod.o
LD [M] /home/morrow/src/88x2bu/88x2bu.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-72-generic'

That is a totally clean compile.

We need to figure out what is causing the failure.

Do the following:

$ sudo apt update
$ sudo apt full-upgrade
$ sudo apt autoremove
$ sudo rm -rf ~/src/88x2bu
$ sudo reboot

Once the system is back up, very carefully go through all of the installation steps again.

Some things to think about:

"sudo" is a weapon. Use it only if you know exactly what the result is going to be. I cringed when you said you were cleaning files out of bla bla bla.

The manual complilation we did tells us that this problem likely has nothing to do with dkms as we took it out of the picture.

from 88x2bu.

w407022008 avatar w407022008 commented on June 17, 2024

well, It looks like this compilation error has nothing to do with the kernel.

I tried to do the following:
$ sudo apt update
$ sudo apt full-upgrade
nothing should be upgraded
$ sudo apt autoremove
nothing should be autoremoved
$ sudo rm -rf ~/src/88x2bu
$ sudo reboot

$ sudo apt-get update
$ sudo apt-get install -y dkms git
dkms Already the latest version (2.3-3ubuntu9.7)
git Already the latest version (1:2.17.1-1ubuntu0.8)
$ cd ~/src
$ git clone https://github.com/morrownr/88x2bu.git
$ cd ~/src/88x2bu
$ sudo ./install-driver.sh

Running: install-driver.sh version 20210421
Start installation.
Copying source files to: /usr/src/rtl88x2bu-5.8.7.4
Copying 88x2bu.conf to: /etc/modprobe.d

Creating symlink /var/lib/dkms/rtl88x2bu/5.8.7.4/source ->
/usr/src/rtl88x2bu-5.8.7.4

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
'make' -j12 KVER=5.4.0-72-generic KSRC=/lib/modules/5.4.0-72-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.4 not found
Error! Bad return status for module build on kernel: 5.4.0-72-generic (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.8.7.4/build/make.log for more information.
An error occurred. dkms build error = 10
Please report this error.

In addition, I have also tried to make it with what you showed.
$ make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.4.0-72-generic/build M=~/src/88x2bu

make: Entering directory '/usr/src/linux-headers-5.4.0-72-generic'
Building modules, stage 2.
MODPOST 0 modules
make: Leaving directory '/usr/src/linux-headers-5.4.0-72-generic'

from 88x2bu.

morrownr avatar morrownr commented on June 17, 2024

Sigh... I suspect there is an issue with the development environment in your system but I don't have and can't find a clear cut answer. We need to make a decision. We can either continue down this rabbit hole or we can go another direction. Let me throw out some options:

  • Do a clean upgrade to a newer version of Ubuntu. 20.04 LTS is available and so is 21.04. You would need to copy any important files to an external storage device or store them online at a place like Google Docs. When you install the new version, select format during the installation so as to have a totally clean installation. Then go through the installation process for the adapter.

  • Read the following site: https://github.com/morrownr/USB-WiFi

That site has a lot of information about USB WiFi adapters on Linux. While I enjoy working on this driver, most of the time, I realize many Linux users would be happier with an adapter that is plug and play and those are available. In fact, the adapters that use the in-kernel drivers, such as the mt7612u and mt7610u, have far more capabilities than these Realtek drivers and they are fully Linux Wireless standards compliant. Examples:

WPA3 support - WPA3 support works with the mt7612u driver as I was testing it with Ubuntu 21.04 yesterday. Rock solid. It probably works with the mt7610u but I haven't tested that yet... but I will when I have time.

Support for interface combinations - The Realtek drivers don't do that. The Mediatek drivers do.

Solid AP mode support - The only Realtek driver that has solid AP mode support is the 8812au. The mt7612u and mt7610u as well as all other in-kernel drivers have solid support for AP mode.

Solid monitor mode support - The only Realtek driver that has good monitor mode support is the 8812au. The mt7612u and mt7610u as well as the other in-kernel drivers (that I have tested several) have solid support for monitor mode.

I could go on but the simple truth is that these Realtek drivers are not very good. I work on them simply to help my fellow Linux users that have existing hardware.

Let me know what direction you decide to go. We can continue down the rabbit hole but my to-do list has several other items I need to be working on so this rabbit hole option could go slow.

Nick

from 88x2bu.

w407022008 avatar w407022008 commented on June 17, 2024

Hi, Nick. Thank you very much for your detailed guidance and enthusiastic help. I still haven't found the root cause of this issue yet, so he is indeed a rabbit hole, but I have led a cable from the router, so I am currently using Ethernet instead of WiFi. I will not consider this hassle again unless I have to someday. Upgrading to Ubuntu20 might be an option, but some of the packages used currently rely on Ubuntu18, so I can't do that yet. Thanks again Nick, thanks for this repo which I have been using safely for a long time.

from 88x2bu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.