-
Notifications
You must be signed in to change notification settings - Fork 133
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
FATAL: Failed to grab keyboard #26
Comments
Can you run the latest commit and post the output?
…On Tue, Oct 13, 2020 at 1:07 AM Matheus Fillipe ***@***.***> wrote:
I am not sure what happened but I can't quite use warpd anymore :(
$ warpd -f
rescan_devices: detected keyboard: Power Button (6)
rescan_devices: detected keyboard: Video Bus (7)
rescan_devices: detected keyboard: Video Bus (8)
rescan_devices: detected keyboard: Power Button (9)
rescan_devices: detected keyboard: Sleep Button (10)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Keyboard (13)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (15)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard System Control (16)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (18)
rescan_devices: detected keyboard: Integrated Webcam: Integrated W (20)
rescan_devices: detected keyboard: Intel HID events (23)
rescan_devices: detected keyboard: Intel HID 5 button array (24)
rescan_devices: detected keyboard: Dell WMI hotkeys (25)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Consumer Control (27)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard Consumer Control (28)
rescan_devices: detected keyboard: Corsair Raptor HS40 (11)
rescan_devices: detected keyboard: AT Translated Set 2 keyboard (26)
main_loop: Waiting for activation key
main_loop: Processing activation key M-x.
input_grab_keyboard: Grabbing keyboard
FATAL: Failed to grab keyboard
I tried to bypass this on ~ line 340 of inputs.c by ignoring this error
just to see what would happen and of course that was a terrible idea :P :
main_loop: Waiting for activation key
main_loop: Processing activation key M-x.
input_grab_keyboard: Grabbing keyboard
input_grab_keyboard: Done
hint_mode: Entering main hint loop
input_ungrab_keyboard: Ungrabbing keyboard
input_ungrab_keyboard: Waiting for neutral keyboard state.
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 27
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 27
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
^CReceived termination signal, cleaning up...
input_ungrab_keyboard: Ungrabbing keyboard
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
My actual cursor then disappears and only returns if I kill warpd. (Which
I guess is expected). But warpd works, I can use any mode if that exit(-1)
is commented out of inputs.c but then it will fail to ungrab. That is on
65e8cd6
<65e8cd6>
.
I also tried 0dff1f0
<0dff1f0>,
which was working before and now I get on it:
$ warpd -f
rescan_devices: detected keyboard: Power Button (6)
rescan_devices: detected keyboard: Video Bus (7)
rescan_devices: detected keyboard: Video Bus (8)
rescan_devices: detected keyboard: Power Button (9)
rescan_devices: detected keyboard: Sleep Button (10)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Keyboard (13)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (15)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard System Control (16)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (18)
rescan_devices: detected keyboard: Integrated Webcam: Integrated W (20)
rescan_devices: detected keyboard: Intel HID events (23)
rescan_devices: detected keyboard: Intel HID 5 button array (24)
rescan_devices: detected keyboard: Dell WMI hotkeys (25)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Consumer Control (27)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard Consumer Control (28)
rescan_devices: detected keyboard: Corsair Raptor HS40 (11)
rescan_devices: detected keyboard: AT Translated Set 2 keyboard (26)
main: Built from commit: 0dff1f0
main: Waiting for activation key
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 33 (X_GrabKey)
Serial number of failed request: 514
Current serial number in output stream: 519
And that also happens on 08ed81a
<08ed81a>...
So something surelly changed on my system but I am not sure what....
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOP7GMPFW3U65DLSWREGA3SKPOBTANCNFSM4SOCLF4Q>
.
|
It looks like something else has grabbed the Xinput device. Unfortunately
there is nothing that can be done about this since warpd is predicated on
the assumption that most software will use standard X grabs. If turning off
KDE remappings solves the problem then it is likely KDE, although simple
mappings can be done using setxbmap without the need for Xinput so I would
be surprised if this was the case.
…On Tue, Oct 13, 2020 at 2:56 PM Matheus Fillipe ***@***.***> wrote:
I found the cause. I used to use xmodmap to remap my keys but recently
found that KDE had a built in way to do those remappings which surely
affects the way warp crashes:
[image: image]
<https://user-images.githubusercontent.com/24435787/95902919-db7d0f00-0d6b-11eb-8f24-5f3aae837b2a.png>
I am not sure of what kde is using to do remap the keyboard. Here is the
output on the latest commit with the option as the screenshot above:
$ warpd -f
rescan_devices: detected keyboard: Power Button (6)
rescan_devices: detected keyboard: Video Bus (7)
rescan_devices: detected keyboard: Video Bus (8)
rescan_devices: detected keyboard: Power Button (9)
rescan_devices: detected keyboard: Sleep Button (10)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Keyboard (13)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (15)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard System Control (16)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (18)
rescan_devices: detected keyboard: Integrated Webcam: Integrated W (20)
rescan_devices: detected keyboard: Intel HID events (23)
rescan_devices: detected keyboard: Intel HID 5 button array (24)
rescan_devices: detected keyboard: Dell WMI hotkeys (25)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Consumer Control (27)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard Consumer Control (28)
rescan_devices: detected keyboard: Corsair Raptor HS40 (11)
rescan_devices: detected keyboard: AT Translated Set 2 keyboard (26)
main_loop: Waiting for activation key
main_loop: Processing activation key M-z.
input_grab_keyboard: Grabbing keyboard
FATAL: Failed to grab keyboard AT Translated Set 2 keyboard: 1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOP7GJ3LX2KOCCCCGCWIS3SKSPELANCNFSM4SOCLF4Q>
.
|
I rebooted now and I have warpd on my kde's startup script. It works fine until I restart warpd, then I start having |
My guess would be that putting it in your start up script gives it a change
to grab the input devices before kde. Try disabling all input handling in
KDE. Do you have this problem with other desktop environments? It is likely
that KDEs input layer in mangling the xinput logic.
…On Tue, Oct 13, 2020 at 11:11 PM Matheus Fillipe ***@***.***> wrote:
I rebooted now and I have warpd on my kde's startup script. It works fine
until I restart warpd, then I start having FATAL: Failed to grab keyboard
AT Translated Set 2 keyboard: 1.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOP7GOJCAMKOG7DYAA2XADSKUJGNANCNFSM4SOCLF4Q>
.
|
The problem is that after exiting warpd and ungrabing the DE's mouse cursor doesn't appear again. If I unplug the mouse and plug it again, or kill warpd, it reappears. Is like if warpd is failing to ungrab? I believe I only have this problem in kde. I didn't have this problem on i3. Guess Ill have to disable kde's input handling, I'll test that later.
|
Can you clarify what you are doing to produce that log? Are you killing
warp manually? I added some code to show the cursor if you kill warp while
it is active in the latest commit (although you probably shouldn't be doing
this). See if that solves your problem.
…On Wed, Oct 14, 2020 at 4:34 PM Matheus Fillipe ***@***.***> wrote:
The problem is that after exiting warpd and ungrabing the DE's mouse
cursor doesn't appear again. If I unplug the mouse and plug it again, or
kill warpd, it reappears. Is like if warpd is failing to ungrab? I believe
I only have this problem in kde. I didn't have this problem on i3. Guess
Ill have to disable kde's input handling, I'll test that later.
$ warpd -f
rescan_devices: detected keyboard: Power Button (6)
rescan_devices: detected keyboard: Video Bus (7)
rescan_devices: detected keyboard: Video Bus (8)
rescan_devices: detected keyboard: Power Button (9)
rescan_devices: detected keyboard: Sleep Button (10)
rescan_devices: detected keyboard: Integrated Webcam: Integrated W (20)
rescan_devices: detected keyboard: Intel HID events (23)
rescan_devices: detected keyboard: Intel HID 5 button array (24)
rescan_devices: detected keyboard: Dell WMI hotkeys (25)
rescan_devices: detected keyboard: Corsair Raptor HS40 (28)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (15)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard System Control (16)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard Consumer Control (18)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (19)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Keyboard (11)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Consumer Control (13)
rescan_devices: detected keyboard: AT Translated Set 2 keyboard (26)
main_loop: Waiting for activation key
main_loop: Processing activation key M-z.
input_grab_keyboard: Grabbing keyboard
input_grab_keyboard: Done
input_ungrab_keyboard: Ungrabbing keyboard
input_ungrab_keyboard: Waiting for neutral keyboard state.
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 11
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 13
input_ungrab_keyboard: Done
input_ungrab_keyboard: Attempting to perform ungrab on all grabbed devices.
input_ungrab_keyboard: Ungrabbing 6
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 7
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 8
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 9
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 10
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 20
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 23
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 24
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 25
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 28
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 15
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 16
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 18
input_ungrab_keyboard: Done
input_ungrab_keyboard: Ungrabbing 19
input_ungrab_keyboard: Done
X Error of failed request: XI_BadDevice (invalid Device parameter)
Major opcode of failed request: 131 (XInputExtension)
Minor opcode of failed request: 48 ()
Device id in failed request: 0xb
Serial number of failed request: 1060
Current serial number in output stream: 1060
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOP7GPTYBY6DTGUBAQXM33SKYDMZANCNFSM4SOCLF4Q>
.
|
That last log was produced by launching warpd, pressing the hints mode keybind, then pressing Esc and then I don't have my "normal" cursor back. The behavior changes sometimes and warpd stops being able to grab my keyboard:
Do all devices really need to be grabbed? I did something like this on input.c to ignore the error:
Which I have no idea if would be right but at least it warpd shows and work then, but when exiting I still don't get my mouse cursor back unless if I kill it manually. Maybe is just something being held? I have to kill warpd with sigkill after I hit esc though. |
I'm not sure what branch you made those change to. You should see your
mouse cursor after closing warp however given the fact that you can't even
start it there is a high probability that KDE is interfering with the input
logic. Have you tried disabling all remapping in KDE? Your changes should
break the input logic, the issue doesn't have anything to do with the
specific input device grabbed.
…On Wed, Oct 14, 2020 at 9:26 PM Matheus Fillipe ***@***.***> wrote:
That last log was produced by launching warpd, pressing the hints mode
keybind, then pressing Esc and then I don't have my "normal" cursor back.
The behavior changes sometimes and warpd stops being able to grab my
keyboard:
$ warpd -f
Built from commit: def5435
rescan_devices: detected keyboard: Power Button (6)
rescan_devices: detected keyboard: Video Bus (7)
rescan_devices: detected keyboard: Video Bus (8)
rescan_devices: detected keyboard: Power Button (9)
rescan_devices: detected keyboard: Sleep Button (10)
rescan_devices: detected keyboard: Integrated Webcam: Integrated W (20)
rescan_devices: detected keyboard: Intel HID events (23)
rescan_devices: detected keyboard: Intel HID 5 button array (24)
rescan_devices: detected keyboard: Dell WMI hotkeys (25)
rescan_devices: detected keyboard: Corsair Raptor HS40 (28)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (15)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard System Control (16)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard Consumer Control (18)
rescan_devices: detected keyboard: BY Tech Usb Gaming Keyboard (19)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Keyboard (11)
rescan_devices: detected keyboard: USB OPTICAL MOUSE Consumer Control (13)
rescan_devices: detected keyboard: AT Translated Set 2 keyboard (26)
main_loop: Waiting for activation key
main_loop: Processing activation key M-x.
input_grab_keyboard: Grabbing keyboard
FATAL: Failed to grab keyboard AT Translated Set 2 keyboard: 1
Do all devices really need to be grabbed? I did something like this on
input.c to ignore the error:
void input_grab_keyboard(int wait_for_keyboard)
{
size_t i, not_grabbed_count=0;
XIEventMask mask;
dbg("Grabbing keyboard");
mask.deviceid = XIAllDevices;
mask.mask_len = XIMaskLen(XI_LASTEVENT);
mask.mask = calloc(mask.mask_len, sizeof(char));
XISetMask(mask.mask, XI_KeyPress);
XISetMask(mask.mask, XI_KeyRelease);
for (i = 0; i < nkbds; i++) {
int rc;
if((rc = XIGrabDevice(dpy, kbds[i],
DefaultRootWindow(dpy),
CurrentTime,
None,
GrabModeAsync,
GrabModeAsync,
False, &mask))) {
int n;
not_grabbed_count++;
XIDeviceInfo *info = XIQueryDevice(dpy, kbds[i], &n);
fprintf(stderr, "FATAL: Failed to grab keyboard %s: %d\n", info->name, rc);
}
}
if (not_grabbed_count==nkbds)
exit(-1);
XSync(dpy, False);
clear_keys();
grabbed = 1;
dbg("Done");
}
Which I have no idea if would be right but at least it warpd shows and
work then, but when exiting I still don't get my mouse cursor back unless
if I kill it manually. Maybe is just something it is just being held? I
have to kill warpd with sigkill after I hit esc like that though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOP7GMFZ57VGGUQPIVX5V3SKZFUNANCNFSM4SOCLF4Q>
.
|
I was able to fix it here and made a pull request to you can understand what solved it and see if that's possible and correct it. I don't know much C :P. Here: #27 I restarted warp many times and seems like that solved. I hope that's fine and won't create a regression to the Xorg crashing problem. If a device fails to be grabbed then we skip it and skip attempting to ungrab it too. It fixed for me, been testing since a while and restarted warpd without problems with the KDE remap also on. |
Silently failing is the wrong solution. Please confirm whether or not the problem disappears when you disable all input mapping in KDE. I have asked several times but it is still unclear whether or not turning that feature off causes the problem to disappear. |
Sorry. Doesn't seem to be related to the KDE's input remaping. I rebooted and was able to run def5435 just fine now... Another thing I am running is imwheel. Do you think it could be related? By the way weirdly now I am able to restart warpd and use (def5435) just fine...With all my input mess running (synergy+imwheel+kde remapping). I just tested having only one of them separately and turns out none are a problem now :P I'll report if this happens again and close if not, maybe was your last commit. |
The last two commits (def5435 and ae82680) made superficial changes which should not have changed anything. 65e8cd6 did indeeed introduce some stability related change to the input system but I'm assuming you were running from the tip of master when you posted your logs. I am not familiar with imwheel but a cursory grep through the source suggests it doesn't use xinput and should not be a problem. As discussed in #17 synergy does use xinput and should be considered mutually incompatible with warpd. In this particular instance it might be synergy, KDE or a combination of the two. Given that the problem spontaneously disappeared you may also have been running on an older commit. Without being able to consistently reproduce the issue it is difficult to isolate. The next time you have issues try disabling synergy. If it doesn't fix the problem then it is probably caused by the KDE input layer. I would recommend using setxkpmap to do remapping in your startup scripts anyway unless you need some feature only provided by KDE. |
I was going to post the problem happened again but finally figured out what is causing this it!! Haha might sound stupid now but I am using a usb keyboard attached to the laptop and I like to turn the laptop keyboard off sometimes and place the usb keyboard over it. I am using something like this this to disable it: This is causing warpd to loop forever on the upgrade, it keeps printing:
And even if I kill it the cursor doesn't get back and Xorg gets frost sometimes. I think warpd can work just fine with synergy (on the host machine) and KDE remapping. The problem is that it should detect disabled devices I believe? Maybe kinda like what my pull request does but instead of ignoring the error, skipping disable devices. |
You seem to do a lot of weird things with your input devices :P. I can't reproduce this, the rescan logic seems to be working fine. It is possible (likely) that synergy is interfering. Can you disable it and see if you can reproduce the problem? Also, please always include the full log output. If it is too large to fit in the commit include it as an attachment. Thanks |
Yeah. I disabled synergy. Look, if you might only be able to reproduce this if you have a laptop or two attached keyboards I guess. Run I did this test with synergy killed, is not it's fault, is because it is trying to grab a manually disabled device (and trying to ungrab it). |
I've already done exactly that without issue. warpd should not be trying to ungrab anything if you able to run |
I was finally able to reproduce it by scripting the xinput command to trigger while it is active. This was not clear in your original post. Please always include a list of steps to reproduce the issue. Sometimes minor details which may seem insignificant are key to reproduction, and it also helps you isolate the problem on your own system. I will look into this and release a patch soon. |
I believe this should be fixed in the latest commit. In general there are no guarantees of compatibility with programs that use xinput, so things like this are not officially supported. Synergy might work under certain conditions but it is entirely possible for either of the programs to introduce a breaking change at any point so please be aware of this moving forward. While It was possible to address this particular issue, there are certain things that will inevitably break. This is just a limitation of the X input system. other attempts at a keyboard driven mouse program appear to have run into some of the same problems I ran into while designing warp though warp is the only program I am aware of that circumvents them by abusing xinput (which is an ugly kludge). A byproduct of this approach is that while certain normally impossible things are made possible, other things will break. Really you should be glad warpd works at all :P. |
Fixed! Sorry for not making clear I was disabling a device after warpd was launched :P. |
I am not sure what happened but I can't quite use warpd anymore :(
I tried to bypass this on ~ line 340 of inputs.c by ignoring this error just to see what would happen and of course that was a terrible idea :P :
My actual cursor then disappears and only returns if I kill warpd. (Which I guess is expected). But warpd works, I can use any mode if that exit(-1) is commented out of inputs.c but then it will fail to ungrab. That is on 65e8cd6.
I also tried 0dff1f0, which was working before and now I get on it:
And that also happens on 08ed81a... So something surelly changed on my system but I am not sure what....
The text was updated successfully, but these errors were encountered: