Take the 2-minute tour ×
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

3 Answers 3

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

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

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

From https://bbs.archlinux.org/viewtopic.php?pid=753773: (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 http://fedoraproject.org/wiki/Input_device_configuration:

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.