From owner-freebsd-x11@FreeBSD.ORG Mon Sep 16 11:53:47 2013 Return-Path: Delivered-To: x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 228ED60F; Mon, 16 Sep 2013 11:53:47 +0000 (UTC) (envelope-from vmagerya@gmail.com) Received: from mail-bk0-x22e.google.com (mail-bk0-x22e.google.com [IPv6:2a00:1450:4008:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DFBA2695; Mon, 16 Sep 2013 11:53:46 +0000 (UTC) Received: by mail-bk0-f46.google.com with SMTP id 6so1436856bkj.19 for ; Mon, 16 Sep 2013 04:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gs/l8r5eauOSglSa1YgqsWXXfzTX/SJZ3/m/WEZHcj4=; b=xRaEvgSnjdq+2lk4ixU8/I6hwr1wA66YpMAj9Ft23CWRPCaJadSS9Y690at2cOjyFL DjTnaciC2X2jAja9KG+eFDTX6SHwCox0ik5o6TLKv8EDmmgzxLRbwuuJVYn5cp4hZhx8 FytK8tapLiwhwCro+TMN0Fcck334CAJ6gLGjIUANjzcguYYHw81B4QcKsD6DhbPXXhlO 97g8UijxrXSOQeNzX5JNOd/n2VoShtwgpWZwBZv/gBJQThfQ/RFYim3ibHO8d756b4nK qmEkta/fMmgeB3sKKLjCmi0SOkupsgOesABXn4vw++8i2WYDmwRmj1XPSTH/GzECmj2I Lx0Q== X-Received: by 10.204.102.136 with SMTP id g8mr1500972bko.34.1379332423583; Mon, 16 Sep 2013 04:53:43 -0700 (PDT) Received: from [172.16.0.2] (tx97.net. [85.198.160.156]) by mx.google.com with ESMTPSA id qg7sm7437756bkb.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Sep 2013 04:53:42 -0700 (PDT) Message-ID: <5236F136.5030905@gmail.com> Date: Mon, 16 Sep 2013 14:53:26 +0300 From: Vitaly Magerya User-Agent: Thunderbird MIME-Version: 1.0 To: Baptiste Daroussin Subject: Re: [CFT] Update of xorg libraries and MESA References: <522DC3EB.4060607@freebsd.org> <522DE093.9080504@freebsd.org> <5236C259.3020100@gmail.com> <20130916090354.GW33103@ithaqua.etoilebsd.net> In-Reply-To: <20130916090354.GW33103@ithaqua.etoilebsd.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ports@FreeBSD.org, x11@FreeBSD.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 11:53:47 -0000 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.