Re: Periodical interrupt storm when playing game with USB keyboard

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Tue, 23 Jan 2018 13:36:56 +0100
On 01/23/18 12:27, Johannes Lundberg wrote:
> Hi all
> 
> Some quick dtracing with play causing lag, vs play not causing lag (that is
> not hold down any key on a usb keyboard for too long).
> 
> 

Hi,

The only thing I can think about is that one or more of kb_delay1 or 
kb_delay2 are zero:

sys/dev/usb/input/ukbd.c

>         case KDSETREPEAT:               /* set keyboard repeat rate (new
>                                          * interface) */
>                 if (!KBD_HAS_DEVICE(kbd)) {
>                         return (0);
>                 }
>                 /*
>                  * Convert negative, zero and tiny args to the same limits
>                  * as atkbd.  We could support delays of 1 msec, but
>                  * anything much shorter than the shortest atkbd value
>                  * of 250.34 is almost unusable as well as incompatible.
>                  */
>                 kbd->kb_delay1 = imax(((int *)arg)[0], 250);
>                 kbd->kb_delay2 = imax(((int *)arg)[1], 34);
> #ifdef EVDEV_SUPPORT
>                 if (sc->sc_evdev != NULL)
>                         evdev_push_repeats(sc->sc_evdev, kbd);
> #endif
>                 return (0);

Can you add some prints in ukbd.c where kb_delayX are set and see if 
their value are zero? Lowest supported value should be 1.

--HPS
Received on Tue Jan 23 2018 - 11:39:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:14 UTC