Hi Michael,

2018-09-05 3:01 GMT+02:00 Michael Schmitz <schmitz...@gmail.com>:
>> on my Falcon i have the problem that under heavy load (like apt update)
>> moving the mouse often causes a key "hang" and repeat. Pressing
>> the space bar stops the repeating of the hanging key.
>
>
> Keyboard interrupts can be locked out for long enough for the driver to miss
> data. Apparently that does include crucial break codes.
>
> Do you see any 'keyboard overrun' messages in the console logs?
>
>> On an Atari, the mouse is connected to the keyboard, and produces
>> keyboard-like events. Moving a mousewheel is same as cursor up/down,
>> for example. I guess that the buffer overflows when CPU is occupied.
>>
>> If someone has an idea how to prevent that, i'd be thankful.
>> But then, its not a showstopping issue. A 100& used CPU will probably
>> just fail to fetch the IKBD buffer in time.
>
>
> The keyboard driver already tries to resynchronize the packet stream if it
> missed packets. Maybe we also need to synthesize a break code if the last
> key event sent to the input layer was a make code. Look at the state machine
> in arch/m68k/atari/atakeyb.c - line 163 says to skip this byte which is
> certainly necessary, but maybe additionally you want to check whether the
> previous keyboard state was KEYBOARD, and the break_flag was clear, and send
> out an input event for the previous scancode as key up event in that case .
> Need to keep track of the previous scancode though, and it won't protect you
> from key repeats when multiple keys were recorded as down at the time the
> overrun happens.
>

I tried to fix this key stuck effect in FreeMiNT's keyboard driver but
I failed :-/, in this link you have some information about my attempt:

https://github.com/freemint/freemint/issues/87

I'm a bit sceptic that this can be fixed in the keyboard driver, but
may be I'm wrong and I missed something. What it could be done is a
workaround in the drivers that are disabling the interrupts for a long
time, this workaround is a clever solution done in the drivers for the
Lightning VME an USB card for the TT, MiNT's NetUSBee driver copied
that workaround. It's all in the link above.

Reply via email to