Lose use of keyboard when booted with two USB keyboards then removing one

Joe Marcus Clarke marcus at marcuscom.com
Sun Jan 10 20:48:15 UTC 2010


On Sun, 2010-01-10 at 10:42 +0000, Gavin Atkinson wrote:
> On Thu, 26 Nov 2009, Joe Marcus Clarke wrote:
> > On Tue, 2009-11-03 at 15:58 +0000, Gavin Atkinson wrote:
> > > Hi all,
> > > 
> > > I'm seeing an oddity, which I'm guessing might be a bug in hal, but I
> > > don't know yet.  I only see it in GNOME, not on the console.
> > > 
> > > I booted this machine (running 8.0-RC2) with two keyboards plugged in:
> > > 
> > > ugen5.2: <product 0x00db vendor 0x045e> at usbus5, cfg=0 md=HOST spd=LOW
> > > (1.5Mbps) pwr=ON
> > > ugen6.3: <product 0x5500 vendor 0x046e> at usbus6, cfg=0 md=HOST spd=LOW
> > > (1.5Mbps) pwr=ON
> > > 
> > > Both keyboards work fine from the console and in GNOME.
> > > 
> > > Now, if I unplug one of the keyboards, the other no longer works.  This
> > > is only in GNOME, it still works fine in the console (which I'm guessing
> > > rules out the new USB subsystem?)
> > > 
> > > My xorg.conf, the output of "lshal" with both keyboards plugged in and
> > > both working, and "lshal" after one keyboard was unplugged and neither
> > > work are available at http://people.freebsd.org/~gavin/hal-kbd/.
> > > 
> > > (in this case I unplugged the product 0x5500 vendor 0x046e keyboard, and
> > > found the other keyboard dead)
> > > 
> > > Please, if you need any more info, let me know, and please keep me cc'd.
> > 
> > I don't see anything wrong with hal per se.  After the ukbd0 device is
> > removed, hald continues to report that ukbd1 is available, and is an X11
> > kbd device.  I strongly suspect this is an X issue.  When you say that
> > you only see this in GNOME, do you mean you've tried other DE/WMs, and
> > you do not see the problem there?  What messages do you see in your X
> > log when you unplug the keyboard?  What happens if you disable hal, and
> > configure input devices statically for X?
> 
> Apologies for the long delay in responding to this.
> 
> I've now tested this by adding
> 
> Section "ServerFlags"
> 	Option	"AutoAddDevices"	"False"
> EndSection
> 
> to my xorg.conf.  I hope that is the correct way to test, but if it isn't 
> let me know and I can retest.
> 
> Anyway, with the above changes, I can confirm that unplugging one keyboard 
> does not break the other.  Commenting the above back out and rebooting 
> reverts to the "removing one keyboard breaks the other".  Does this point 
> to HAL or X as being the cause?  It turns out it's not limited to Gnome, I 
> can recreate it with twm too.
> 
> It turns out by the way that it does not need to be two USB keyboards for 
> it to happen. Both laptops I can test this on demonstrate the problem: if 
> a USB keyboard is unplugged, the internal keyboard will not work until the 
> external keyboard is plugged back in.  Note that the machine doesn't even 
> need to be booted with the USB keyboard: it is simply enough to plug an 
> external keyboard in at any point.  Before it's inserted the internal 
> keyboard works, on insertion both keyboards work, and on removal the 
> internal keyboard stops working until it is reinserted.

I think the problem is with X, and its use of hal.  The lshal output
does not show a problem since both ukbd0 and ukbd1 are present, and both
are marked with the proper input.x11_driver.  Perhaps X is locking onto
the first device, and not seeing ukbd1 as a candidate when ukbd0 is
removed.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20100110/b6e029b9/attachment.pgp


More information about the freebsd-gnome mailing list