From owner-freebsd-questions@FreeBSD.ORG Thu Nov 10 01:01:25 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 98B361065670 for ; Thu, 10 Nov 2011 01:01:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 490388FC0A for ; Thu, 10 Nov 2011 01:01:25 +0000 (UTC) Received: from r56.edvax.de (port-92-195-104-16.dynamic.qsc.de [92.195.104.16]) by mx02.qsc.de (Postfix) with ESMTP id 4F0141E9FE; Thu, 10 Nov 2011 02:01:24 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id pAA11NLA006202; Thu, 10 Nov 2011 02:01:23 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 10 Nov 2011 02:01:23 +0100 From: Polytropon To: Chuck Swiger Message-Id: <20111110020123.778d356f.freebsd@edvax.de> In-Reply-To: <30329CB5-03FA-4717-81E6-43CC9CE43713@mac.com> 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> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 01:01:25 -0000 On Wed, 09 Nov 2011 13:10:20 -0800, Chuck Swiger wrote: > Hi-- > > On Nov 9, 2011, at 12:02 PM, Michael Cardell Widerkrantz wrote: > >> And should HAL have discovered my swedish keyboard automatically in > >> the first place, so there was something going wrong there? > > > > How would HAL know that the keyboard had a Swedish layout? No such > > information is sent through USB or PS/2 when you attach a keyboard. > > True for PS/2, but not true for USB-- the USB Vendor & Product > ID can identify different keyboard types and let you infer the > country. "Can" - I think it's not standard to do so. > For example, see: > > http://www.linux-usb.org/usb.ids Just checked, and the exception is right here: I'm using a Sun USB keyboard + mouse, 0x0430 = Sun Microsystems, Inc. is correct, but 0x100e = 24.1" LCD Monitor v4 / FID-638 Mouse seems to be nonsense. It's a mouse, _infront_ of a 24" monitor, but that's an EIZO CRT. :-) 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 But since 7.0 (6.0 hasn't been introduced to my home system), I get ukbd0: on uhub1 ums0: on uhub1 Note that the corresponding file in the source tree containing the USB devices still has the proper data! And I haven't changed things on hardware side. But maybe this is because the USB subsystem has had many changes... 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: on usbus1 ums0: on usbus1 ums0: 3 buttons and [XY] coordinates ID=0 You can also see that dmesg logs different data (0x100e vs. 0x0100). > At the moment, I happen to be using a: > > Apple Pro Keyboard: > Product ID: 0x020b > Vendor ID: 0x05ac (Apple Inc.) > Version: 4.20 > Speed: Up to 12 Mb/sec > Manufacturer: Mitsumi Electric > Location ID: 0x3d111300 / 6 > Current Available (mA): 250 > Current Required (mA): 50 > > ...and this database would correctly let the system know > that I'm using US layout: > > 020b Pro Keyboard [Mitsumi, A1048/US layout] > > 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. 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...