Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What does udev's "hwdb" actually do?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Fri Feb 08, 2013 10:23 pm    Post subject: What does udev's "hwdb" actually do? Reply with quote

I'm looking for a fairly detailed explanation that can serve as a basis for determining if one wants it or not. At present, I have chosen to disable it.
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Sun Feb 10, 2013 5:22 am    Post subject: Reply with quote

Isn't it just a (human readable) list of manufacturers, devices, device IDS etc? So if you plug your iFoobar in it recognises it as an iFoobar.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Sun Feb 10, 2013 5:50 am    Post subject: Reply with quote

That would be a logical assumption, but where is it documented? Who creates it? What's in it, and what's not, and why?

Is it not the kernel which recognizes hardware and populates sysfs with such information? If so, then how does this hwdb relate to that, and why is it not part of that functionality of the kernel?

My hardware seems to work fine, so how do I know if I want to use it?
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Sun Feb 10, 2013 6:01 am    Post subject: Reply with quote

BoneKracker wrote:
That would be a logical assumption, but where is it documented? Who creates it? What's in it, and what's not, and why?

Is it not the kernel which recognizes hardware and populates sysfs with such information? If so, then how does this hwdb relate to that, and why is it not part of that functionality of the kernel?

My hardware seems to work fine, so how do I know if I want to use it?

http://pci-ids.ucw.cz/
That explains a bit. It's mainly to name devices, otherwise I don't see the need for it.
http://pci-ids.ucw.cz/v2.2/pci.ids
Text file with device to device naming.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Sun Feb 10, 2013 6:03 am    Post subject: Reply with quote

Okay, that's what you meant by "human readable". It still seems redundant with the kernel, which has a database of vendor names and associated codes, and a data model which drivers are supposed to conform to which allows devices and drivers to be identifiable in sysfs.

I'm not saying it shouldn't exist; I'm just saying I don't understand why it does.


Last edited by Bones McCracker on Sun Feb 10, 2013 6:08 am; edited 1 time in total
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Sun Feb 10, 2013 6:07 am    Post subject: Reply with quote

BoneKracker wrote:
Okay, that's what you meant by "human readable". It still seems redundant with the kernel, which has a database of vendor names, device names, and associated hardware codes.

I'm not saying it shouldn't exist; I'm just saying I don't understand why it does.

But does the kernel pass the name along with the hardware codes? I get the impression it doesn't and the names are not resolved properly until udev is started.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Sun Feb 10, 2013 6:17 am    Post subject: Reply with quote

Maybe it doesn't, or doesn't always, but it seems to me that if there's a basic function already being performed to identify devices and tabulate their various characteristics, why should a completely separate function be required merely to layer on top of that some additional information.

I suppose it must be a kernelspace vs userspace thing. The kernel doesn't need to know the human-readable names, but it's useful in userspace. Maybe I'll shut up and first read what you've provided though. :lol:

Edit: okay I looked at it. Now I'm left wondering why create something like this just for PCI? Wouldn't it be best to ingrate some information model across all the buses and classes of devices and so on?

Ah well, I suppose I don't really need to know.
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Sun Feb 10, 2013 6:25 am    Post subject: Reply with quote

BoneKracker wrote:
Maybe it doesn't, or doesn't always, but it seems to me that if there's a basic function already being performed to identify devices and tabulate their various characteristics, why should a completely separate function be required merely to layer on top of that some additional information.

I suppose it must be a kernelspace vs userspace thing. The kernel doesn't need to know the human-readable names, but it's useful in userspace. Maybe I'll shut up and first read what you've provided though. :lol:

It doesn't seem to be very useful if all the peripherals work and you don't change your hardware configuration much. I do seem to recall that the parsing of the database while certain packages are compiling is very slow, even on a fast processor, to the point I thought the computer had crashed. Anyway, this isn't useful, so good luck, hope someone else has more definitive advice than I. :)
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Sun Feb 10, 2013 6:28 am    Post subject: Reply with quote

Your answer was helpful. Thanks.
Back to top
View user's profile Send private message
Darth Marley
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jan 2007
Posts: 105

PostPosted: Tue Feb 12, 2013 3:24 pm    Post subject: Reply with quote

Would it be useful in implementing a live CD?
Back to top
View user's profile Send private message
RobPearce
n00b
n00b


Joined: 12 Jul 2005
Posts: 46
Location: Cambridge, England

PostPosted: Tue Apr 30, 2013 7:40 am    Post subject: Reply with quote

sikpuppy wrote:

But does the kernel pass the name along with the hardware codes? I get the impression it doesn't and the names are not resolved properly until udev is started.

The kernel "passes" a default name. Actually, since udev-197, the kernel creates the device node via the devtmpfs support. Udev then does nothing with that except add symlinks. Any attempt to rename it is met with an error message.

This is, of course, all in COMPLETE CONTRADICTION to the original stated aim of UDEV that there should be no naming policy in the kernel. UDEV is now completely broken in this regard.

Now, if you're saying that hwdb might actually allow me to get round the catastrophic brokenness then it's worth investigating.
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 10

PostPosted: Tue Apr 30, 2013 8:37 am    Post subject: Reply with quote

is it part of systemd?
Back to top
View user's profile Send private message
sikpuppy
n00b
n00b


Joined: 12 Jun 2012
Posts: 34
Location: Central Coast, NSW

PostPosted: Tue Apr 30, 2013 8:56 am    Post subject: Reply with quote

Prenj wrote:
is it part of systemd?

No.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Tue Apr 30, 2013 2:07 pm    Post subject: Reply with quote

Everything is part of systemd. If you drew a Venn digram, you could make a big circle and label it "Everything", then draw an even bigger one around it, and label that "systemd".

Here are the only things systemd is missing:
- kernel
- ntpd
- sshd
- MS Office
- iTunes
Back to top
View user's profile Send private message
Prenj
n00b
n00b


Joined: 20 Nov 2011
Posts: 10

PostPosted: Tue Apr 30, 2013 2:26 pm    Post subject: Reply with quote

BoneKracker wrote:
Everything is part of systemd. If you drew a Venn digram, you could make a big circle and label it "Everything", then draw an even bigger one around it, and label that "systemd".

Here are the only things systemd is missing:
- kernel
- ntpd
- sshd
- MS Office
- iTunes


Lets not forget Lotus Notes!
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1553
Location: U.S.A.

PostPosted: Tue Apr 30, 2013 6:10 pm    Post subject: Reply with quote

Yeah. "Speaking of bloatware." The main thing I remember about Lotus Notes is that it was complicated and butt-ugly. One of my former employers used it, and had tens of thousands of "databases".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum