cilynx / rtl88x2bu

rtl88x2bu driver updated for current kernels.
http://www.wolfteck.com/2018/02/22/wsky_1200mbps_wireless_usb_wifi_adapter/
GNU General Public License v2.0
1.66k stars 320 forks source link

Driver not working after updating BIOS #236

Closed BorisPolonsky closed 1 year ago

BorisPolonsky commented 1 year ago

I've installed this driver successfully (with DKMS support) with secure boot enabled. I remember the importing a private key during the installation process. After Updating BIOS, those keys are gone so the driver cannot be loaded. I tried reinstall the driver by running

make clean
make
make install
./install.sh

No luck. The program never ask me to import a new key because the driver is already included in the DKMS tree

sent 134.31M bytes  received 19.88K bytes  89.55M bytes/sec
total size is 134.21M  speedup is 1.00
Error! DKMS tree already contains: rtl88x2bu-5.8.7.1
You cannot add the same module/version combo more than once.
Module rtl88x2bu/5.8.7.1 already built for kernel 5.15.0-56-generic (x86_64).
Module rtl88x2bu/5.8.7.1 already installed on kernel 5.15.0-56-generic (x86_64).
modprobe: ERROR: could not insert '88x2bu': Operation not permitted

How should I re-install the driver with a new self-signed key, or alternatively, where can I find the previously generated private key so that I can manually import it with mokutil. I tried removing /var/lib/dkms/rtl88x2bu/, after that the installation program will prompt key installation again. But I still can't get the driver loaded. Here's what I got in dmesg

[  209.442339] Lockdown: modprobe: unsigned module loading is restricted; see man kernel_lockdown.
BorisPolonsky commented 1 year ago

I checked the *.ko file in /var/lib/dkms/rtl88x2bu

hexdump -Cv /var/lib/dkms/rtl88x2bu/5.8.7.1/5.15.0-56-generic/x86_64/module/88x2bu.ko | tail
005ac170  7b 0a fa ad a8 e0 7c e3  c6 0f a2 cb 41 07 fc b5  |{.....|.....A...|
005ac180  32 fd 63 8c dc 50 df fc  b8 d8 26 34 a9 a4 ec c9  |2.c..P....&4....|
005ac190  20 ed f9 af 34 8a 80 17  b5 aa dc 4e 74 f5 9b a0  | ...4......Nt...|
005ac1a0  7b 70 97 dc 39 62 70 ff  c6 6f 2b 6b d6 f4 44 64  |{p..9bp..o+k..Dd|
005ac1b0  cc 96 e1 68 62 73 f0 76  79 7f 1a b9 fc f2 0e 64  |...hbs.vy......d|
005ac1c0  fc fe 66 a1 ed ce ad aa  81 3d 0f 01 59 db 00 00  |..f......=..Y...|
005ac1d0  02 00 00 00 00 00 00 00  01 b6 7e 4d 6f 64 75 6c  |..........~Modul|
005ac1e0  65 20 73 69 67 6e 61 74  75 72 65 20 61 70 70 65  |e signature appe|
005ac1f0  6e 64 65 64 7e 0a                                 |nded~.|

Looks like the module is already signed. And I managed to make it loaded by manually running sudo insmod /var/lib/dkms/rtl88x2bu/5.8.7.1/5.15.0-56-generic/x86_64/module/88x2bu.ko every time I boot my machine.

It loos like that the auto installation script fininshed signing the module and enrolled the key, yet it won't be installing the signed version of the driver through dkms. Maybe there's something to be optimized with the installation script?

MaxG87 commented 1 year ago

Hi, this is indeed an unfortunate situation. The deployment script does not handle updates well. I would prefer to establish the solution used by xpadneo, but the PR got stalled.

In order to update the driver, I usually first run sudo dkms remove rtl88x2bu/5.8.7.1 --all and then the deployment script again.