1

When I boot a 4.4.x kernel, I want to make sure that the buggy staging driver r8723au is blacklisted, in favor of the much-improved mainline rtl8xxxu.

However, when I boot an older 4.2.x kernel, I'll still need to use the old r8723au driver.

Is there any way to blacklist a module only for a specific kernel version? (UPDATE: I want to blacklist the old module, r8723au, from the new kernel, to prevent it from taking over from the new driver.)

Ideas I had:

  • /etc/modprobe.d/blacklist-r8723au.conf -- it's not possible to specify blacklist only for one kernel version, as far as I can tell
  • /etc/default/grub -- no way to specify modprobe.blacklist=r8723au for the kernel command line for some versions and not others

The quick-and-dirty solution I've got is to manually edit /boot/grub/grub.cfg and add the relevant blacklist parameter to specific kernel versions… but of course this will be overwritten automatically the next time I run update-grub (perhaps when installing an updated Xenial/16.04 kernel).

1 Answer 1

2

The module rtl8xxxu doesn't exist in kernel version 4.2.0-xx, as far as I know, so booting into a 4.2.0-xx kernel should be fine.

I am not aware that the two drivers cover the same usb.ids, however, you can keep r8723au from loading in 4.4.0-xx by renaming the modules. For instance:

sudo mv /lib/modules/4.4.0-21-generic/kernel/drivers/staging/rtl8723au/r8723au.ko  /lib/modules/4.4.0-21-generic/kernel/drivers/staging/rtl8723au/r8723au.bak

sudo mv /lib/modules/4.4.0-22-generic/kernel/drivers/staging/rtl8723au/r8723au.ko  /lib/modules/4.4.0-22-generic/kernel/drivers/staging/rtl8723au/r8723au.bak

You will need to repeat the process when an updated kernel version, -23 perhaps, is installed by Update Manager.

7
  • Right, but I'm not trying to blacklist the new module; I'm trying to blacklist the old module. Both exist in the new kernel, and the problem is that when I boot 4.4.x then the r8723au driver grabs the device, when I want rtl8xxxu to take it.
    – Dan
    May 12, 2016 at 2:29
  • 1
    Yes, and by renaming the old module, as I suggest, it will be unable to load in 4.4.0-xx as you wish.
    – chili555
    May 12, 2016 at 10:40
  • Just for my education, what is your device ID from: lsusb? Thanks.
    – chili555
    May 12, 2016 at 11:44
  • It's 0bda:1724 … why do you ask? AFAICT, the r8723au driver only probes three specific USB IDs.
    – Dan
    May 12, 2016 at 18:00
  • 1
    I asked because I was unaware that the device 0bda:1724 wa covered by two separate drivers. I have confirmed from modinfo that is indeed so. I appreciate the heads up. I suggest that you proceed with the rename I proposed.
    – chili555
    May 16, 2016 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .