* keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 @ 2003-10-07 20:33 Jurriaan 2003-10-07 20:40 ` Vojtech Pavlik 0 siblings, 1 reply; 5+ messages in thread From: Jurriaan @ 2003-10-07 20:33 UTC (permalink / raw) To: linux-kernel; +Cc: vojtech I like my keyboard fast (must be from playing a lot of angband). In 2.6.0-test5, after '/sbin/kbdrate -r 30 -d 250', I get some 2000 characters in a minute (pressing n continuously, stopwatch in hand). In 2.6.0-test6 and 2.6.0-test6-mm4, after '/sbin/kbdrate -r 30 -d 250', I get some 820 characters in a minute. 30 cps != 800/60 s, that's more like half that rate. Booting with or without atkbd_softrepeat=1 on the kernel commandline makes no difference at all. It's not only the repeat-speed that has gone down, the delay before repeat kicks in is notably slower as well. This is perhaps even more frustrating, but harder to measure :-( This is on a plain Chicony KB-7903 PS/2 keyboard. It is connected via a Vista Rose KVM to a VIA KT400 chipset motherboard. Any patches to test are very welcome here. Thanks, Jurriaan -- She'd put a lot of work and practice into that glare, and it had always served her well in the past. It suggested she was one hundred percent crazy, barely under control, and violent with it. Simon R Green - Guard against Dishonour Debian (Unstable) GNU/Linux 2.6.0-test5 4276 bogomips 0.33 0.14 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 2003-10-07 20:33 keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 Jurriaan @ 2003-10-07 20:40 ` Vojtech Pavlik 2003-10-08 8:23 ` Jurriaan 0 siblings, 1 reply; 5+ messages in thread From: Vojtech Pavlik @ 2003-10-07 20:40 UTC (permalink / raw) To: Jurriaan; +Cc: linux-kernel, vojtech [-- Attachment #1: Type: text/plain, Size: 1071 bytes --] On Tue, Oct 07, 2003 at 10:33:16PM +0200, Jurriaan wrote: > I like my keyboard fast (must be from playing a lot of angband). > > In 2.6.0-test5, after '/sbin/kbdrate -r 30 -d 250', I get some 2000 > characters in a minute (pressing n continuously, stopwatch in hand). > In 2.6.0-test6 and 2.6.0-test6-mm4, after '/sbin/kbdrate -r 30 -d 250', > I get some 820 characters in a minute. > > 30 cps != 800/60 s, that's more like half that rate. > > Booting with or without atkbd_softrepeat=1 on the kernel commandline > makes no difference at all. It's a bug. I have a fix, it went through LKML already, but Linus didn't merge it yet. I'll be resending it. > It's not only the repeat-speed that has gone down, the delay before > repeat kicks in is notably slower as well. This is perhaps even more > frustrating, but harder to measure :-( > > This is on a plain Chicony KB-7903 PS/2 keyboard. It is connected via a > Vista Rose KVM to a VIA KT400 chipset motherboard. > > Any patches to test are very welcome here. Fix attached. -- Vojtech Pavlik SuSE Labs, SuSE CR [-- Attachment #2: kbdrate-fix --] [-- Type: text/plain, Size: 1933 bytes --] You can pull this changeset from: bk://kernel.bkbits.net/vojtech/input =================================================================== ChangeSet@1.1386, 2003-09-29 17:00:25+02:00, vojtech@suse.cz input: Fix AT keyboard repeat rate setting, also make rate selection in finer steps. atkbd.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) =================================================================== diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c --- a/drivers/input/keyboard/atkbd.c Mon Sep 29 17:16:17 2003 +++ b/drivers/input/keyboard/atkbd.c Mon Sep 29 17:16:17 2003 @@ -370,10 +370,11 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { struct atkbd *atkbd = dev->private; - struct { int p; u8 v; } period[] = - { {30, 0x00}, {25, 0x02}, {20, 0x04}, {15, 0x08}, {10, 0x0c}, {7, 0x10}, {5, 0x14}, {0, 0x14} }; - struct { int d; u8 v; } delay[] = - { {1000, 0x60}, {750, 0x40}, {500, 0x20}, {250, 0x00}, {0, 0x00} }; + const short period[32] = + { 33, 37, 42, 46, 50, 54, 58, 63, 67, 75, 83, 92, 100, 109, 116, 125, + 133, 149, 167, 182, 200, 217, 232, 250, 270, 303, 333, 370, 400, 435, 470, 500 }; + const short delay[4] = + { 250, 500, 750, 1000 }; char param[2]; int i, j; @@ -407,11 +408,11 @@ if (atkbd_softrepeat) return 0; i = j = 0; - while (period[i].p > dev->rep[REP_PERIOD]) i++; - while (delay[j].d > dev->rep[REP_DELAY]) j++; - dev->rep[REP_PERIOD] = period[i].p; - dev->rep[REP_DELAY] = delay[j].d; - param[0] = period[i].v | delay[j].v; + while (i < 32 && period[i] < dev->rep[REP_PERIOD]) i++; + while (j < 4 && delay[j] < dev->rep[REP_DELAY]) j++; + dev->rep[REP_PERIOD] = period[i]; + dev->rep[REP_DELAY] = delay[j]; + param[0] = i | (j << 5); atkbd_command(atkbd, param, ATKBD_CMD_SETREP); return 0; ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 2003-10-07 20:40 ` Vojtech Pavlik @ 2003-10-08 8:23 ` Jurriaan 2003-10-08 8:28 ` Vojtech Pavlik 0 siblings, 1 reply; 5+ messages in thread From: Jurriaan @ 2003-10-08 8:23 UTC (permalink / raw) To: Vojtech Pavlik; +Cc: linux-kernel From: Vojtech Pavlik <vojtech@suse.cz> Date: Tue, Oct 07, 2003 at 10:40:56PM +0200 > On Tue, Oct 07, 2003 at 10:33:16PM +0200, Jurriaan wrote: > > I like my keyboard fast (must be from playing a lot of angband). > > > > In 2.6.0-test5, after '/sbin/kbdrate -r 30 -d 250', I get some 2000 > > characters in a minute (pressing n continuously, stopwatch in hand). > > In 2.6.0-test6 and 2.6.0-test6-mm4, after '/sbin/kbdrate -r 30 -d 250', > > I get some 820 characters in a minute. > > > > 30 cps != 800/60 s, that's more like half that rate. > > > > Booting with or without atkbd_softrepeat=1 on the kernel commandline > > makes no difference at all. > > It's a bug. I have a fix, it went through LKML already, but Linus > didn't merge it yet. I'll be resending it. > > > It's not only the repeat-speed that has gone down, the delay before > > repeat kicks in is notably slower as well. This is perhaps even more > > frustrating, but harder to measure :-( > > > > This is on a plain Chicony KB-7903 PS/2 keyboard. It is connected via a > > Vista Rose KVM to a VIA KT400 chipset motherboard. > > > > Any patches to test are very welcome here. > > Fix attached. > Sorry, but that fix is already in 2.6.0-test6-mm4; that's why I tested that version... Anyway, I added some printk's like this: case EV_REP: printk( KERN_INFO "atkbd: atkbd_softrepeat %d\n", atkbd_softrepeat); if (atkbd_softrepeat) return 0; i = j = 0; while (i < 32 && period[i] < dev->rep[REP_PERIOD]) i++; while (j < 4 && delay[j] < dev->rep[REP_DELAY]) j++; dev->rep[REP_PERIOD] = period[i]; dev->rep[REP_DELAY] = delay[j]; printk( KERN_INFO "atkbd: period %d delay %d\n", period[i], delay[j]); param[0] = i | (j << 5); atkbd_command(atkbd, param, ATKBD_CMD_SETREP); return 0; And even if my command-line for the kernel looks like this: Kernel command line: root=/dev/md3 video=matroxfb:xres:1600,yres:1360,depth:16,pixclock:4116,left:304,right:64,upper:46,lower:1,hslen :192,vslen:3,fv:90,hwcursor=off hdb=scsi apm=power-off atkbd_softrepeat=1 I still see this: :kbdrate -r 50 -d 100 atkbd: atkbd_softrepeat 0 atkbd: period 33 delay 250 atkbd: atkbd_softrepeat 0 atkbd: period 33 delay 250 Typematic Rate set to 30.3 cps (delay = 250 ms) and I still get only 800 cpm, which means 14 cps or so. Why it atkbd_softrepeat still 0 with this command-line? Kind regards, Jurriaan -- How should I know if it works? That's what beta testers are for. I only coded it. Attributed to Linus Torvalds, somewhere in a posting Debian (Unstable) GNU/Linux 2.6.0-test6-mm4 4276 bogomips 0.27 0.14 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 2003-10-08 8:23 ` Jurriaan @ 2003-10-08 8:28 ` Vojtech Pavlik 2003-10-13 3:54 ` Andrew Morton 0 siblings, 1 reply; 5+ messages in thread From: Vojtech Pavlik @ 2003-10-08 8:28 UTC (permalink / raw) To: Jurriaan; +Cc: Vojtech Pavlik, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1453 bytes --] On Wed, Oct 08, 2003 at 10:23:46AM +0200, Jurriaan wrote: > From: Vojtech Pavlik <vojtech@suse.cz> > Date: Tue, Oct 07, 2003 at 10:40:56PM +0200 > > On Tue, Oct 07, 2003 at 10:33:16PM +0200, Jurriaan wrote: > > > I like my keyboard fast (must be from playing a lot of angband). > > > > > > In 2.6.0-test5, after '/sbin/kbdrate -r 30 -d 250', I get some 2000 > > > characters in a minute (pressing n continuously, stopwatch in hand). > > > In 2.6.0-test6 and 2.6.0-test6-mm4, after '/sbin/kbdrate -r 30 -d 250', > > > I get some 820 characters in a minute. > > > > > > 30 cps != 800/60 s, that's more like half that rate. > > > > > > Booting with or without atkbd_softrepeat=1 on the kernel commandline > > > makes no difference at all. > > > > It's a bug. I have a fix, it went through LKML already, but Linus > > didn't merge it yet. I'll be resending it. > > > > > It's not only the repeat-speed that has gone down, the delay before > > > repeat kicks in is notably slower as well. This is perhaps even more > > > frustrating, but harder to measure :-( > > > > > > This is on a plain Chicony KB-7903 PS/2 keyboard. It is connected via a > > > Vista Rose KVM to a VIA KT400 chipset motherboard. > > > > > > Any patches to test are very welcome here. > > > > Fix attached. > > > Sorry, but that fix is already in 2.6.0-test6-mm4; that's why I tested > that version... Yet another bug. Fix attached, too. -- Vojtech Pavlik SuSE Labs, SuSE CR [-- Attachment #2: softrepeat --] [-- Type: text/plain, Size: 1083 bytes --] You can pull this changeset from: bk://kernel.bkbits.net/vojtech/input =================================================================== ChangeSet@1.1340.1.2, 2003-09-28 18:48:05+02:00, vojtech@suse.cz input: Fix atkbd_softrepeat kernel command line parameter. atkbd.c | 8 ++++++++ 1 files changed, 8 insertions(+) =================================================================== diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c --- a/drivers/input/keyboard/atkbd.c Wed Oct 8 10:27:57 2003 +++ b/drivers/input/keyboard/atkbd.c Wed Oct 8 10:27:57 2003 @@ -707,9 +707,17 @@ if (ints[0] > 0) atkbd_reset = ints[1]; return 1; } +static int __init atkbd_setup_softrepeat(char *str) +{ + int ints[4]; + str = get_options(str, ARRAY_SIZE(ints), ints); + if (ints[0] > 0) atkbd_softrepeat = ints[1]; + return 1; +} __setup("atkbd_set=", atkbd_setup_set); __setup("atkbd_reset", atkbd_setup_reset); +__setup("atkbd_softrepeat=", atkbd_setup_softrepeat); #endif int __init atkbd_init(void) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 2003-10-08 8:28 ` Vojtech Pavlik @ 2003-10-13 3:54 ` Andrew Morton 0 siblings, 0 replies; 5+ messages in thread From: Andrew Morton @ 2003-10-13 3:54 UTC (permalink / raw) To: Vojtech Pavlik; +Cc: thunder7, vojtech, linux-kernel Vojtech Pavlik <vojtech@suse.cz> wrote: > > +static int __init atkbd_setup_softrepeat(char *str) > +{ > + int ints[4]; > + str = get_options(str, ARRAY_SIZE(ints), ints); > + if (ints[0] > 0) atkbd_softrepeat = ints[1]; > + return 1; > +} > > __setup("atkbd_set=", atkbd_setup_set); > __setup("atkbd_reset", atkbd_setup_reset); > +__setup("atkbd_softrepeat=", atkbd_setup_softrepeat); Could we please try to keep Documentation/kernel-parameters.txt in sync with the code? Thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-13 3:51 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-10-07 20:33 keyboard repeat speed went nuts since 2.6.0-test5, even in 2.6.0-test6-mm4 Jurriaan 2003-10-07 20:40 ` Vojtech Pavlik 2003-10-08 8:23 ` Jurriaan 2003-10-08 8:28 ` Vojtech Pavlik 2003-10-13 3:54 ` Andrew Morton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox