* 2.6.9+ keyboard LED problem
@ 2005-01-05 17:04 Meelis Roos
2005-01-05 18:28 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Meelis Roos @ 2005-01-05 17:04 UTC (permalink / raw)
To: Linux Kernel list
The input changes in 2.6.9 made keyboard LED setting unreliable. 2.6.8
is OK, 2.6.9, 2.6.10 and todays BK are buggy.
The problem is that setting the LEDs now interferes with keyboard and
ps/2 mouse input and makes the kernel lose key press and key release
events.
Short demonstation:
#!/bin/sh
while :; do xset led 3; xset -led 3; sleep 0.01; done
This script works from X but the same effect can be seen on the console
using setleds. The problem was found with ledcontrol package but is
easyly reproduced with the script above.
Key press and release events are lost, mouse movement is lost or
movement is converted into clicks or mouse loses sync (by dmesg info).
There are also messages like
atkbd.c: Unknown key released (translated set 2, code 0xe0 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e060 <keycode>' to make it known.
in dmesg.
Don't try the script without the sleep command unless you have a network
connection to log in and kill the script ;)
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-05 17:04 2.6.9+ keyboard LED problem Meelis Roos
@ 2005-01-05 18:28 ` Dmitry Torokhov
2005-01-05 18:38 ` Meelis Roos
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2005-01-05 18:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Meelis Roos
On Wednesday 05 January 2005 12:04 pm, Meelis Roos wrote:
>
> The input changes in 2.6.9 made keyboard LED setting unreliable. 2.6.8
> is OK, 2.6.9, 2.6.10 and todays BK are buggy.
>
> The problem is that setting the LEDs now interferes with keyboard and
> ps/2 mouse input and makes the kernel lose key press and key release
> events.
>
> Short demonstation:
> #!/bin/sh
> while :; do xset led 3; xset -led 3; sleep 0.01; done
>
> This script works from X but the same effect can be seen on the console
> using setleds. The problem was found with ledcontrol package but is
> easyly reproduced with the script above.
>
> Key press and release events are lost, mouse movement is lost or
> movement is converted into clicks or mouse loses sync (by dmesg info).
> There are also messages like
> atkbd.c: Unknown key released (translated set 2, code 0xe0 on isa0060/serio0).
> atkbd.c: Use 'setkeycodes e060 <keycode>' to make it known.
> in dmesg.
>
> Don't try the script without the sleep command unless you have a network
> connection to log in and kill the script ;)
>
Seems to work fine here. The led is blinking rapidly but I can type just
fine and touchpad works as well.
What kind of box do you have? UP/SMP, Preempt?
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-05 18:28 ` Dmitry Torokhov
@ 2005-01-05 18:38 ` Meelis Roos
2005-01-05 18:54 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Meelis Roos @ 2005-01-05 18:38 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Linux Kernel list
> Seems to work fine here. The led is blinking rapidly but I can type just
> fine and touchpad works as well.
>
> What kind of box do you have? UP/SMP, Preempt?
UP, Celeron 900 on i815. Happens on 2 identical computers, one preempt,
one not preempt. PS/2 keyboard and mouse on one, only PS/2 keyboard on
the other (and USB mouse that is probably unimportant).
--
Meelis Roos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-05 18:38 ` Meelis Roos
@ 2005-01-05 18:54 ` Dmitry Torokhov
2005-01-06 0:12 ` Ville Hallik
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2005-01-05 18:54 UTC (permalink / raw)
To: Meelis Roos; +Cc: Linux Kernel list
On Wed, 5 Jan 2005 20:38:34 +0200 (EET), Meelis Roos <mroos@linux.ee> wrote:
> > Seems to work fine here. The led is blinking rapidly but I can type just
> > fine and touchpad works as well.
> >
> > What kind of box do you have? UP/SMP, Preempt?
>
> UP, Celeron 900 on i815. Happens on 2 identical computers, one preempt,
> one not preempt. PS/2 keyboard and mouse on one, only PS/2 keyboard on
> the other (and USB mouse that is probably unimportant).
>
The big input update went in with 2.6.9-rc2-bk4.Could you try booting
-bk3 and -bk4 to verify that those changes are to blame?
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-05 18:54 ` Dmitry Torokhov
@ 2005-01-06 0:12 ` Ville Hallik
2005-01-06 6:43 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Ville Hallik @ 2005-01-06 0:12 UTC (permalink / raw)
To: linux-kernel
In article <d120d50005010510543532e0bf@mail.gmail.com> you wrote:
> On Wed, 5 Jan 2005 20:38:34 +0200 (EET), Meelis Roos <mroos@linux.ee> wrote:
>> > Seems to work fine here. The led is blinking rapidly but I can type just
>> > fine and touchpad works as well.
>> >
>> > What kind of box do you have? UP/SMP, Preempt?
>>
>> UP, Celeron 900 on i815. Happens on 2 identical computers, one preempt,
>> one not preempt. PS/2 keyboard and mouse on one, only PS/2 keyboard on
>> the other (and USB mouse that is probably unimportant).
>>
> The big input update went in with 2.6.9-rc2-bk4.Could you try booting
> -bk3 and -bk4 to verify that those changes are to blame?
No, this bug appears with 2.6.9-rc2-bk3. I'm afraid that introduction of
atkbd_schedule_command() & related stuff into atkbd.c is to blame.
--
Ville Hallik
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-06 0:12 ` Ville Hallik
@ 2005-01-06 6:43 ` Dmitry Torokhov
2005-01-06 8:30 ` Meelis Roos
2005-01-06 14:50 ` Ville Hallik
0 siblings, 2 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2005-01-06 6:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Ville Hallik, Meelis Roos
On Wednesday 05 January 2005 07:12 pm, Ville Hallik wrote:
> In article <d120d50005010510543532e0bf@mail.gmail.com> you wrote:
> > On Wed, 5 Jan 2005 20:38:34 +0200 (EET), Meelis Roos <mroos@linux.ee> wrote:
> >> > Seems to work fine here. The led is blinking rapidly but I can type just
> >> > fine and touchpad works as well.
> >> >
> >> > What kind of box do you have? UP/SMP, Preempt?
> >>
> >> UP, Celeron 900 on i815. Happens on 2 identical computers, one preempt,
> >> one not preempt. PS/2 keyboard and mouse on one, only PS/2 keyboard on
> >> the other (and USB mouse that is probably unimportant).
> >>
>
> > The big input update went in with 2.6.9-rc2-bk4.Could you try booting
> > -bk3 and -bk4 to verify that those changes are to blame?
>
> No, this bug appears with 2.6.9-rc2-bk3. I'm afraid that introduction of
> atkbd_schedule_command() & related stuff into atkbd.c is to blame.
>
Actually it is ACK processing hardening that is very useful at setup stage
but is getting in our way once keyboard is initialized and commands are
intermixed with good data.
Could you please try the patch below? It is just a quick hack, just to prove
the idea. If it works for you I will prepare the proper fix later.
--
Dmitry
===== drivers/input/serio/libps2.c 1.2 vs edited =====
--- 1.2/drivers/input/serio/libps2.c 2004-10-20 03:13:08 -05:00
+++ edited/drivers/input/serio/libps2.c 2005-01-06 01:20:11 -05:00
@@ -250,7 +250,7 @@
}
/* Fall through */
default:
- return 1;
+ return 0;
}
if (!ps2dev->nak && ps2dev->cmdcnt)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-06 6:43 ` Dmitry Torokhov
@ 2005-01-06 8:30 ` Meelis Roos
2005-01-06 14:50 ` Ville Hallik
1 sibling, 0 replies; 8+ messages in thread
From: Meelis Roos @ 2005-01-06 8:30 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Linux Kernel list, Ville Hallik
> Could you please try the patch below? It is just a quick hack, just to prove
> the idea. If it works for you I will prepare the proper fix later.
Seems to cure it, cannot find any problems in 100+ keypresses.
--
Meelis Roos
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 2.6.9+ keyboard LED problem
2005-01-06 6:43 ` Dmitry Torokhov
2005-01-06 8:30 ` Meelis Roos
@ 2005-01-06 14:50 ` Ville Hallik
1 sibling, 0 replies; 8+ messages in thread
From: Ville Hallik @ 2005-01-06 14:50 UTC (permalink / raw)
To: linux-kernel
In article <200501060143.13428.dtor_core@ameritech.net> you wrote:
> Actually it is ACK processing hardening that is very useful at setup stage
> but is getting in our way once keyboard is initialized and commands are
> intermixed with good data.
> Could you please try the patch below? It is just a quick hack, just to prove
> the idea. If it works for you I will prepare the proper fix later.
> --
> Dmitry
> ===== drivers/input/serio/libps2.c 1.2 vs edited =====
> --- 1.2/drivers/input/serio/libps2.c 2004-10-20 03:13:08 -05:00
> +++ edited/drivers/input/serio/libps2.c 2005-01-06 01:20:11 -05:00
> @@ -250,7 +250,7 @@
> }
> /* Fall through */
> default:
> - return 1;
> + return 0;
> }
>
> if (!ps2dev->nak && ps2dev->cmdcnt)
This quick hack works for me too. Thanks!
However, it is still easy to make PS/2 keyboard and mouse completely
unusable with the following "sleepless" shell script (but it probably does
not qualify as DoS because access to PS/2 keyboard is limited to local user
only):
while : ; do xset led 3 ; xset -led 3 ; done
Even after killing this over network login, both keyboard and mouse are
still unresponsive for about 10..20 seconds. It was not that fatal with 2.6.8.
--
Ville Hallik
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-01-06 14:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-05 17:04 2.6.9+ keyboard LED problem Meelis Roos
2005-01-05 18:28 ` Dmitry Torokhov
2005-01-05 18:38 ` Meelis Roos
2005-01-05 18:54 ` Dmitry Torokhov
2005-01-06 0:12 ` Ville Hallik
2005-01-06 6:43 ` Dmitry Torokhov
2005-01-06 8:30 ` Meelis Roos
2005-01-06 14:50 ` Ville Hallik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).