Re: USB2, mouse and X

From: Robert Noland <rnoland_at_FreeBSD.org>
Date: Fri, 20 Mar 2009 01:01:01 -0500
On Fri, 2009-03-20 at 15:42 +1100, Mattia Rossi wrote:
> Okay. Got some help from Lawrence (Stewart), who cleaned up my messy 
> system, and it seems everything resolved itself, after we recompiled 
> world and the kernel, and recompiled also the libpciaccess port.
> 
> It seems that the msi pci stuff of the old libpciaccess was interfering 
> with the changes in the new kernel.
> 
> I can't tell more details, just that it works now.

So, the issue is that for some reason that I don't understand...
libpciaccess seems to trash usb for a few folks when it frobs the
registers on it's own.  jhb_at_ added an ioctl to the kernel so that
userland could just ask for the info, rather than digging around in the
bowels of the pci bus.  The port will use the ioctl if it exists at
build time.  So, you need a semi-recent -STABLE or -CURRENT and then
rebuild devel/libpciaccess.

robert.

> Mat
> 
> P.s.: It also improved 2D acceleration massively!
> 
> Mattia Rossi wrote:
> > Hans Petter Selasky wrote:
> >> Hi Mattia,
> >>
> >> I see that your keyboard is connected through a High-Speed HUB.
> >>
> >> 1) Has your setup ever worked with the USB2 stack? It's strange that 
> >> there is only one interrupt on the EHCI. And when was the kernel built?
> >>   
> > FreeBSD 8.0-CURRENT #11 r189933M: Wed Mar 18 10:34:42 EST 2009
> >
> > Actually the trouble with the mouse started with the USB2 stack. It 
> > never worked properly since then.
> > First I thought it's an X problem, then a KDE4 problem, and after 
> > rebuilding and rebuilding I gave up..
> >> 2) When you run "usbconfig" you will see some lines with "pwr=SAVE". 
> >> Maybe there is a bug that will disable the wrong ports at power save.
> >>   
> > ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH 
> > (480Mbps) pwr=ON
> > ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH 
> > (480Mbps) pwr=ON
> > ugen6.2: <product 0x2514 Standard Microsystems> at usbus6, cfg=0 
> > md=HOST spd=HIGH (480Mbps) pwr=SAVE
> > ugen6.3: <USB Optical Mouse Logitech> at usbus6, cfg=0 md=HOST spd=LOW 
> > (1.5Mbps) pwr=ON
> > ugen6.4: <HP Basic USB Keyboard CHICONY> at usbus6, cfg=0 md=HOST 
> > spd=LOW (1.5Mbps) pwr=ON
> >
> > That's what it looks like.
> >> 3) Can you try other ports or connect another High Speed HUB in between?
> >>
> >> usbconfig -u 6 -a 2 power_on
> >>   
> > Tried to switch power on. It looks like this now:
> >
> > ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH 
> > (480Mbps) pwr=ON
> > ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH 
> > (480Mbps) pwr=ON
> > ugen6.2: <product 0x2514 Standard Microsystems> at usbus6, cfg=0 
> > md=HOST spd=HIGH (480Mbps) pwr=ON
> > ugen6.3: <USB Optical Mouse Logitech> at usbus6, cfg=0 md=HOST spd=LOW 
> > (1.5Mbps) pwr=ON
> > ugen6.4: <HP Basic USB Keyboard CHICONY> at usbus6, cfg=0 md=HOST 
> > spd=LOW (1.5Mbps) pwr=ON
> >
> > but it doesn't change the situation. There is still the lag. Plugging 
> > keyboard and mouse in on the back port of the PC
> > just gives the following output:
> >
> > ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH 
> > (480Mbps) pwr=ON
> > ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL 
> > (12Mbps) pwr=ON
> > ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH 
> > (480Mbps) pwr=ON
> > ugen6.2: <product 0x2514 Standard Microsystems> at usbus6, cfg=0 
> > md=HOST spd=HIGH (480Mbps) pwr=SAVE
> > ugen5.2: <USB Optical Mouse Logitech> at usbus5, cfg=0 md=HOST spd=LOW 
> > (1.5Mbps) pwr=ON
> > ugen5.3: <HP Basic USB Keyboard CHICONY> at usbus5, cfg=0 md=HOST 
> > spd=LOW (1.5Mbps) pwr=ON
> >
> > Nothing changes here either.
> >
> > I'll rebuild the latest kernel, and see what happens then.
> >
> > Thanks for your help!
> >
> > Mat
> >> --HPS
> >>
> >> ugen6.2: <Standard Microsystems> at usbus6
> >> uhub7: <Standard Microsystems product 0x2514, class 9/0, rev 
> >> 2.00/0.00, addr 2> on usbus6
> >> uhub7: 2 ports with 1 removable, self powered
> >> ugen6.3: <CHICONY> at usbus6
> >> ukbd0: <CHICONY HP Basic USB Keyboard, class 0/0, rev 1.10/3.00, addr 
> >> 3> on usbus6
> >> kbd2 at ukbd0
> >> ugen6.4: <Logitech> at usbus6
> >> ums0: <Logitech USB Optical Mouse, class 0/0, rev 2.00/43.01, addr 4> 
> >> on usbus6
> >> ums0: 3 buttons and [XYZ] coordinates
> >>
> >>  
> >>> irq22: ehci0 uhci4                     1          0
> >>> Then to the console switching part: It's not possible to switch to the
> >>> console until the text shows up again. As I said, it seems the system
> >>> gets blocked.
> >>>     
> >
> > _______________________________________________
> > freebsd-current_at_freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to 
> > "freebsd-current-unsubscribe_at_freebsd.org"
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
-- 
Robert Noland <rnoland_at_FreeBSD.org>
FreeBSD

Received on Fri Mar 20 2009 - 05:01:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:44 UTC