Installing rtl88x2bu driver using kernel 5.17.9-1

I’ve been trying to install the rtl88x2bu driver from aur but it’s giving me an error

Preparing...
Cloning rtl88x2bu-dkms-git build files...
Generating rtl88x2bu-dkms-git information...
Checking rtl88x2bu-dkms-git dependencies...
Resolving dependencies...
Checking inter-conflicts...

Building rtl88x2bu-dkms-git...
==> Making package: rtl88x2bu-dkms-git 5.13.1.r163.9983008-1 (Du 05 iun 2022 16:47:04 +0300)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating RTL88x2BU-Linux-Driver git repo...
Fetching origin
==> Validating source files with sha256sums...
    RTL88x2BU-Linux-Driver ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of RTL88x2BU-Linux-Driver git repo...
Cloning into 'RTL88x2BU-Linux-Driver'...
done.
==> Starting pkgver()...
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "rtl88x2bu-dkms-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: rtl88x2bu-dkms-git 5.13.1.r163.9983008-1 (Du 05 iun 2022 16:47:10 +0300)
==> Cleaning up...

Checking keyring...
Checking integrity...
Loading packages files...
Checking file conflicts...
Checking available disk space...
Installing rtl88x2bu-dkms-git (5.13.1.r163.9983008-1)...
Running post-transaction hooks...
Arming ConditionNeedsUpdate...
Install DKMS modules
==> dkms install --no-depmod rtl88x2bu/5.13.1.r163.9983008 -k 5.17.9-1-MANJARO
Error! Bad return status for module build on kernel: 5.17.9-1-MANJARO (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.13.1.r163.9983008/build/make.log for more information.
==> WARNING: `dkms install --no-depmod rtl88x2bu/5.13.1.r163.9983008 -k 5.17.9-1-MANJARO' exited 10
Transaction successfully finished.

Any idea how can I fix it?

Hi :slightly_smiling_face: Apparently the kernel headers are not installed, but they are absolutely necessary for building the kernel modules. Just install the header package that corresponds to the kernel you are using. In your case, it should be linux517-headers. Once that is installed, you should be able to install the wifi driver package without any problems.

I do have installed the headers for linux 5.17, now if I try to reinstall it , it gives me this error

(3/3) Install DKMS modules
==> dkms install --no-depmod rtl88x2bu/5.8.7.1 -k 5.17.9-1-MANJARO
Error! Bad return status for module build on kernel: 5.17.9-1-MANJARO (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/build/make.log for more information.
==> WARNING: `dkms install --no-depmod rtl88x2bu/5.8.7.1 -k 5.17.9-1-MANJARO' exited 10

Maybe i messed something up

Hi @Rajaro, and welcome!

As @LinKostik mentioned, it seems the kernel headers aren’t installed. And they have to be installed to install a -dkms package, like you’re trying to install here.

To install the kernel headers for all installed kernels, run:

pamac install $(pamac list --quiet --installed | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')

Afterward, try installing the drivers again:

pamac build rtl88x2bu-dkms-git

Tip:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Thereby improving legibility and making it much easier for those trying to be of assistance.

Alternatively, paste the text in the editor, select the pasted text, and click the </> button in the editor toolbar.

Please edit your post accordingly.

Well, check there. Or post it here, as per my previous tip:

cat /var/lib/dkms/rtl88x2bu/5.8.7.1/build/make.log
DKMS make.log for rtl88x2bu-5.8.7.1 for kernel 5.17.9-1-MANJARO (x86_64)
duminică 5 iunie 2022, 17:09:10 +0300
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.17.9-1-MANJARO/build M=/var/lib/dkms/rtl88x2bu/5.8.7.1/build  modules
make[1]: Entering directory '/usr/lib/modules/5.17.9-1-MANJARO/build'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.1.0
  You are using:           gcc (GCC) 11.2.0
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1/build/core/rtw_cmd.o
gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
make[2]: *** [scripts/Makefile.build:288: /var/lib/dkms/rtl88x2bu/5.8.7.1/build/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1831: /var/lib/dkms/rtl88x2bu/5.8.7.1/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.17.9-1-MANJARO/build'
make: *** [Makefile:2391: modules] Error 2

Tip:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Thereby improving legibility and making it much easier for those trying to be of assistance.

Alternatively, paste the text in the editor, select the pasted text, and click the </> button in the editor toolbar.

Please edit your post accordingly.

I’m no expert and this is way past my knowledge. But this:

Makes me think it’s perhaps not ready for the kernel yet, Try with 5.15 perhaps?

Looks to output the same error

This is what’s inside cat /var/lib/dkms/rtl88x2bu/5.8.7.1/build/make.log at the moment

DKMS make.log for rtl88x2bu-5.8.7.1 for kernel 5.15.41-1-MANJARO (x86_64)
duminică 5 iunie 2022, 17:28:35 +0300
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.15.41-1-MANJARO/build M=/var/lib/dkms/rtl88x2bu/5.8.7.1/build  modules
make[1]: Entering directory '/usr/lib/modules/5.15.41-1-MANJARO/build'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.1.0
  You are using:           gcc (GCC) 11.2.0
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1/build/core/rtw_cmd.o
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
make[2]: *** [scripts/Makefile.build:288: /var/lib/dkms/rtl88x2bu/5.8.7.1/build/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1868: /var/lib/dkms/rtl88x2bu/5.8.7.1/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.15.41-1-MANJARO/build'
make: *** [Makefile:2391: modules] Error 2

Does manjaro uses a modified kernel or somethiing like that?

It seems you are using an old gcc, because mine is:

$ gcc --version

gcc (GCC) 12.1.0
[...]

So my next question is, is your system fully updated?

Edit:

Check with:

pamac upgrade --enable-downgrade --aur --devel
1 Like

I actually forgot to update, I will update the system and see if it works

Yup, seems to be working now.Thanks for the help

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.