Every time kernel is changed during dist-upgrade, Realtek 8812AU DKMS driver need to be recompiled manually because this is not done during dist-upgrade for new kernel automatically and driver failed to load on reboot:
[ 491.302739] 8812au: version magic '4.15.0-124-generic SMP mod_unload' should be '4.15.0-128-generic SMP mod_unload'
This is result of long-existing bug in this package, it listed on launchpad as Bug IDs 1743849, 1804832, 1705820. Solution is to fix MAKE line in dkms.conf in package to line below, but generally it should be done by package maintainer in repository (not done for 3+ years):
MAKE[0]="'make' all KVER=${kernelver}"
Is there any workaround to stay with repository 8812au dkms package version but automate rebuild 8812au on kernel change only, while package is still broken?
Some difficulty is that 8812au is an uplink interface for system affected and on reboot after kernel change it lost Internet connectivity if dkms is not recompiled and is unable to download any packages from repositories, so it should be done within dist-upgrade process or before reboot after dist-upgrade, or all needed for dkms build sources should be already downloaded to system.