From owner-freebsd-questions@FreeBSD.ORG Thu Nov 10 01:35:21 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77CC8106564A for ; Thu, 10 Nov 2011 01:35:21 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout021.mac.com (asmtpout021.mac.com [17.148.16.96]) by mx1.freebsd.org (Postfix) with ESMTP id 596198FC15 for ; Thu, 10 Nov 2011 01:35:16 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp021.mac.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0LUF00G898ER8I10@asmtp021.mac.com> for freebsd-questions@freebsd.org; Wed, 09 Nov 2011 17:35:16 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-11-09_04:2011-11-09, 2011-11-09, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1111090267 From: Chuck Swiger In-reply-to: <20111110020123.778d356f.freebsd@edvax.de> Date: Wed, 09 Nov 2011 17:35:14 -0800 Message-id: References: <4EB88225.9020702@bredband.net> <20111108205600.7a8e0205.freebsd@edvax.de> <20111108215114.24d336e6.freebsd@edvax.de> <4EBA5EBD.7020501@bredband.net> <86pqh1njww.fsf@kropotkin.hack.org> <30329CB5-03FA-4717-81E6-43CC9CE43713@mac.com> <20111110020123.778d356f.freebsd@edvax.de> To: Polytropon X-Mailer: Apple Mail (2.1084) Cc: freebsd-questions@freebsd.org Subject: Re: X server and xinit works excellent....almost. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 01:35:21 -0000 On Nov 9, 2011, at 5:01 PM, Polytropon wrote: > In this regards, it's also strange how FreeBSD could "forget" > USB information it once had. > > On my old 5.x system, I got dmesg lines like that: > > ukbd0: Sun Microsystems Type 6 USB keyboard, > rev 1.00/1.02, addr 3, iclass 3/1 > ums0: Sun Microsystems Type 6 USB mouse, > rev 1.00/1.02, addr 2, iclass 3/1 A USB standard device descriptor includes iManufacturer and iProduct fields, which are likely the source of the strings displayed above. I guess the new USB stack doesn't bother to display them. > Now that I have a type 7 keyboard, the USB information still > is not useful: > > % usbconfig -u 1 -a 3 dump_info > ugen1.3: at usbus1, > cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON > % usbconfig -u 1 -a 2 dump_info > ugen1.2: at usbus1, > cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE > > % dmesg | grep "^u[km]" > ukbd1: class 0/0, rev 2.00/1.05, addr 3> on usbus1 > ums0: class 0/0, rev 1.00/1.02, addr 4> on usbus1 > ums0: 3 buttons and [XY] coordinates ID=0 > > You can also see that dmesg logs different data (0x100e vs. 0x0100). The 0x0100 is for the mouse; the 0x100e is probably a USB hub, perhaps within the keyboard if the mouse attaches to the keyboard, although the database suggests it was a USB hub within a monitor. >> If you figure out that a Logitech Tangentbord K120 (or an Apple >> MC184S) is connected, then you've got a Swiss keyboard, and so >> forth. > > This is fine as long as you're going to keep that language > settings. However, there are users who need a non-US language > on a US keyboard layout - or vice versa. In such a case, the > autodetection doesn't help. The idea is that autodetection provides a suggested default, at least if it can identify a country for the input devices which are connected to the system. But users should be able to set up their own language preferences, which might be different from the system default and from other user's settings. > Your example with Apple hardware corresponds to my experience. > I also have an older Mac keyboard which works fine on FreeBSD, > including proper device identification. > > My assumption still is: Not _every_ keyboard manufacturer does > code the layout into the USB identification. If you tell me I'm > wrong with this assumption, I'll be happy. :-) Folks are supposed to use a different product ID for different devices, so you can uniquely identify them. I can't promise that every vendor handles this perfectly, any more than folks always ensured that PCI ids uniquely identified a specific hardware version, but one should blame the vendor for being brain-damaged in such cases; it isn't a fault of the USB standard.... Regards, -- -Chuck