linuxraw: The linuxraw controller driver connects the mouse instead of the joypad in GNU/Linux virtual machines
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- desktop, operating-systems
Research direction
Start by reproducing the linuxraw behavior in the described Ubuntu MATE virtual machine with virt-manager, using jstest to compare the tablet and joypad devices. Trace the linuxraw controller driver’s device selection and configuration handling. Done means selecting the joypad remains effective and button mapping no longer uses "spice vdagent tablet".
Written by the indexing model from the issue text.
Description
Description
The linuxraw controller driver connects the mouse instead of the joypad in GNU/Linux virtual machines. The mouse device is known as "spice vdagent tablet" in QEMU.
This issue affects all joypads, not just the Nintendo Switch Pro Controller as described below. Also, note that Ubuntu MATE 24.04 does not support the Nintendo Switch Pro Controller with jstest, only the Sony DualSense is supported. Consequently, I am using Ubuntu 23.04 to avoid potential bottleneck issues. Both controllers can be configured using either sdl2 or udev in both Ubuntu MATE 23.03, and 24.04.
Expected behavior
linuxraw/Nintendo Switch Pro Controller.cfg
input_driver = "linuxraw"
input_device = "Nintendo Switch Pro Controller"
...
Actual behavior
** Issue 2: "spice vdagent tablet" is still used** despite that I previously selected "Nintendo Switch Pro Controller".
linuxraw/Nintendo Switch Pro Controller.cfg
input_driver = "linuxraw"
input_device = "spice vdagent tablet"
input_up_axis = "-5"
Steps to reproduce the bug
In GNU/Linux:
sudo apt-get install virt-manager- Install a Ubuntu MATE 23.04 virtual machine
In the Ubuntu MATE 23.04 virtual machine
- Virtual Machine -> Redirect USB device -> [Your controller]
- Test the mouse (spice vdagent tablet)
jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (spice vdagent tablet) has 2 axes (X, Y)
and 5 buttons (LeftBtn, RightBtn, MiddleBtn, SideBtn, ExtraBtn).
Testing ... (interrupt to exit)
Axes: 0: -1334 1: 10768 Buttons: 0:off 1:off 2:off 3:off 4:off ^C
- Test the game controller:
$ jstest /dev/input/js1
Driver version is 2.1.0.
Joystick (Nintendo Switch Pro Controller) has 6 axes (X, Y, Rx, Ry, Hat0X, Hat0Y)
and 14 buttons (BtnA, BtnB, BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 46 2: 0 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 46 2: -710 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 46 2: -710 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 46 2: -710 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7Axes: 0: 0 1: 46 2: -710 3: 0 4: 0 5: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off
In RetroArch:
- Open RetroArch.
- Change the Controller Directory (standard procedure).
- Navigate to
Settings -> Drivers -> Controller. - Select "linuxraw", and restart RetroArch
- Issue 1: Apparently "spice vdagent tablet" is primary connected:
- Navigate to: Settings -> Input -> RetroPad Binds -> Port 1 Controls -> Device Index
- Select "Nintendo Switch Pro Controller"
- Go back to "Port 1 Controls"
- Click on "Set All Control"
- RetroArch registers that I press the buttons, but do not assign them any values, except for DPAD-up.
Version/Commit
- RetroArch: 1.19.1 AppImage, 1.19.1 Flatpak
Additional details
- Operating System: Ubuntu MATE with virt-manager
- Virtual Machine Software: virt-manager with a Ubuntu MATE 23.0 virtual image.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
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.
More from libretro/RetroArch
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
feature request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in libretro/RetroArch
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100