You are not logged in.

#1 2021-01-10 11:33:32

344woi
Member
Registered: 2018-09-13
Posts: 3

AUR kernel module rtl88x2bu-dkms-git

I have a TP-link T4U v3.  Looking at this page it has a realtek RTL8812BU chipset, and until recently this has been working using the rtl88x2bu-dkms-git package from the AUR.

The problem:
ip addr, and ip link both don’t show the driver.  The device is plugged in. 
Normally ‘wpa_supplicant -B -iwlp0s20f0u3 -c/etc/wpa_supplicant/wpa_supplicant.conf’ works, but after the upgrade it gives a ‘no such device’ error.  (No surprise, as ip addr and ip link don’t show the device). 

I have tried:

Downgrading from kernel 5.10.3 to 5.9.14.  I downgraded both ‘linux’ and ‘linux-headers’, this fixes the issue.

‘git pull’ in the rtl88x2bu-dkms-git directory.  After some generic-looking blurb this says ‘Already up to date’

Looking for other packages – the only one I can find is rtl88x2bu-cilynx-dkms-git, but the package I’m using was updated more recently than that one (so I haven’t tried it, please say if I should).

When running kernel 5.10.3, reinstalling the driver (via ‘makepkg -si’ in the rtl88x2bu-dkms-git directory).  This doesn’t work, but in ‘/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/make.log’ there’s some info. 


DKMS make.log for rtl88x2bu-5.8.7.1.r99.78206c0 for kernel 5.10.3-arch1-1 (x86_64)
Sun  3 Jan 21:13:28 GMT 2021
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.10.3-arch1-1/build M=/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build  modules
make[1]: Entering directory '/usr/lib/modules/5.10.3-arch1-1/build'
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_wlan_util.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_ap.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_sreset.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_btcoex.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_odm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_rm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_rm_fsm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/rtw_rm_util.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/core/efuse/rtw_efuse.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/linux/os_intfs.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/linux/usb_intf.o
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c: In function ‘isFileReadable’:
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2231:11: error: implicit declaration of function ‘get_fs’; did you mean ‘get_sa’? [-Werror=implicit-function-declaration]
 2231 |   oldfs = get_fs();
      |           ^~~~~~
      |           get_sa
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2231:11: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2233:3: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
 2233 |   set_fs(KERNEL_DS);
      |   ^~~~~~
      |   sget_fc
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2233:10: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2233 |   set_fs(KERNEL_DS);
      |          ^~~~~~~~~
      |          KERNFS_NS
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2233:10: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c: In function ‘retriveFromFile’:
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2273:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
 2273 |    oldfs = get_fs();
      |            ^~~~~~
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2275:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2275 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c: In function ‘storeToFile’:
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2312:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
 2312 |    oldfs = get_fs();
      |            ^~~~~~
/var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.c:2314:11: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
 2314 |    set_fs(KERNEL_DS);
      |           ^~~~~~~~~
      |           KERNFS_NS
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:279: /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build/os_dep/osdep_service.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1805: /var/lib/dkms/rtl88x2bu/5.8.7.1.r99.78206c0/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.10.3-arch1-1/build'
make: *** [Makefile:2373: modules] Error 2

My theory:
It looks like there are some changes in version 5.10 and the AUR code needs updating.  Of course, this is an unofficial package so I can’t expect anyone to do it for me.  Unfortunately I don’t have the knowledge to play with kernel drivers.  It sounds like my options are to wait and hope it’s fixed, or buy a new wifi dongle.  Is that right?

Also:
I imagine it’s way beyond me to fix this kind of problem, but I’m not completely certain.  I know some c.  How do you start learning about the kernel and drivers?  A search for ‘site:kernel.org get_fs’ got me nowhere.

Possibly relevant:
The AUR page says the package is rtl88x2bu-dkms-git 5.8.7.1.r93.f915368-1, but the git link gave me
rtl88x2bu-dkms-git-5.8.7.1.r99.78206c0-1-x86_64.pkg.tar.zst.  Notice the revision number that I downloaded is higher than the one on the webpage.

When running ‘wpa_supplicant -B -iwlp0s20f0u3 -c/etc/wpa_supplicant/wpa_supplicant.conf’ under the old kernel, it says:
‘Successfully initialized wpa_supplicant
nl80211: kernel reports: Authentication algorithm number required’
I’m not sure what authentication number it’s asking for, but it works fine so I ignore this.

Offline

#2 2021-01-10 12:13:08

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,197

Re: AUR kernel module rtl88x2bu-dkms-git

Looking at the upstream repo, this was fixed a couple of months ago. You need to update, and this is a -git package, so you just need to rebuild it. -git packages always build from the latest upstream commit.

Offline

#3 2021-01-10 16:22:44

344woi
Member
Registered: 2018-09-13
Posts: 3

Re: AUR kernel module rtl88x2bu-dkms-git

Thanks, I didn't think that the git version could be different to the AUR version.  Changing the PKGBUILD on my end works, so I've added a comment to the AUR package.

Offline

#4 2021-01-10 16:32:31

loqs
Member
Registered: 2014-03-06
Posts: 12,556

Re: AUR kernel module rtl88x2bu-dkms-git

The PKGBUILD will update itself without you needing to change it when you run makepkg:

$ makepkg -odd
==> Making package: rtl88x2bu-dkms-git 5.8.7.1.r93.f915368-1 (Sun 10 Jan 2021 16:29:06)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Cloning RTL88x2BU-Linux-Driver git repo...
Cloning into bare repository '/tmp/rtl88x2bu-dkms-git/RTL88x2BU-Linux-Driver'...
remote: Enumerating objects: 720, done.
remote: Counting objects: 100% (720/720), done.
remote: Compressing objects: 100% (579/579), done.
remote: Total 2090 (delta 284), reused 258 (delta 139), pack-reused 1370
Receiving objects: 100% (2090/2090), 9.43 MiB | 7.22 MiB/s, done.
Resolving deltas: 100% (1060/1060), done.
==> 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()...
==> Updated version: rtl88x2bu-dkms-git 5.8.7.1.r111.afc917d-1
==> Sources are ready.

I used -o to stop after checking out the sources and -dd to avoid pulling dependencies in when I was not going to build the package.
See the pkgver was updated from 5.8.7.1.r93.f915368-1 to 5.8.7.1.r111.afc917d-1

Offline

#5 2021-01-10 16:48:25

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 8,197

Re: AUR kernel module rtl88x2bu-dkms-git

344woi wrote:

Thanks, I didn't think that the git version could be different to the AUR version.  Changing the PKGBUILD on my end works, so I've added a comment to the AUR package.

The change you made did nothing useful at all. All it affected was the number, not what was actually built. As I said, all you had to do was rebuild it.

Offline

#6 2021-01-10 23:07:21

344woi
Member
Registered: 2018-09-13
Posts: 3

Re: AUR kernel module rtl88x2bu-dkms-git

I'm sure I'm being stupid, but I'm very confused now. 

The change you made did nothing useful at all. All it affected was the number, not what was actually built. As I said, all you had to do was rebuild it.

I think I know what you mean by 'rebuild it' (presumably you mean to run 'mkpkg -si'). 

To get it to work, I changed _pkgver to 5.8.7.2 in pkgbuild, and ran mkpkg -si.  You seem to be saying that the version number change in PKGBUILD did nothing, and the only thing that mattered was running mkpkg -si.  The reason why this is confusing me is that on 03 Jan I ran 'mkpkg -si >makepkg_error_210103' (output below).  Back then it made version 5.8.7.1, whereas today I installed 5.8.7.2.  What's the difference between then and now?  (I suppose it's possible that my internet wasn't on when I ran mkpkg -i, it doesn't say anything about that in the output below but I don't know if it would.)

Whether I end up understanding or not, thank you very much for the help - it works fine now.

ESC[1mESC[32m==>ESC[m^OESC[1m Making package: rtl88x2bu-dkms-git 5.8.7.1.r99.78206c0-1 (Sun 03 Jan 2021 20:58:50 GMT)ESC[m^O
ESC[1mESC[32m==>ESC[m^OESC[1m Checking runtime dependencies...ESC[m^O
ESC[1mESC[32m==>ESC[m^OESC[1m Checking buildtime dependencies...ESC[m^O
ESC[1mESC[32m==>ESC[m^OESC[1m Retrieving sources...ESC[m^O
ESC[1mESC[34m  ->ESC[m^OESC[1m Updating RTL88x2BU-Linux-Driver git repo...ESC[m^O
Fetching origin
ESC[1mESC[32m==>ESC[m^OESC[1m Validating source files with sha256sums...ESC[m^O
ESC[1mESC[32m==>ESC[m^OESC[1m Extracting sources...ESC[m^O
ESC[1mESC[34m  ->ESC[m^OESC[1m Creating working copy of RTL88x2BU-Linux-Driver git repo...ESC[m^O
ESC[1mESC[32m==>ESC[m^OESC[1m Starting pkgver()...ESC[m^O
ESC[1mESC[32m==>ESC[m^OESC[1m Installing package rtl88x2bu-dkms-git with pacman -U...ESC[m^O

The PKGBUILD will update itself without you needing to change it when you run makepkg:

Thanks, I suppose that makes sense of the difference between my version number and the one on the AUR page.  I don't understand why I've got '5.8.7.2.r111.afc917d' and you only have '5.8.7.1.r111.afc917d-1' though.

Offline

#7 2021-01-10 23:30:00

loqs
Member
Registered: 2014-03-06
Posts: 12,556

Re: AUR kernel module rtl88x2bu-dkms-git

From the PKGBUILD,  _pkgver is only used in one place,  that is in the pkgver function as shown below:

pkgver() {
    cd "${srcdir}/RTL88x2BU-Linux-Driver"
    printf '%s.r%s.%s' "${_pkgver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

So when you changed _pkgver from 5.7.7.1 to 5.8.7.2 that changed the string returned pkgver which is used to set the variable pkgver.
What actually fixed the issue for you was you went from commit ID f915368 to afc917d also shown as r99 to r111 meaning revsion 99 became revision 111,  12 commits later with ID f915368.  Those additional commits contained the support for 5.10,  particularly https://github.com/RinCat/RTL88x2BU-Lin … db23a15b8b
Edit:
If the PKGBUILD did the following

pkgname=pkgname=rtl88x2bu-dkms-git
pkgver=5.7.7.1
pkgrel=1
source=("https://somesite/some/path/$pkgname/$pkgname-$pkgver.tar.xz")

Then changing the pkgver would change the source bundle used.

pkgname=pkgname=rtl88x2bu-dkms
pkgver=5.7.7.1
pkgrel=1
_commit=12345
source=("git+https://somesite/some/path/$pkgname/$pkgname.git#commit=$_commit")

Equivalent for a git based project which is pinned to a commit with ID _commit.  Such a package does not use the -git suffix as it is pinned and is not tracking an upstream branch.

Last edited by loqs (2021-01-10 23:47:51)

Offline

Board footer

Powered by FluxBB