public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: dtor_core@ameritech.net, linux-kernel@vger.kernel.org,
	stuart_hayes@dell.com
Subject: Re: Suppressing softrepeat
Date: Tue, 21 Feb 2006 22:08:00 +0100	[thread overview]
Message-ID: <20060221210800.GA12102@suse.cz> (raw)
In-Reply-To: <20060221124308.5efd4889.zaitcev@redhat.com>

On Tue, Feb 21, 2006 at 12:43:08PM -0800, Pete Zaitcev wrote:

> Add the "nosoftrepeat" parameter. This is useful if a "dumb" keyboard
> has (unswitcheable) hardware repeat, like in Dell DRAC3.

The softrepeat code should properly ignore all autorepeated keys from a
'dumb' keyboard. It's rather common that a keyboard we can't communicate
with is in autorepeat mode, because that's the mode AT keyboards wake up
in after power on.

A much simpler workaround for the DRAC3 is to set the softrepeat delay
to at least 750ms, using kbdrate(8), which will call the proper console
ioctl, resulting in updating the softrepeat parameters.

I prefer workarounds for problematic hardware done outside the kernel,
if possible.

> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
> 
> ---
> 
> Hi, Dmitry,
> 
> Dell people passed on a request to add a new parameter, "nosoftrepeat",
> to i8042 (in atkbd.c). So, if I understand right, things should work so:
> 
>  - None set in grub.conf: Softrepeat is set by the driver as detected
>    or derived. This is the default.
>  - "softrepeat" set: Softrepeat is on, regardless
>  - "nosoftrepeat" set: Softrepeat is off, regardless
>  - Both "softrepeat" and "nosoftrepeat" are set: Do not do that.
> 
> The code looked confusing, but there is an good explanation in this bug:
>  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=181457
> 
> In short words, DRAC3 "plugs into" the keyboard connector, but does not
> emulate output, so we detect this as "dumb" keyboard and enable softrepeat.
> But softrepeat causes double keypresses.
> 
> I suppose we could revamp the old softrepeat parameter to be more than
> a boolean, but I see no point.
> 
> If you agree, please include the attached.
> 
> -- Pete
> 
> --- linux-2.6.16-rc2/drivers/input/keyboard/atkbd.c	2006-02-11 00:31:41.000000000 -0800
> +++ linux-2.6.16-rc2-lem/drivers/input/keyboard/atkbd.c	2006-02-21 11:53:53.000000000 -0800
> @@ -50,6 +50,10 @@ static int atkbd_softrepeat;
>  module_param_named(softrepeat, atkbd_softrepeat, bool, 0);
>  MODULE_PARM_DESC(softrepeat, "Use software keyboard repeat");
>  
> +static int atkbd_nosoftrepeat;
> +module_param_named(nosoftrepeat, atkbd_nosoftrepeat, bool, 0);
> +MODULE_PARM_DESC(nosoftrepeat, "Do not use software keyboard repeat");
> +
>  static int atkbd_softraw = 1;
>  module_param_named(softraw, atkbd_softraw, bool, 0);
>  MODULE_PARM_DESC(softraw, "Use software generated rawmode");
> @@ -862,7 +866,7 @@ static int atkbd_connect(struct serio *s
>  	atkbd->softrepeat = atkbd_softrepeat;
>  	atkbd->scroll = atkbd_scroll;
>  
> -	if (!atkbd->write)
> +	if (!atkbd->write && !atkbd_nosoftrepeat)
>  		atkbd->softrepeat = 1;
>  
>  	if (atkbd->softrepeat)
> 
> 

-- 
Vojtech Pavlik
Director SuSE Labs

  reply	other threads:[~2006-02-21 21:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 20:43 Suppressing softrepeat Pete Zaitcev
2006-02-21 21:08 ` Vojtech Pavlik [this message]
2006-02-21 21:32   ` Dmitry Torokhov
2006-02-21 21:40     ` Vojtech Pavlik
2006-02-21 21:57       ` Dmitry Torokhov
2006-02-22 20:00   ` Pete Zaitcev
2006-02-22 20:40     ` Vojtech Pavlik
2006-02-22 21:09       ` Dmitry Torokhov
2006-02-22 22:09         ` Vojtech Pavlik
2006-02-22 22:13           ` Dmitry Torokhov
2006-02-22 21:16       ` Pete Zaitcev
2006-02-21 21:15 ` Dmitry Torokhov
2006-02-21 21:35   ` Vojtech Pavlik
  -- strict thread matches above, loose matches on Subject: below --
2006-02-22 20:46 Stuart_Hayes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060221210800.GA12102@suse.cz \
    --to=vojtech@suse.cz \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuart_hayes@dell.com \
    --cc=zaitcev@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox