View previous topic :: View next topic |
Author |
Message |
ManDay Apprentice

Joined: 22 Jan 2008 Posts: 247
|
Posted: Tue Oct 25, 2011 7:09 pm Post subject: Does the "which driver" question have an universal |
|
|
It sounds strange, but in all the years I've used linux this remained a question which I was never able to fully solve.
The thing:
The kernel seems to know some way to load the correct driver for a device, so it must know which device requires which driver.
But I don't. Why? Why can I not simply use that information which the kernel appears to have to answer the question "Which driver/module do I require to use the pci/usb device of id xxxx:yyyy?"
It's painful to find all those drivers manually and I think, to the present day, I was never able to get all devices to work on all the personal computer I used and own. |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
 |
Gusar Advocate

Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Tue Oct 25, 2011 7:46 pm Post subject: |
|
|
Load a liveusb distro, see if all hardware is working, see which modules got loaded for it (lspci -vnn) |
|
Back to top |
|
 |
<3 Veteran

Joined: 21 Oct 2004 Posts: 1085
|
Posted: Tue Oct 25, 2011 8:07 pm Post subject: |
|
|
Jaglover wrote: | http://kmuto.jp/debian/hcl/ | This. It's what I use these days to set up my kernel. I wish someone would take this idea and write a program that you could install on your box instead of referencing some website. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55015 Location: 56N 3W
|
Posted: Tue Oct 25, 2011 9:57 pm Post subject: |
|
|
ManDay,
The kernel doesn't know. It tries lots of things and if something binds to hardware, it stays loaded, if not its normally unloaded again.
There are two problems with this. The kernel does not always get it right - its been known to load the wrong driver, which stops the right driver from working.
Not all the junk gets unloaded. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
ManDay Apprentice

Joined: 22 Jan 2008 Posts: 247
|
Posted: Wed Oct 26, 2011 9:28 am Post subject: |
|
|
I know of Debian HCL but that was not the answer I was looking for. Neither is using a LiveDistro an "ultimate answer" as I mentioned it.
NeddySeagoon, I guess that's it then. What a bummer.
So back to DebianHCL, is that the best one can get? What about http://cateee.net/lkddb/ ? Any use for http://www.pcidatabase.com/ ?
After all, if there is no ultimate answer that leaves plenty of room for the next best answer possible. So what do you suggest, besides DebianHCL ? |
|
Back to top |
|
 |
Gusar Advocate

Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Wed Oct 26, 2011 10:59 am Post subject: |
|
|
ManDay wrote: | Neither is using a LiveDistro an "ultimate answer" as I mentioned it. |
Of course it is. What else do you expect? You said the kernel does it's thing and you wanted to have that information. A live distro gives you exactly that. |
|
Back to top |
|
 |
py-ro Veteran


Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Wed Oct 26, 2011 12:46 pm Post subject: |
|
|
Hmm,
? |
|
Back to top |
|
 |
ManDay Apprentice

Joined: 22 Jan 2008 Posts: 247
|
Posted: Wed Oct 26, 2011 7:51 pm Post subject: |
|
|
Gusar, that requires that the LiveDistro has all the drivers and also applies them correctly (especially former). So now I have a couple of devices here (also USB vendor:produce keys) and Debian HCL doesn't find them if I insert them as vendor:product keys into that field (lsusb has no -n switch) - does that mean I'm screwed and will have to guess?
py-ro: What? |
|
Back to top |
|
 |
krinn Watchman


Joined: 02 May 2003 Posts: 7471
|
Posted: Wed Oct 26, 2011 8:15 pm Post subject: |
|
|
lspci -k will gave you the kernel driver need to load the module
and neddy said the kernel cannot detect the driver it need for a device, but udev can, and lspci too
and lspci use a live database for devices, so even the tool isn't update, you can still update its database using : update-pciids |
|
Back to top |
|
 |
Gusar Advocate

Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Wed Oct 26, 2011 8:34 pm Post subject: |
|
|
ManDay wrote: | Gusar, that requires that the LiveDistro has all the drivers |
You say the kernel does it's thing and you want that info. But now you're doubting that the kernel has the info? Does not compute. If the kernel has the info, why would a live distro be exempt from that? |
|
Back to top |
|
 |
ManDay Apprentice

Joined: 22 Jan 2008 Posts: 247
|
Posted: Wed Oct 26, 2011 8:49 pm Post subject: |
|
|
Gusar wrote: | ManDay wrote: | Gusar, that requires that the LiveDistro has all the drivers |
You say the kernel does it's thing and you want that info. But now you're doubting that the kernel has the info? Does not compute. If the kernel has the info, why would a live distro be exempt from that? |
Why do think that by "The Kernel" I meant "A Kernel" of an arbitrary live distro, which you seem to reference here? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55015 Location: 56N 3W
|
Posted: Wed Oct 26, 2011 9:10 pm Post subject: |
|
|
ManDay,
lspci followed by lspci -n and a grep of the kernel sources is pretty good.
lsusb and a grep of the kernel sources is good for USB devices too.
The vendor and device IDs are read from the hardware in both cases.
Google can be faster and more user friendly when fed with the device IDs and bus tyoe.
Knowing the file that the vendor and device IDs are declared in is a pretty good guide to where in the kernel you need to look.
This falls down for 'generic devices' like usb-storage devices and UVC class webcams but you can tell the difference between a webcam and a USB storage device by other means :) _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
Gusar Advocate

Joined: 09 Apr 2005 Posts: 2665 Location: Slovenia
|
Posted: Wed Oct 26, 2011 10:07 pm Post subject: |
|
|
ManDay wrote: | Why do think that by "The Kernel" I meant "A Kernel" of an arbitrary live distro, which you seem to reference here? |
Which kernel were you talking about then? The kernel is the kernel. Once compiled it does it's thing. And *especially* on a general purpose live distro, the kernel will have everything under the sun compiled into it (well, as modules actually). |
|
Back to top |
|
 |
|