-
Notifications
You must be signed in to change notification settings - Fork 115
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
Performance issue: #109
Comments
It's slow for me too on Ubuntu 18.04 with Gnome. |
Yes. But after a few weeks, I've now gotten used to it. :)
…On Wed, Mar 27, 2019, 9:42 PM loota ***@***.***> wrote:
It's slow for me too on Ubuntu 18.04 with Gnome.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#109 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AVzDPya18eA7yOB5sPJZNVcFzQezfQXKks5va5iCgaJpZM4Zkl2r>
.
|
It's excellent that you can live with it! But in the hopes that someone will make it faster, I'll put down my adventures. tldr no workaround yet:
LogsThere are warnings to be found with journalctl when the delay happens. The warnings appear after the delay: Mutter
XTestFakeKeyEvent
xcape is a bit challenging to hack for people like me with little X experience since it often hangs the whole X if you make mistakes in the code because it can start intercepting the intercepted presses and forkbomb itself skyhigh. |
I also tested xcape with Xubuntu 18.04 Live DVD in Virtualbox and it worked like a charm. Looks like Gnome 3 is the one common denominator here. Also, my Ubuntu 18.04 tests have been in virtual machine, but the Debian KDE test was not a virtual machine. Fedora has already Wayland so xcape won't probably work there at all. |
The delay feels like something that comes with running an empty for loop, or buffering the text. I do not know what logs to refer to, though. |
This was a lie: "I tested a few hard coded XTestFakeKeyEvent-calls before the event loop at the start of the program and there was no delay there". My apologies. The program took a long time to start and my inexperience with c caused me to use printf-statements without newlines, which were not flushed immediately, and this confused me. There is definitely a delay and xorg goes to 40% when running a minimal program, which does not happen on Xubuntu:
Even more curious is that the above program does not produce the hangover effect, that is, when you press a key after the program terminates and there's the delay of a second before the press happens and Xorg goes to 40% cpu. This program does do that:
A possible workaround could be to compile the program as C++ |
Compiling as C++ (and the required casting of a few mallocs and callocs) did not help. The computer said a definite no. I found out the difference between the above code examples: the latter one was ran immediately after compiling with shell operator &&. The previous program will also produce the hangover effect if it is run similarly, and neither program will produce the hangover effect if ran in a separate command. Compiling xcape in a separate command did not work around the delay. |
I tested with Linux Mint 19 with Cinnamon with xcape from apt and there was no problem. I installed xubuntu-desktop to my Ubuntu virtual machine, and when using a Xubuntu session xcape works ok. |
Same behavior on Fedora/GNOME. Caps lock key as single-press == escape (and holding == ctrl) is too slow to be useful. It's especially noticeable in Vim when leaving insert mode and making other keystrokes too fast immediately after. I'm interested in helping diagnose this. |
I've got |
Having the exact issues as described by @loota . It's slow to generate the escape when I hit ctrl, and then the first keystroke after is also delayed. Any solution/fix for this? |
@loota can you post the changed code/makefile to make it work with c++ if you still have it handy? |
|
@quicknir Sorry, I don't have the C++ code anymore. And it didn't make it work any better anyway. |
As stated previously by Loota, this seems to be a somewhat well known issue with Mutter/Gnome 3. It seems like multiple utilities are affected by this. Here are a couple of links that describe a possible workaround (can be time consuming to pull off, as you'll need to manually recompile Mutter, and could introduce some new glitches). And here is the corresponding Ubuntu Launchpad issue: I will admit I haven't tried it (I have a weird setup which makes pulling up Wayland dependencies that Mutter needs a chore), but I have a good degree of confidence it would help. Alternatively, you can just switch to another window manager such as Xfce. I can confirm that using Xfce fully eliminates the freeze. |
IDK if this is related but I get substantial pausing when using Xcape under XFCE too actually. It will take a tremendous amount of time to process the second mapped key usage, then unfortunately that causes all my other keyboard shortcuts to "stop" working as well. What is actually happening is some kind of queuing. I don't know what to do debug this issue. But it essentially means not using Xcape, which is a huge hit. This was never an issue until the last few months. I'm on ArchLinux under Linux 5.18.10-zen1-1-zen, XFCE4 4.16, Xorg 21.1.4 |
Hi have you be able to fixed this yet? This is exactly what i'm facing right now.... |
@letsgologan Seems like this project is abandoned. A nice alternative is keyd |
Oh thank you, i will give it a try. |
Any one find xcape to be slow on Ubuntu 18.04? I'm using gnome3.
I have a script which sets my Spacebar to generate Ctrl when pressed down, and Space when pressed and released, and some other keys too.
xcape·-e·'Control_L=Escape;Shift_L=BackSpace;Shift_R=BackSpace;Hyper_L=space'·-t·100
But when I type fast, the space event is generated after a slight delay, which causes the text to appear after a certain delay. I want to clarify that again: When typing fast, a 'Space' is still generated, not a Control. However, if a certain shortcut could be typed as in "this is a sentence", the space between is and a is made a 'Ctrl' event and all text is selected. This generation of 'Ctrl' event is expected, but not the delayed text.
There is a question by another person on AskUbuntu about this. But there it ends unresolved, and that's it.
How to find out more about this?
Decreasing the time out does not help much.
Am I missing any necessary packages? Is this deprecated in Ubuntu 18.04?
This may be related to Issue #95: Delay prints character too late. But I remember having better feedback from xcape on Ubuntu 14.04, that is, before upgrading. Or is this the predicted behaviour?
The text was updated successfully, but these errors were encountered: