Bug 225341 - System locks up due to atkbd_timeout kludge when using /dev/atkbd0 directly
Summary: System locks up due to atkbd_timeout kludge when using /dev/atkbd0 directly
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-20 18:16 UTC by Jan Kokemüller
Modified: 2018-01-20 18:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kokemüller 2018-01-20 18:16:43 UTC
There is a timer in atkbd that is called 10 times per second. It seems to be a kludge that is used to unwedge keyboard interrupts [1].

Unfortunately, if I keep this in, my system locks up after a brief period of usage. I don't really know how to debug this -- the system just hangs.

One important bit of information: I don't use the atkbd device in its default configuration behind the kbdmux0 device. Instead, I detach it from kbdmux0, open it directly and parse the keyboard data in userspace [2]. I feed the data into an Evdev device and a vkbd(4) device for use in vt(4).

In the default configuration (atkbd0 attached to kbdmux0) the issue is masked.

I haven't noticed any negative effects by disabling the atkbd_timeout timer. I'm using a Lenovo Thinkpad T420.

I suspect it has to do with locking issues. There have been some attempts to improve locking in atkbd and psm [3] but it turned out that this locking approach could not be used [4].


[1]: https://svnweb.freebsd.org/base/head/sys/dev/atkbdc/atkbd.c?revision=326255&view=markup#l161
[2]: https://github.com/jiixyj/evdevfbsd/blob/e64ae7da580c9ccede482b380440d7b4636b4943/backend-atkbd.c#L108
[3]: https://lists.freebsd.org/pipermail/freebsd-arch/2017-May/018193.html
[4]: https://reviews.freebsd.org/D10263#221930