How to find kernel module for a given device?












1














I am trying to troubleshoot a problem: usb mouse doesn't work on a freshly installed linux.



I suspect the problem is that there is no suitable kernel module/driver for my usb hardware. Indeed:



$ lspci -knn
...
01:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b9] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1142]
01:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b5] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1062]
Kernel driver in use: ahci
...


As you can see no kernel driver is reported for USB controller device (I suppose it should be reported in a way similar to driver reported for SATA controller)



So, I need to rebuild kernel with a module which would be suitable for my device. But how can I find out what module should I build? I have information which identifies my device: it's vendor id and hardware id ([1b21:43b9]). How to find out corresponding kernel module name given this information?










share|improve this question




















  • 1




    @GAD3R lsusb reports nothing. As I understand it is a more high-level command, it can't report anything because there is no kernel driver for USB controller. Is this understanding correct?
    – lesnik
    1 hour ago










  • If the kernel module is not built (or not loaded), or if maybe no kernel module for this device even exists, there's no direct way to find out. Which leaves google (in particular if you need a newer kernel than you have) and greping through the kernel sources, both of which I've done with success in the past.
    – dirkt
    22 mins ago
















1














I am trying to troubleshoot a problem: usb mouse doesn't work on a freshly installed linux.



I suspect the problem is that there is no suitable kernel module/driver for my usb hardware. Indeed:



$ lspci -knn
...
01:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b9] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1142]
01:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b5] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1062]
Kernel driver in use: ahci
...


As you can see no kernel driver is reported for USB controller device (I suppose it should be reported in a way similar to driver reported for SATA controller)



So, I need to rebuild kernel with a module which would be suitable for my device. But how can I find out what module should I build? I have information which identifies my device: it's vendor id and hardware id ([1b21:43b9]). How to find out corresponding kernel module name given this information?










share|improve this question




















  • 1




    @GAD3R lsusb reports nothing. As I understand it is a more high-level command, it can't report anything because there is no kernel driver for USB controller. Is this understanding correct?
    – lesnik
    1 hour ago










  • If the kernel module is not built (or not loaded), or if maybe no kernel module for this device even exists, there's no direct way to find out. Which leaves google (in particular if you need a newer kernel than you have) and greping through the kernel sources, both of which I've done with success in the past.
    – dirkt
    22 mins ago














1












1








1


1





I am trying to troubleshoot a problem: usb mouse doesn't work on a freshly installed linux.



I suspect the problem is that there is no suitable kernel module/driver for my usb hardware. Indeed:



$ lspci -knn
...
01:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b9] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1142]
01:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b5] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1062]
Kernel driver in use: ahci
...


As you can see no kernel driver is reported for USB controller device (I suppose it should be reported in a way similar to driver reported for SATA controller)



So, I need to rebuild kernel with a module which would be suitable for my device. But how can I find out what module should I build? I have information which identifies my device: it's vendor id and hardware id ([1b21:43b9]). How to find out corresponding kernel module name given this information?










share|improve this question















I am trying to troubleshoot a problem: usb mouse doesn't work on a freshly installed linux.



I suspect the problem is that there is no suitable kernel module/driver for my usb hardware. Indeed:



$ lspci -knn
...
01:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b9] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1142]
01:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b5] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1062]
Kernel driver in use: ahci
...


As you can see no kernel driver is reported for USB controller device (I suppose it should be reported in a way similar to driver reported for SATA controller)



So, I need to rebuild kernel with a module which would be suitable for my device. But how can I find out what module should I build? I have information which identifies my device: it's vendor id and hardware id ([1b21:43b9]). How to find out corresponding kernel module name given this information?







usb kernel-modules






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 37 mins ago

























asked 2 hours ago









lesnik

3761312




3761312








  • 1




    @GAD3R lsusb reports nothing. As I understand it is a more high-level command, it can't report anything because there is no kernel driver for USB controller. Is this understanding correct?
    – lesnik
    1 hour ago










  • If the kernel module is not built (or not loaded), or if maybe no kernel module for this device even exists, there's no direct way to find out. Which leaves google (in particular if you need a newer kernel than you have) and greping through the kernel sources, both of which I've done with success in the past.
    – dirkt
    22 mins ago














  • 1




    @GAD3R lsusb reports nothing. As I understand it is a more high-level command, it can't report anything because there is no kernel driver for USB controller. Is this understanding correct?
    – lesnik
    1 hour ago










  • If the kernel module is not built (or not loaded), or if maybe no kernel module for this device even exists, there's no direct way to find out. Which leaves google (in particular if you need a newer kernel than you have) and greping through the kernel sources, both of which I've done with success in the past.
    – dirkt
    22 mins ago








1




1




@GAD3R lsusb reports nothing. As I understand it is a more high-level command, it can't report anything because there is no kernel driver for USB controller. Is this understanding correct?
– lesnik
1 hour ago




@GAD3R lsusb reports nothing. As I understand it is a more high-level command, it can't report anything because there is no kernel driver for USB controller. Is this understanding correct?
– lesnik
1 hour ago












If the kernel module is not built (or not loaded), or if maybe no kernel module for this device even exists, there's no direct way to find out. Which leaves google (in particular if you need a newer kernel than you have) and greping through the kernel sources, both of which I've done with success in the past.
– dirkt
22 mins ago




If the kernel module is not built (or not loaded), or if maybe no kernel module for this device even exists, there's no direct way to find out. Which leaves google (in particular if you need a newer kernel than you have) and greping through the kernel sources, both of which I've done with success in the past.
– dirkt
22 mins ago










1 Answer
1






active

oldest

votes


















3














PCI ID 1022:43b9 is an AMD X370 Series Chipset USB 3.1 xHCI Controller. The PCI subsystem ID 1b21:1142 would suggest it might actually be an ASMedia ASM1042A USB 3 controller, possibly integrated into the AMD chipset.



For most USB 3.x controller chips, the appropriate driver module is xhci_pci which depends on module xhci_hcd. Both these modules are part of the standard Linux kernel, so they should be available in all modern Linux distributions. The corresponding kernel configuration options are CONFIG_USB_XHCI_PCI and CONFIG_USB_XHCI_HCD.



Many distributions include the kernel configuration file as /boot/config-<kernel version number>. So, you could run this command:



$ grep XHCI /boot/config-$(uname -r)
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PCI=m
# CONFIG_USB_XHCI_PLATFORM is not set


Here, both xhci_hcd and xhci_pci are configured to be available as modules. If the lines would say ...=y instead, the USB 3 support would be compiled into the main kernel.



PCI ID 1022:43b5, subsystem ID 1b21:1062 is an AHCI SATA (or eSATA) controller, which is already covered by module ahci.



You can look up PCI IDs in PCI ID Repository.






share|improve this answer



















  • 1




    Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
    – lesnik
    31 mins ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490625%2fhow-to-find-kernel-module-for-a-given-device%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














PCI ID 1022:43b9 is an AMD X370 Series Chipset USB 3.1 xHCI Controller. The PCI subsystem ID 1b21:1142 would suggest it might actually be an ASMedia ASM1042A USB 3 controller, possibly integrated into the AMD chipset.



For most USB 3.x controller chips, the appropriate driver module is xhci_pci which depends on module xhci_hcd. Both these modules are part of the standard Linux kernel, so they should be available in all modern Linux distributions. The corresponding kernel configuration options are CONFIG_USB_XHCI_PCI and CONFIG_USB_XHCI_HCD.



Many distributions include the kernel configuration file as /boot/config-<kernel version number>. So, you could run this command:



$ grep XHCI /boot/config-$(uname -r)
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PCI=m
# CONFIG_USB_XHCI_PLATFORM is not set


Here, both xhci_hcd and xhci_pci are configured to be available as modules. If the lines would say ...=y instead, the USB 3 support would be compiled into the main kernel.



PCI ID 1022:43b5, subsystem ID 1b21:1062 is an AHCI SATA (or eSATA) controller, which is already covered by module ahci.



You can look up PCI IDs in PCI ID Repository.






share|improve this answer



















  • 1




    Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
    – lesnik
    31 mins ago
















3














PCI ID 1022:43b9 is an AMD X370 Series Chipset USB 3.1 xHCI Controller. The PCI subsystem ID 1b21:1142 would suggest it might actually be an ASMedia ASM1042A USB 3 controller, possibly integrated into the AMD chipset.



For most USB 3.x controller chips, the appropriate driver module is xhci_pci which depends on module xhci_hcd. Both these modules are part of the standard Linux kernel, so they should be available in all modern Linux distributions. The corresponding kernel configuration options are CONFIG_USB_XHCI_PCI and CONFIG_USB_XHCI_HCD.



Many distributions include the kernel configuration file as /boot/config-<kernel version number>. So, you could run this command:



$ grep XHCI /boot/config-$(uname -r)
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PCI=m
# CONFIG_USB_XHCI_PLATFORM is not set


Here, both xhci_hcd and xhci_pci are configured to be available as modules. If the lines would say ...=y instead, the USB 3 support would be compiled into the main kernel.



PCI ID 1022:43b5, subsystem ID 1b21:1062 is an AHCI SATA (or eSATA) controller, which is already covered by module ahci.



You can look up PCI IDs in PCI ID Repository.






share|improve this answer



















  • 1




    Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
    – lesnik
    31 mins ago














3












3








3






PCI ID 1022:43b9 is an AMD X370 Series Chipset USB 3.1 xHCI Controller. The PCI subsystem ID 1b21:1142 would suggest it might actually be an ASMedia ASM1042A USB 3 controller, possibly integrated into the AMD chipset.



For most USB 3.x controller chips, the appropriate driver module is xhci_pci which depends on module xhci_hcd. Both these modules are part of the standard Linux kernel, so they should be available in all modern Linux distributions. The corresponding kernel configuration options are CONFIG_USB_XHCI_PCI and CONFIG_USB_XHCI_HCD.



Many distributions include the kernel configuration file as /boot/config-<kernel version number>. So, you could run this command:



$ grep XHCI /boot/config-$(uname -r)
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PCI=m
# CONFIG_USB_XHCI_PLATFORM is not set


Here, both xhci_hcd and xhci_pci are configured to be available as modules. If the lines would say ...=y instead, the USB 3 support would be compiled into the main kernel.



PCI ID 1022:43b5, subsystem ID 1b21:1062 is an AHCI SATA (or eSATA) controller, which is already covered by module ahci.



You can look up PCI IDs in PCI ID Repository.






share|improve this answer














PCI ID 1022:43b9 is an AMD X370 Series Chipset USB 3.1 xHCI Controller. The PCI subsystem ID 1b21:1142 would suggest it might actually be an ASMedia ASM1042A USB 3 controller, possibly integrated into the AMD chipset.



For most USB 3.x controller chips, the appropriate driver module is xhci_pci which depends on module xhci_hcd. Both these modules are part of the standard Linux kernel, so they should be available in all modern Linux distributions. The corresponding kernel configuration options are CONFIG_USB_XHCI_PCI and CONFIG_USB_XHCI_HCD.



Many distributions include the kernel configuration file as /boot/config-<kernel version number>. So, you could run this command:



$ grep XHCI /boot/config-$(uname -r)
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PCI=m
# CONFIG_USB_XHCI_PLATFORM is not set


Here, both xhci_hcd and xhci_pci are configured to be available as modules. If the lines would say ...=y instead, the USB 3 support would be compiled into the main kernel.



PCI ID 1022:43b5, subsystem ID 1b21:1062 is an AHCI SATA (or eSATA) controller, which is already covered by module ahci.



You can look up PCI IDs in PCI ID Repository.







share|improve this answer














share|improve this answer



share|improve this answer








edited 31 mins ago

























answered 51 mins ago









telcoM

15.7k12143




15.7k12143








  • 1




    Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
    – lesnik
    31 mins ago














  • 1




    Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
    – lesnik
    31 mins ago








1




1




Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
– lesnik
31 mins ago




Thanks, you are correct. xhci_hcd module was required. I just found it using live usb with another version of linux. lspci -k command showed me the module name. But this doesn't feel like a true way to resolve similar problems. The question still remains - what is a consistent way to find out kernel module given the hardware id's?
– lesnik
31 mins ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490625%2fhow-to-find-kernel-module-for-a-given-device%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Lallio

Unable to find Lightning Node

Futebolista