0

A module called alx, which drives my Qualcomm AR8161 Ethernet, loads up on boot and is visible with lsmod.

This module is buggy. I found the patches, download the source code for my running kernel, patched the alx/ files, and after finding out how, rebuilt the alx.ko module file. After rmmod'ing the old alx, and modprobe -v my new version, ethernet started to work perfectly. Hurrah! Problem solved.

The annoyance is that if I do a straight swap of the original alx.ko with my new alx.ko, it still loads the old one at boot?? Further, if I remove all alx.ko files completely from /lib/modules, the alx module STILL loads at boot time??? So question is: where is it getting it from, and how do I get the system to load my replacement version instead (exact same filename)?

At the moment, I issue rmmod alx; modprobe -v alx at boot time, but I'd rather it happen automatically.

2 Answers 2

0

The normal way to do this is to name the new module a slightly different name such as alx_fixed.ko and blacklist the original. Instructions on how to blacklist a module can be found here. http://linuxconfig.org/how-to-blacklist-a-module-on-ubuntu-debian-linux Once you place the new module in the /lib/modules/your-kernel-version/kernel/drivers/net/, you need to run the command "sudo depmod -a" to update the list of modules installed.

I doubt this is the case for an ethernet driver, but some modules are loaded at boot time, so you may need to run "update-initramfs" as well. https://wiki.ubuntu.com/Initramfs

As for where are the modules coming from even though you deleted them? What kernel version are you running? Are you sure you deleted them from the correct kernel version? In general, deleting system files is a bad idea because it can cause an unstable system.

1
  • I put the new module into /lib/modules/4.2.0-27-generic/updates/dkms/, and ran depmod -av |grep alx and update-intramfs -uv|grep alx and so could see it was only picking up my version of the module. I noticed in the boot logs:
    – Pingers
    Commented Jan 23, 2016 at 13:06
0

I put the new module into /lib/modules/4.2.0-27-generic/updates/dkms/, and ran depmod -av |grep alx and update-intramfs -uv|grep alx verifying it was only picking up my modified module, not the original one.. In the subsequent boot logs: alx: module verification failed: signature and/or required key missing - tainting kernel, but it loads anyway and problem solved.

You must log in to answer this question.

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