mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[GH-ISSUE #365] 16 virtual joypads are getting spawned for a one real #247
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#247
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @superpositionedpixel on GitHub (Mar 5, 2026).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/365
To begin with: the package itself is amazing and it works really good!
And the problem is the following: I have a one physically attached gamepad which is a DS4, and it's displayed as
/dev/input/js0in the host system.But when I connect to the Wolf container using a Moonlight, the container logs are getting filled with a
That wouldn't be much a problem, but... Every "virtual" joypad gets an input from the real one: that's where problems begin :)
I'm using a Wolf+Moonlight to play a game which has local co-op, not the online one. We connect to the same session from two different devices, I'm from the LAN and other person from the Internet in order to play
I've tried to look for a related problems both in a Moonlight's repo and Wolf's repo, but didn't find anything similar.
Gamepad is connected over a bluetooth, wired (USB) connection leads to the same behaviour.
The thing with the udev rules doesn't change this at all from what I'm seeing.
The only thing that helps to actually play is the following:
#1gamepad always connected" in the Moonlight's settings#1gamepad" check from the settingsOS and kernel is
Also I've tried both a
moonlight-qtpackage and the flatpak-ed one, both of them behave the same way.I'm really looking forward to even nearly get to what's causing this actually.
Thanks for help in advance!
@aritanah commented on GitHub (Mar 6, 2026):
Hello, I was having this exact same problem and I find it funny that I’ve never seen anyone talking about it before. It becomes very problematic when you want to play while using the host PC.
The only thing that works for me was launching Moonlight with the following variable:
Where
0x054c/0x0ce6is the ID of the virtual DS4 controller created by Moonlight and0x045e/0x02eais the ID of the virtual XBOX controller. This prevents it from creating duplicate devices, but for some reason Moonlight will still detect the device connected via USB and will only create a single virtual device.This works perfectly if you also replace the default joystick mapping in the specific Wolf session inside the TOML file with XBOX like this:
I did this for all paired clients because, for some reason, several games were not working correctly with the default mapping of my DS4.
I should also mention that I’m using Moonlight in the latest AppImage version, so to automate the process I created this shortcut for it:
I know this is more of a workaround, but it would be great if this could eventually be fixed.
@Skerga commented on GitHub (Mar 6, 2026):
This is known and happens afaik if the udev rules aren't set up correctly, leading to the controller being passed to the host system. witch spawns a new virtual controller, which is passed to the host etc.
See here for udev rules:
https://games-on-whales.github.io/wolf/stable/user/quickstart.html#_virtual_devices_support
@aritanah commented on GitHub (Mar 6, 2026):
I had already set those udev rules, but just to be sure I checked them again. However, I still need to run Moonlight with the variable
SDL_GAMECONTROLLER_IGNORE_DEVICES=0x054c/0x0ce6,0x045e/0x02eato prevent Moonlight from creating duplicate devices. For some reason, those rules don’t seem to work for me.I’m not sure how much this matters either, but here is the output of the
groupscommand:Just for reference, here are my OS and kernel:
@superpositionedpixel commented on GitHub (Mar 7, 2026):
Wow!
That has actually solved the issue, thanks a lot!
It does make sense since the Moonlight attaches these virtual gamepads again and again to the session. I hadn't even thought that it could be possible. Looks like these virtual controllers getting passed to the host for real
Sadly, as I already mentioned, nothing is changed by adding or not adding these udev rules from the docs: local gamepad worked both with and without them along with this issue persisted in both ways. Only this env variable solved the issue
I dunno if I should close this. @aritanah provided a great workaroung-like solution, but there could also be more elegant udev-like or some other description/solution which prevents this container-to-host "leak" in general
Anyway, thank you two a lot again!
@clsty commented on GitHub (Apr 29, 2026):
The document for udev rules has been updated in
github.com/games-on-whales/wolf@eb46742182, which means the correct udev rules should be:github.com/games-on-whales/wolf@eb46742182/docs/modules/user/pages/quickstart.adoc (L722-L733)Please try this if you'd like to. @superpositionedpixel @aritanah
The story is that, I've just switched from Debian 13 to NixOS and I tried the quickstart script by JBailes to generate a Nix file which gives me the udev rules from older document. After that I tried the latest Gamepad-UI container to find there're 12 gamepads indicated by the top bar (when I restarted it becomes 16, so maybe the number is somehow random).
And when I use the udev rules from the latest document, the number of gamepads becomes 1 as normal.
@HashimHS I guess that's also the cause for your gamepad counted as 2 when enabling SDL support for Gamepad-UI container. In that case, writing the correct udev rules in
/etc/udev/rules.d/85-wolf-virtual-inputs.rulesand then runningsudo udevadm control --reload-rules && sudo udevadm triggerand then restarting Wolf should fix the problem.@HashimHS commented on GitHub (Apr 29, 2026):
@clsty this could explain the issue, thanks! I will try out this solution.