How Do I Get RetroArch to See Two Mouse Devices?

I’ve asked about this under Linux, but after 5 days, there are no responses, even after I asked if there was something confusing about my post that I should fix.

I am using RetroPie on a Raspberry Pi 3B+ and have a trackball and spinner connected via USB. Earlier I had those and a mouse connected. I found that no matter what I did, even after verifying everything worked, I cannot get RetroArch to see more than one mouse device.

When I had the mouse plugged in, it would see the mouse (at /dev/input/mouse1 - forgot what event node it was attached to). When I unplugged it and had just the trackball and spinner plugged in, it would see just the trackball and is totally unaware of the house.

My mouse is at /dev/input/mouse0 and /dev/input/event3. The spinner is at /dev/input/mouse1 and /dev/input/event6. If I set input_player1_mouse_index to 0, then when I try any games, I can use the trackball. If I set it to something else, then the trackball doesn’t work and neither does the spinner. I’ve tried setting the index to 0,1,3, and 6 - to cover the input and event nodes. No matter what, no games that use RetroArch ever see the spinner.

I have read about having two mouse devices on at once, but most of that seems to be about using 2 light guns at a time.

I don’t need to have the trackball and spinner both work in the same game at once, I just need one at a time.

How can I get RetroArch to see the spinner as well as seeing the trackball?

Usually no response means nobody has an answer for you, rather than there being something wrong with your question.

In this case, I think multiple mice go to different ports:

That is, I think each port can only have 1 mouse attached at a time.

Thanks! Each forum seems to be a bit differently and I know sometimes when I’m sorting through things, I can type up a mess, so I do like to find out if I was just confusing.

In RetroArch, the trackball is under Port 1 Binds and the spinner is under Port 2 Binds.

In one place I read that the mouse index should be set to the event index (/dev/input/eventX) but I find the mouse works when I point it to the mouse node (/dev/input/mouse0). So I have input_player1_mouse_index=0 in retroarch.cfg. I’ve changed that index to 1 and 6. (The spinner is on mouse1 and event6.) No luck.

Am I right in thinking that I should set the mouse index in Port 1 Binds to 0 (for the trackball) and set Port 2 binds to 1 (for the spinner)? And if that’s the case, is there something else I need to do to say, “The mouse is on Port 2?”

So, if you go to port 2 binds, what’s its mouse index set to? Can you manually swap them there in the menu?

On Port 2 Binds, the mouse is set to 1.

I can and have swapped them. I’ve tried 0, 1, 3, and 6 for the binds.

(Remember, 0 & 1 for /dev/input/mouseX, 3 & 6 for /dev/input/eventX.)

I’ve just realized that what I did NOT do is make sure that whatever I set for Port 1 was NOT duplicated in Port 2. I can try that. (Side note: The arcade machine is in a guest house, computer is in the house. So sometimes I can get there quickly with ssh, but other times, especially when it’s a cold night, I’m likely not to get to the guest house, which is about a 2 football field walk away, until the next day.)

1 Like

Finally got it working, as I posed this thread:


GOT IT!

And it makes no sense to me at all.

Again, here’s what I have:

/dev/input/mouse0: Trackball /dev/input/mouse1: Spinner

And that’s IT for /dev/input/mouseX. If X > 1, the device node just doesn’t exist.

Under events:

/dev/input/event3 = Trackball /dev/input/event6 = Spinner

When I tried cat /dev/input/eventX with event ≠ 3 or 6, I got no input at all from the trackball or spinner.

So when I was in Port 1 Binds, I’d set the Mouse Index to 0, 1, 3, & 6. I’ve seen documentation that says that it’s the event, not the mouse node that matters. But only 0 would work with the trackball. All other numbers would NOT work.

I had, previously, when I had a mouse hooked up (and, I think, when I was using the older version of RetroPie), tried running through 0-10 for Mouse Index in RGUI and got nothing. ONLY 0 would work, and only with the trackball.

But today I tried, almost by accident, using 2 for the Mouse Index and the spinner worked!

I don’t see why. I have mouse0 and mouse1. The only events that showed any input for the mouse devices were 3 & 6, and only when I tested them with cat /dev/input/eventX, and not with RetroArch at all.

I’m wondering if there could be a bug with the Mouse Index numbers in RetroArch. I would think the Mouse Index would be the same number as the mouse device node or the event node. Or that the index would not skip over a blank. (In this case, it skips 1 - go from 0 for trackball to 2 for spinner.)

So it works. If possible, I’d like to know why, but I’m just glad I got it working. There’s other alterations I want to make to my config, but I didn’t want them to get in the way of this issue, so I’ve waited to do them.

This also provides support for the answer to one of my questions: I used Port 1 for almost everything and Port 2 for the spinner, so that’s proof that the virtual pad for Player 1 can use devices from ports other than 1.

1 Like