Linux/Wayland-Native - Multi mouse support
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
On Linux in a native Wayland session (simply running retroarch) with any input plugin (so udev or wayland), RetroArch does not seem able to support multiple mice - furthermore, trying to use any pointer device (whether it be absolute positioning lightgun or normal relative mouse) will not move the point of aim/aiming reticle in lightgun games.
To work around this, running RetroArch in XWayland is needed - in my case, using WAYLAND_DISPLAY="" retroarch forces RA to run in XWayland, and I can have access to a fully functioning udev input driver with multiple mice support.
Mouse Devices list under native Wayland (either udev or wayland input driver):
Mouse Devices list under XWayland with udev input driver:
In both examples, a Logitech G502 mouse and an OpenFIRE Lightgun are plugged into the PC, running under a user in the input group.
Expected behavior
At minimum, the ability to use a mouse device in lightgun games on a native Wayland RetroArch session; ideally, udev or wayland input driver should have feature parity with udev driver under X11 with the ability to address and use individual pointer devices for multiplayer.
Actual behavior
No mouse input is allowed in cores in either udev or wayland input drivers on native Wayland RetroArch.
Steps to reproduce the bug
- Input driver should be set to
udev - Run RetroArch in native a Wayland session (
retroarch) - Go to Settings->Input->RetroPad Binds->Port 1 Controls->Mouse Index
- Observe there only being a "Default" index, with all 15 other slots being "N/A"
- Launch a game in a core that supports Lightguns, e.g. MAME (Current)
- Observe how mouse button inputs are being recognized, and the cursor remains exactly in wherever the default position is regardless of mouse input.
- Exit, and relaunch RetroArch under XWayland (
WAYLAND_DISPLAY="" retroarch) - Repeat step 2
- Observe the Mouse Index being populated by multiple devices (if plugged in) with real names.
- Repeat step 4
- Observe how the in game aiming reticle is affected by input, depending on the mouse index setting.
Bisect Results
N/A (has this always been an issue?)
Version/Commit
- RetroArch: 1.19.1 13dbb31f
Environment information
- OS: Arch Linux
- DE: KDE Plasma 6.1.4
- WM: Kwin-wayland
- GPU: NVIDIA GeForce RTX 3060ti
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RetroArch's udev and wayland input-driver paths and the Settings → Input → RetroPad Binds → Port 1 Controls → Mouse Index behavior described here. Reproduce under native Wayland and XWayland, then verify that mouse devices are listed individually and that a selected device moves the aiming reticle in a lightgun-capable core such as MAME (Current).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100