0

I am trying to use a version of bbswitch hacked for a T450s mentioned in this issue on bumblebee-project/bbswitch. It works well and now my Nvidia 940m card turns off properly.

To install it I run make load from it's root, which executes the following commands:

-rmmod bbswitch
insmod bbswitch.ko

I now would like to get that module replacing the existing bbswitch module at boot (rather than being a command I have to invoke). To do that I've written the following modprobe.d file:

/etc/modprobe.d/50-bbswitch.conf:

# Remove the old bbswitch
blacklist bbswitch
remove bbswitch

# Load the new bbswitch
install bbswitch.ko /bin/true

Problem is that it doesn't seem to be loading the new module. When I run dmesg | grep bbswitch I get:

[    8.357206] bbswitch: version 0.7

The hacked bbswitch has the version code 0.8. So my install bbswitch.ko /bin/true line isn't actually loading the module. And it means that my blacklist... remove... lines aren't unloading the old bbswitch module.

Can anyone explain how to do this?

1 Answers1

0

I might have misunderstood your problem, but in order to be used at boot time, it needs to be in the initrd (initial RAM disk). It's not very hard to achieve, but it's a while since I did these things, so you're probably better of googling the howtos.

  • Sorry, when I said at boot I really meant more like during the booting process. I believe that's the point of modprobe.d files. Just didn't explain myself very well. – Michael Allen Dec 03 '15 at 00:52
  • Right. The "brute force" method would be to replace the old file with the new; afaik modprobe uses the /lib/modules/$(uname -r) tree to find the named modules. But copy away the old one first. And run depmod. – Ralph Rönnquist Dec 03 '15 at 01:08
  • Sorted in the end. I looked in to replacing the file and noticed that the original was installed by dkms. Using dkms install instead allowed me to override the old module without any hassle. – Michael Allen Dec 03 '15 at 11:16
  • @MichaelAllen it would benefit us all if you wrote an answer about the details of the solution. – guntbert Jun 02 '16 at 18:19