Hi there,
Having some troubles with module rebuild via dkms and seeking for advice.
I successfully installed the driver for the t3u tplink WiFi dongle.
Whenever I update the kernel (via apt upgrade) and reboot my machine (pc native x86), I lose WiFi as the kernel module doesn’t get rebuilt, although DKMS should take care of this.
To work around this, I have to plugin my network cable, restart my machine and reinstall via the following:
sudo apt-get install --reinstall linux-headers-$(uname -r)
Then DKMS kicks in and rebuild the module.
After another reboot (network cable removed again), I have WiFi working again.
I initially installed the WiFi driver via:
git clone "https://github.com/RinCat/RTL88x2BU-Linux-Driver.git" /usr/src/rtl88x2bu-git
sed -i 's/PACKAGE_VERSION="@PKGVER@"/PACKAGE_VERSION="git"/g' /usr/src/rtl88x2bu-git/dkms.conf
dkms add -m rtl88x2bu -v git
dkms autoinstall
How can I make sure that DKMS rebuilds the module after a kernel update but before a reboot so WiFi doesn’t stop working?
Thanks
T
If I’m not mistaken, it should be possible to create some hook configs to force dkms
during kernel update. @MichaIng knows for sure.
sudo apt-get install --reinstall your kernel module
That should start the DKMS rebuild
This link shows there might be a dkms module in the source for your driver
As I said above, the rebuilt works but only AFTER the reboot of my machine and not during the kernel update.
And AFTER the reboot, I have lost WiFi already as the driver didn’t survive the kernel update.
So I can only rebuild when plugging in the network cable again (as I can pull what is required). Not how it should work.
Which SBC/hardware do you use? DKMS should ship the script /etc/kernel/postinst.d/dkms
to rebuild modules on kernel installs/upgrades. Is the script there and can you see it being executed when the kernel package is upgraded?
Yes the script is there, but no, it wasn’t executed automatically after a kernel update (on two occasions)
I had to execute manually:
sudo apt-get install --reinstall linux-headers-$(uname -r)
But this only worked after a reboot as the new kernel was loaded (and not just installed). I had to plugin the network cable as WiFi was no longer working after the reboot (which I would like to avoid)
Is there any way to test a kernel update or revert to an older version to replicate/ reproduce and not to wait for the next update whenever this will be?