-
Notifications
You must be signed in to change notification settings - Fork 12
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
persist=reopen
does not prevent evsieve from exiting
#39
Comments
Sorry for the late reply, it appears that emails from Github are not arriving in my inbox anymore for some reason. I'm going to figure out why this is happening. That said, you are using the I can't reproduce the issue at my computer; when I run the script, evsieve does properly re-open the closed devices even if I disconnect both the keyboard and the mouse, even if I close both of them at the same time by disconnecting the USB hub that both are attached to. Does evsieve provide either of the following messages when it quits? If so, which of these two does it provide? Or does it quit with another message or no message at all?
Does evsieve print anything else? When a device disconnects, it should print a message like
If it prints more than that, then the rest are probably error messages. Could you please post the full output that evsieve writes to the terminal? Does disconnecting your keyboard happen to close the terminal or trigger some kind of logout event? Evsieve does quit when it receives a SIGHUP signal, which is usually sent when the terminal it is running in closes. If evsieve does not print a message when quitting, could you try to recompile evsieve from the current main branch (commit 8bcd4b8) and try it with that version? I added a few extra prints to the paths that would in 1.4.0 cause evsieve to quit without message (in particular, it now tells you when it receives a signal.) |
Sorry for the long silence, got catched in too many duties to test.
In the meantime I more thoroughly tested 1.4.0 that comes with my distro. |
Tested with the git tip. Experiencing the same. When I detach the tablet from the keyboard and reattach it, evsieve is not doing its job anymore... How to debug? |
The recommended way to daemonize evsieve is by running it as a systemd service, which can be done either by writing a systemd unit file or by wrapping the evsieve command in
Hmm... The first possible culprit that comes to mind is a possible error in how evsieve waits for devices to become available again. It currently relies on Linux' I don't think this is the cleanest way to do this; it's not the intended way to listen for new devices and requires a lot of almost-redundant checks to avoid race conditions, but I haven't been able to find any case wherein this approach failed so far. The "proper" of doing it would be to rely on udev events, but that would require linking to an OS-specific udev library, complicating the build process and making evsieve more OS-dependent. Anyway, I pushed a new commit to the master branch to help with debugging. Can you obtain a copy of the newest version of the main branch (commit cea39d9) and then recompile evsieve with the debug-persistence feature enabled?
With this feature enabled, two things should happen: first, it will try to reopen the devices every five seconds even if inotify doesn't inform us of any updates, and second it prints additional information to stdout while reopening devices to help with debugging. Could you try running the latest version of the main branch with the debug-persistence feature, and then post what evsieve prints to stdout? (And even if this periodic check fixes the issue, could you please post the output anyway?) |
Could not run the latest branch yet. However, I have still made an interesting quick discovery. If I invoke evsieve passing the device as |
Interesting:
At this point evsieve is not remapping... |
Based on the posted output, I think that two things are happening:
I am still mystified on the question why inotify isn't informing us of the new input device, and especially why removing a watch from the inotify is failing. I'm going to have to dig into this deeper. I think it would be faster if I could replicate this issue myself. Could you tell me:
|
Hi, trying to use evsieve with a 2-in-one tablet/laptop with a detachable keyboard/touchpad combo. On this machine evsieve is needed when the keybord is attached because the keyboard/touchpad controller incorrectly maps mouse gestures to windows key sequences in a way that makes the machine unpleasant to use in linux.
I have come down with the following script:
However, when I detach the keyboard evsieve exits notwithstanding the
persist=reopen
. Am I using the option wrong? Is it because all the devices disappear?The text was updated successfully, but these errors were encountered: