[RFC] Add MatchDMI support in InputClass sections

Peter Hutterer peter.hutterer at who-t.net
Sun Dec 8 17:01:19 PST 2013


On Sat, Dec 07, 2013 at 04:48:45PM +0100, Daniel Martin wrote:
> Hi,
> 
> this series adds support to match on DMI identifiers in InputClass
> sections. Its main purpose is to be able to workaround the shortcomings
> of synaptics touch- and clickpads.
> 
> In their latest (Haswell) laptop models Lenovo decided to remove the HW
> buttons below the trackpoint and therefor marks to top area of the
> clickpad as (soft) buttons, see [1]. But, this clickpad can't be
> distinguished from any other clickpad being build in other models (i.e.
> the Lenovo X1 Carbon, which still had the HW buttons) as the product id
> and revision is the same on _all_ synaptics touch- and clickpads (i.e.
> in an old T400). It's possible to distinguish between touch- and clipads
> via device flags. Though, this doesn't gives a hint if it's necessary to
> configure the top area as a `softarea` in xf86-input-synaptics (as the
> firmware of the foopad has no clue what the vendor of the laptop painted
> on it).
> 
> To be able to distinguish between those clickpads and to apply a special
> configuration if necessary an additional matching on DMI identifiers is
> requried. And this series makes it possible to add 'MatchDMI' tokens in
> InputClass sections for this purpose.
> One has to add a 'MatchDMI "key|value"' line into the InputClass section
> to make use of it. 'key' is a DMI identifier and 'value' the desired
> value. All supported/valid keys are listed in the man-page.
> 
> An example would be (values out of the had don't have the laptop at
> hand atm.):
>     MatchDMI "SystemVendor|LENOVO"
>     MatchDMI "ProductName|ThinkPad T440s"

I think using | as a divider here will lead to confusion. it's already used
for "or" in other Match tags, and generally in languages. using "key:value"
is much more common, and allows for | on top of this, e.g.
   MatchDMI "SystemVendor:LENOVO|SytemVendor:DELL"

Aside from that, please move the long commit message to the actual commit
message where you introduce MatchDMI :)
that one is a bit sparse atm.

Cheers,
  Peter

> 
> This series implements MatchDMI support for Linux only, requiring a
> decent old kernel providing the DMI informations via sysfs at
>     /sys/devices/virtual/dmi/id.
> Though, the generic stubs are there and for any other OS it's sufficient
> to implement the initialization.
> 
> 
> Sure, this matching is not necessary for installations where someone
> can modify the configuration as wanted. It's more usefull for
> distributions and live systems willing to provide some "works out of the
> box" experience.
> 
> 
> I hope you'll find it as usefull as I do,
>     Daniel Martin
> 
> [1] http://www.lenovo.com/images/gallery/1060x596/lenovo-laptop-thinkpad-t440s-overhead-keyboard-2.jpg


More information about the xorg-devel mailing list