-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu 18.04 output delay #1030
Comments
After investigation, it's a gnome-shell bug: for some reason, the keymap layout changes (generated when using Xtest to simulate a keyboard event and when a key on the real keyboard is pressed) result in gnome-shell doing something to the X server that delays all other events for a little while (and X server high cpu usage). This can be reproduce by using xdotool to simulate input and typing on the keyboard at the same time. This does not happen with other window managers (e.g. switching back to Unity). It's also harder for me to reproduce on my real machine (as opposed to with a Virtualvox VM install of Ubuntu Bionic), whether because the machine is faster or the gnome stack is more recent, I don't know. In any case, I don't see anything actionable on Plover' side. |
My configuration is a bit different. However, plover (commit 2943a97) is also showing lag in the input. I observed that upon fast typing I tried to use plover on wayland too, but it is not working there (issue #1050). Hence, combined with this issue the plover is having problem with keyboard input in Gnome WM on both mode ( |
I'm running XFCE4 (xubuntu 20.04), no Gnome in sight, and having the same problem. It's not just output that slows down. Video and anything else that's running tends to stutter, too. Running
while running Plover. There are two such events per chord, one at the time of the first keydown and another at the time of the last keyup. It seems related to this report:
I get the same kind of behavior without Plover if I try to type on two USB keyboards. Also, the Sidewinder X4 keyboard, which plugs in via USB and performs NKRO beyond the usual 6-key limitation exhibits the problem whenever I press more than 6 keys. However, now that I'm plugged in via PS/2 and using only one keyboard, I only see the MappingNotify events and the accompanying slowdown while Plover is running and enabled. Using the PLOVER:TOGGLE chord to enable Plover causes only one MappingNotify event to be emitted, when I release the chord and Plover enables. Using the same chord to disable Plover causes only one MappingNotify event, at keydown time. It seems like this might be a bug or a design flaw deep inside X somewhere, but it seems to have only appeared, in Ubuntu distributions at least, a few years ago. I'm at a loss for any kind of a workaround, beyond maybe running Plover on a completely different machine and using a tool like x2x to inject text into applications. |
I have a partial workaround. It seems that the troublesome MappingNotify events are only generated when there is inputs from different slave devices under the same master. If you use The drawback, of course, is that your keyboard is now associated with a new master pointer device, as indicated by the second mouse cursor that appeared when you did In practice, I use the other keyboard for Plover-bypass stuff. It generates MappingNotify events and lag when I switch, but at least it doesn't happen with every stroke. I don't know if any of this informs a workaround that can be incorporated into the X-specific oslayer stuff in Plover, but at least it might help a few people out of a jam if they run into the same problem. |
I was experiencing similar issues earlier, but I found that switching from X to Wayland has so far made the problem disappear for me. Plover is now outputting text for me in emacs as snappy as you please. I followed these instructions. |
For the workaround part, I guess it's possible to reattach all the keyboards to the new master device when Plover is enabled, then move them back when Plover is disabled. I don't think this should be the default however, it may have other issues. (my window manager crashes occasionally when I use the workaround, I think?) Also would be nice if it handles newly attached keyboards, although this one is a different issue. .note. I don't know how to reattach/create master from the API other than calling the subprocess. Need to read more documentation. Actually, making the keyboard floating would work too (that way it isn't even necessary to grab, although the turn-on PHROLG will mistakenly delete 6 characters) Correction: if the keyboard is already floating, Plover grab will fail.
So... need some Plover integration for this approach to work. |
I am also experiencing a significant delay that's noticeable even though I'm just learning and not writing faster than 16-18 WPM while practicing on Typey Type. I'm already faster than the output displayed, sometimes by four or five words. Pureos 10 |
Summary
Using keyboard protocol in Ubuntu 18.04 there is always a noticeable lag between releasing all keys and seeing output on the screen. The paper tape display is equally delayed. I had no such problem with Ubuntu 16.04, but as soon as I upgraded to 18.04 the delay was there. I'm not always fast enough to see this, but if I write continuously and quickly Plover doesn't output anything, not until I pause for a moment. Then everything I just wrote appears all at once.
Reproducing
Nothing special, just use keyboard protocol in Ubuntu 18.04.
Connected by a USB micro cable.
Plover Version
Plover 4.0.0.dev8+66.g685bd33
Plover 4.0.0.dev8+66.g685bd33
System
Linux, specifically Ubuntu 18.04,appImage, not installed. I click on the appImage on the desktop to start Plover.
The text was updated successfully, but these errors were encountered: