How does modprobe.d blacklist work, exactly?

Problem

I have conflicting drivers: xpad which comes standard with Arch, and xone which I installed from AUR. Both claim to support my Xbox One wireless controller even though only the xone driver knows what to do with it.

AFAIU, the culprit is the alias: usb:v045EpddcdscdpicFFisc5Dip01in in the xpad driver which is too inclusive.

I want only the xone_dongle loaded for the modalias above. But I don't want to disable the xpad driver completely, because I also use a wired Xbox 360 controller usb:v045Ep028Ed0114dcFFdscFFdpFFicFFisc5Dip01in00 which I still want to be handled by xpad. I don't need them to work at the same time, but at least if I plug one of them after a clean boot, either should work.

Attempted solution

The manual page for modprobe.d states:

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

Which sounds like if I blacklist xpad and then define my own alias for it, it should work the way I want:

/etc/modprobe.d/gamepad.conf

But instead it completely prevents the xpad driver from loading, even though the alias is correct.

Also, even though I've blacklisted xpad in the configuration, modprobe -R still finds it for the modalias of the wireless dongle.

Non-conclusion

Can someone please shed some light on how this actually works? Is there a bug in modprobe? Is modprobe.d documentation incomplete? Which aspects of modprobe should be affected by the modprobe.d configuration and which shouldn't?

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论