Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm trying to find the device manufacturer and model of my keyboard and touch pad so I can write an XOrg configuration file targeting it via:

Section "InputClass"
    Identifier "touchpad"
    MatchIsTouchpad "on"
    Driver "synaptics"
    MatchProduct "Product Name"
    MatchVendor "Vendor Name"

How can I discover a device's product and vendor name using a CLI tool? I'd like to nail down my Bluetooth touchpad and keyboard so as to be able to tailor Xorg configuration.

share|improve this question

4 Answers 4

up vote 4 down vote accepted

For USB devices on Linux, you can use:

lsusb -v | grep -e idProduct -e idVendor

For the IDs only:

grep . /sys/bus/usb/devices/*/id*

lsusb uses /var/lib/usbutils/usb.ids to translate ids to names, I don't know whether Xorg would use the same source.

share|improve this answer
Awesome, I can now see my USB devices, but I actually need to find Bluetooth info. This information is exactly what I'm looking for, just need it for my Bluetooth devices. I can find the hex vendor ids on Bluetooth devices, but I can't seem to find actual vendor or product names. – Naftuli Tzvi Kay Dec 10 '12 at 21:37

Device Product Name (Model)

Get the xinput device Product Name (or model) using xinput list. Example output might look something like this:

# xinput list
⎡ Virtual core pointer                      id=2  [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4  [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=10 [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13 [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless        id=16 [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3  [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5  [slave  keyboard (3)]
    ↳ Power Button                              id=6  [slave  keyboard (3)]
    ↳ Video Bus                                 id=7  [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12 [slave  keyboard (3)]

In the above output, the model or product name for the Touchscreen device is "ELAN Touchscreen".

Device Path (Node)

To get the xinput device Vendor Name (or manufacturer), we need to know the device Path (also called Device Node) to query, and then ask udevadm info. You can get the path by listing the xinput properties for a device and finding the 'Device Node' value.

From our previous example the Device Node value for the Touchscreen, which says it has id=10, could be found like this:

# xinput list-props 10 | grep 'Device Node'
    Device Node (253):    "/dev/input/event9"

Device Vendor Name (Manufacturer)

Now we can get the xinput device Vendor Name (or manufacturer) by looking at the value for the VENDOR property returned by udevadm info for the device with our path name found above:

# udevadm info --query=property --name=/dev/input/event9 | grep 'VENDOR='

In the output above, the manufacturer or vendor name for the Touchscreen would be "ELAN".

XOrg Configuration

Putting it all together, we can create a new XOrg configuration InputClass Section to match specific device vendors, products or paths. Using our previous examples, this section matches any Touchscreen Product manufactured by the ELAN Vendor:

Section "InputClass"
    Identifier "elan touchscreen catchall"
    MatchDevicePath "/dev/input/event*"
    MatchProduct "Touchscreen"
    MatchVendor "ELAN"

Thanks to @Stéphane, @Daniel and @ManuelSchneid3r

share|improve this answer

MatchProduct "Product Name" does not work with the output of Stephane's suggestion lsusb -v | grep -e idProduct -e idVendor. I just tested it.

xinput list outputs the correct string that works with MatchProduct

share|improve this answer
Does xinput list list both vendor and product together? Do you know how to work out which is which? – Sparhawk May 25 '13 at 0:32
@Sparhawk xinput list shows the Product name but not the Vendor name. udevadm info shows the Vendor name but not the Product name. – Christopher Aug 4 at 7:04
@Christopher I can't actually remember why I wanted this information, but thanks for replying, and hopefully it can help someone else. – Sparhawk Aug 4 at 10:18

I've found the following commands to be useful in finding the model/vendor for use with the xorg.conf configuration.

From (where /dev/sdx is replaced with the target device's device path i.e. /dev/input/mouse1)

udevadm info --query=all --path=$(udevadm info --query=path --name=/dev/sdx)

According to

udevadm info --export-db | grep ID_MODEL
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.