Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2013 14:53:26 +0300
From:      Vitaly Magerya <vmagerya@gmail.com>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        ports@FreeBSD.org, x11@FreeBSD.org
Subject:   Re: [CFT] Update of xorg libraries and MESA
Message-ID:  <5236F136.5030905@gmail.com>
In-Reply-To: <20130916090354.GW33103@ithaqua.etoilebsd.net>
References:  <522DC3EB.4060607@freebsd.org> <522DE093.9080504@freebsd.org> <5236C259.3020100@gmail.com> <20130916090354.GW33103@ithaqua.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Baptiste Daroussin wrote:
>> 1) 'usb_id' is always NULL, so 'MatchUSBID' directive in xorg.conf won't
>> work;
>> 
>> 2) 'vendor' and 'product' will be determined from 'dev.x.x.%desc' sysctl
>> by splitting on the first space, so for example my USB tablet, which has
>> %desc equal to "WALTOP International Corp. Slim Tablet" will have vendor
>> "WALTOP" and product "International Corp. Slim Tablet" -- so those are
>> the strings I should use in 'MatchVendor' and 'MatchProduct';
>> 
>> 3) if 'devd' is restarted while Xorg is running, further hardware
>> changes will not be reported to Xorg.
>> 
>> Can you confirm I'm reading this right? If so, are there any plans to
>> improving these points?
> 
> Yes you are totally right about all this points this should be fixed.
> 
> I have no time to work on this right now. Anyone volunteering?

I am, once my flu is gone.

I'm actually using a devd backend I wrote a few months ago
(which avoids the mentioned issues), but it's rather different
from yours (more intrusive that is): directives are added to
devd config to call a script when devices appropriate for Xorg
are added or removed. That script will maintain a file with the
list of those devices; it will also print add/remove messages
into a special pipe, if it exists. Xorg will read the file with
the list on startup, and will create and listen to the pipe to
see added/removed devices. This way devd restarts are safely
handled, and the script called from devd can invoke 'usbconfig'
to correctly determine vendor name, product name and usb id.

The open problems here are:
1) what should happen if multiple X instances are running?
2) how to clean the file with the list of devices on boot?

If you're OK with this approach in general, I can clean up my
code, update it and submit a patch.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5236F136.5030905>