Closed ahfornitani closed 1 year ago
Hi, first thanks for creating the detailed issue, this is absolutely the right place to ask and it always helps a lot to get feedback from users.
I think the output of lsof is fine, it looks similar for me (running X11), the processes listed there are reading from the device but probably do not have exclusive access which mouseless is trying to gain.
The reason mouseless existed, at least in the case where you posted the log, is that it could not execute the start command:
DEBU[0000] Executing start command: setxkbmap en
...
ERRO[0000] Execution of start command failed: exit status 5
The start command is specified in the config file, so you could try to simply remove it. What setxkbmap en
does is set the keyboard layout to en, but this is probably not necessary and also only works in X11 (I have it in my config because I want to switch to a different layout than the default one when mouseless starts. I should probably remove that from the config example, or at least document what that does :)
The reason that it says it could open the device (at least in the run from the logs) is that it seems like you gave 2 different devices for the same keyboard:
DEBU[0000] opening the keyboard device /dev/input/by-path/pci-0000:0a:00.3-usb-0:4:1.0-event-kbd
...
DEBU[0000] opening the keyboard device /dev/input/by-id/usb-413c_Dell_KB216_Wired_Keyboard-event-kbd
DEBU[0000] Failed to open /dev/input/by-id/usb-413c_Dell_KB216_Wired_Keyboard-event-kbd: device or resource busy
But it looks like it could successfully open the first one, and the second one fails because it cannot be grabbed twice. I am sure you also tried running with only one device and in these cases the start command was the problem.
So could you try it without a start command and report back if it works?
Btw, I have to admit I have not tried running mouseless in Wayland yet, but see no reason that it should not work (except when some other application is exclusively grabbing the device), and other applications that work similar to mouseless run in Wayland too. So it would also be nice if you can confirm that it works :)
Oh, that worked! Thanks! :)
The program does not crash anymore (exit status 5
).
However, these persist, even if I don't press anything else:
DEBU[0005] opening the keyboard device /dev/input/by-id/usb-413c_Dell_KB216_Wired_Keyboard-event-kbd
DEBU[0005] Failed to open /dev/input/by-id/usb-413c_Dell_KB216_Wired_Keyboard-event-kbd: device or resource busy
The beginning of my ~/.config/mouseless/config.yaml
is now:
devices:
# change this to a keyboard device
- "/dev/input/by-id/usb-413c_Dell_KB216_Wired_Keyboard-event-kbd"
# this is executed when mouseless starts
# startCommand: "setxkbmap en"
# the default speed for mouse movement
baseMouseSpeed: 750.0
# the default speed for scrolling
baseScrollSpeed: 20.0
layers:
# the first layer is active at start
- name: initial
bindings: # etc…
I've also recorded the steps I'm trying in this short video (35 s):
The --debug
output appears to be exactly the same under Wayland.
Seems to me that at this point it might be something related to my system? Could other keyboard settings (e.g., using fcitx
) get in the way? I had fcitx
active on my system until yesterday, then I thought it'd be interfering with mouseless
and removed it for the moment being — but there could be “leftovers”. Any ideas?
Thanks!
Sorry for the late response, after searching what program might grab device, I finally found the solution by looking at your recording again, where I saw in the logs that it tried to open two devices although you only specified one in the config file. I remembered that I was experimenting with auto detection of the devices, and it seems that I accidentally built the 0.1.1 release from that branch, so it tries to open all devices it can find.
But in this case the program should work nonetheless, since it looks like it could successfully open one device, and it also switches to the mouse layer when you pressed tab. While you are holding tab, the mouse bindings should be available (but you can also fix the layer by pressing space).
I updated the 0.1.1 release with a built from the right branch, so that should work now without any problems opening a device. I should really automate this, sorry for the inconvenience :)
I can confirm: it works now! :)
Tested on X11 and Wayland on KDE (Plasma 5.25.2
, kernel 5.18.10-arch1-1
)
I might open another GH issue regarding some differences in the way I used xmouseless
, which I wasn't able to replicate in mouseless
, but I'll try to adapt to the way things are now, instead. But for this current issue, I believe no other comment is needed, and it can be marked as “Closed”.
Thank you very much!
Great, feel free to open another issue, maybe there is a way to achieve what you want.
Hi! First of all, thanks for your new program! I've been using (and proselytizing about)
xmouseless
for a while now, and am very happy with it. :)At the same time, I've been wanting to switch to Wayland on KDE — since you announced on xmouless's issue list that you'd make a replacement that runs on Wayland, I've been enthusiastically waiting for it.
However, I wasn't able to run it. Apparently, my system blocks the device from being used:
ls /dev/input/by-id/*kbd* ; ls /dev/input/by-path/*kbd*
gives me:which is linked/mapped to
event3
(i.e./dev/input/event3
)Either
sudo lsof /dev/input/by-id/usb-413c_Dell_KB216_Wired_Keyboard-event-kbd
orsudo lsof /dev/input/event3
gives me something like:(the truncated commands should be
kwin_wayland
andsystemd-logind
, I think)If I had to guess — but I don't really know about any of this —EDIT: got the same problem on X11. So I've edited the issue title to not include "Wayland".kwin_wayland
would be the "culprit"?Here's the full output of
mouseless
with the--debug
flag:My
~/.config/mouseless/config.yaml
is the same as https://github.com/jbensmann/mouseless#configuration , except for the device line, of course:I tried switching between lines 3, 4 and 5 just in case, but the debug output is always the same:
Finally, I also tried running without root privileges, but the debug message is the same as with
sudo
. My user isaug
, so the file is/etc/udev/rules.d/99-aug.rules
, with only this as content:Please let me know if this is useful information, or the right place to send it. Thanks!