You are not logged in.

#1 2023-11-24 11:45:59

snake.scaly
Member
Registered: 2017-05-03
Posts: 6

Blacklisting a specific alias of a kernel module

I've already asked this on Unix Stack Exchange but have no useful answers yet. Either I asked badly (likely), or nobody knows (unlikely, somebody definitely knows).

I have two conflicting modules: the generic gamepad driver xpad that ships with Arch, and xone which I installed from AUR. Both modules claim to support the Xbox One wireless dongle, even though xpad does not actually know what to do with it:

$ modprobe -R usb:v045Ep02F9d0114dcFFdscFFdpFFicFFisc5Dip01in00
xpad
xone_dongle

As far as I understand, the problem comes from this alias in xpad:

$ modinfo xpad
...
alias:          usb:v045Ep*d*dc*dsc*dp*icFFisc5Dip01in*
...

I want to configure modprobe such that it only finds xone_dongle for my Xbox One controller modalias. However I don't want to blacklist xpad entirely because I also want my Xbox 360 wired controller to keep working (modalias usb:v045Ep028Ed0114dcFFdscFFdpFFicFFisc5Dip01in00), which is properly supported by the xpad driver.

The modprobe.d documentation states:

the blacklist keyword indicates that all of that particular module's internal aliases are to be ignored.

so I should be able to do the following, e.g. in /etc/modprobe.d/gamepad.conf:

blacklist xpad
alias usb:v045Ep028Ed0114dcFFdscFFdpFFicFFisc5Dip01in00 xpad

but this blocks the xpad driver completely. With a rule like this, modprobe usb:v045Ep028Ed0114dcFFdscFFdpFFicFFisc5Dip01in00 does nothing. Surprisingly, this rule does not change the behavior of modprobe -R: the list of modules for both modaliases is the same as before.

This raises a few questions:

  • Am I doing something wrong?

  • Is there a bug in modprobe?

  • Is there an inconsistecy in documentation?

  • Is there a place where I can ask questions about core utilities like modprobe? Is it part of the kernel?

Offline

#2 2023-11-24 12:18:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,754

Re: Blacklisting a specific alias of a kernel module

drop the blacklist but alias the device to the driver you actually want, i.e. alias the one you want on xone, but that's also just a guess never had to do that

Last edited by V1del (2023-11-24 12:23:05)

Offline

#3 2023-11-24 18:16:16

snake.scaly
Member
Registered: 2017-05-03
Posts: 6

Re: Blacklisting a specific alias of a kernel module

Thank you for your suggestion @V1del, it actually works! Now I'm even more confused. I guess I'll have to look into the modprobe sources to figure out what actually happens.

Offline

Board footer

Powered by FluxBB