Projecteur: [BUG] No Interactions on Ubuntu 21.10
Description I installed projecteur-0.9.2_ubuntu-21.04-x86_64.deb, and updated my machine to 21.10. w/o Projecteur running I can move the mouse and use the next/back button. when I start projecteur, the highlight apperears when I press the button, but I cannot move it at all, also back/next shows no action. Happens both on wayland and x11.
Desktop/Linux Environment (please complete the following information):
-
Linux Distribution and Version: [e.g. Ubuntu 18.04] ubuntu 20.10
-
Desktop/Window Manager and Version [e.g. GNOME 3.28, KDE 5.4…]
-
gnome 40.4.0 on wayland or x11
-
Did you built Projecteur yourself?:
[y/n]no (If yes: Please run cmake for existing build directories, to ensure the generated version info is up to date) -
What is the output of
projecteur -f?: … Projecteur 0.9.2 -
git-branch: master
-
git-hash: 82d9cfac1082a5cf28debb79a7be732fabf4dfd4
-
compiler: GNU 10.2.1
-
qt-version: (build: 5.15.2, runtime: 5.15.2)
-
device-scan: (errors: 0, devices: 1 [readable: 1, writable: 1])
-
What is the output of
projecteur -d?: … Projecteur 0.9.2; device scan
- Found 1 supported devices. (1 readable, 1 writable)
+++ name: ‘SPOTLIGHT’ userName: ‘Logitech Spotlight (Bluetooth)’ vendorId: 046d productId: b503 phys: 64:6e:e0:5a:27:e1 busType: Bluetooth devices: /dev/input/event21, /dev/input/event20 readable: true writable: true
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 20 (8 by maintainers)
TL;DR; read Edit2!
I did some investigation and found out something interesting. I recorded the movement with
libinput record /dev/input/event## > file.ymland compared the records from the original with moving cursor and from the virtual device without a moving cursor.libinput replay file.ymldid what anyone would expect: when replaying the record of the original device, the cursor moves, replaying the virtual device doesn’t move.BUT: If you change the line in the record file of the virtual device at position
devices[0].codecs.1(EV_KEY) to the same value given in the record of the original device, the cursor moves when replaying. Yaaay! (i.e. [272…287] instead of [1…767]). To get rid of the upcoming warningdevice is missing recorded udev property, I tried [1…287] and it still works but without this kind of warning (I still get the warningunexpected property: LIBINPUT_DEVICE_GROUPbut I guess, this is a different topic)I don’t know if this helps figuring out what the actual problem is, but I hope it helps a little 😉
Oh, BTW: running fedora 37 workstation on gnome 43.2 with wayland and rpm-installation.
EDIT: I seems there is a problem with key-codes above 562 (0x232). I.e. changing
KEY_CNTtoKEY_ROTATE_LOCK_TOGGLEin https://github.com/jahnf/Projecteur/blob/323532fcd420f761b885e1a7c68161789aa73dc1/src/virtualdevice.cc#L76 should do the trick. I don’t know, if this has side-effects, it probably crashes key-combinations with keys above this keycode and the root of the problem is still unknown. I mean, whats the problem with keys likeKEY_BRIGHTNESS_MENU(649 / 0x289). It makes also no sense, that it “breaks” at this position. There are no keycodes defined between 562 / 0x232 and 575 / 0x23f. linux/input-event-codes.hEDIT2: I think I got it:
long story short: We will need two virtual devices, one for the virtual mouse and one for the keyboard. I don’t know, what the difference between
ID_INPUT_KEYandID_INPUT_KEYBOARDis, but this seems to be a valid combination “for historical reasons”. At least my cherry-keyboard has this combination and it works.EDIT3: Everything with key-ids between
BTN_MOUSE(272 / 0x110) andBTN_JOYSTICK - 1(287 / 0x11f) is considered a mouse, everything else is not. (udev-builtin-input_id.c#L185). This correlates with the keycodes of the original device.ID_INPUT_KEYis always set withID_INPUT_KEYBOARD(udev-builtin-input_id.c#L299-L308)EDIT4: Changing the keycodes to the mentioned above brings back the mouse-functionality but disables all keymappings (for obvious reasons). skipping them brings the mappings back to
libinput debug-eventsbut it still doesn’t work, althoughudevadmdoesn’t mentionID_MOUSE=1anymore.EDIT5: I tried the following code:
keyboard with anything else (current state: all true): (KMU, KM, KU)
only keyboard: (K)
mouse with or without upper_keys: (MU, M)
everything false or only upper_keys: (U, ø)
conclusion: mouse and keyboard must not be used in the same virtual device if the mouse-button and keymappings should work. upper_keys crash the keyboard. I didn’t check the spotlight functionality on all 8 combinations, it behaves different and there are probably some independent issues with wayland.
sorry for the late reply, tested it now on several occasions and so far the new branch is working great for me with gnome+wayland.
It is definitely related on how to
uinputand wayland on newer distribution releases. Sadly I do not have a quick fix or workaround at the moment. I need to see how other projects might solve this issue.Good to know, of course the nice feature of mapping custom inputs is disabled 😞 - so this is only kind of a workaround. Seems one issue is around the area of grabbing all the device input and feeding it (mapped) to a virtual uinput device. That definitely narrows down my issue tracking.
Ah thanks
projecteur --disable-uinputworks for me on wayland (with the normal circle pointer)!Yes. I had some older version of projecteur on 21.04, updated to 0.9.2 when I found that it doesn’t work anymore, but that did not help … 😃 Let be know if I can be of any assistance.