steam-for-linux
steam-for-linux copied to clipboard
Steam doesn't hotplug uinput devices.
Your system information
- Steam Runtime Version:
- Distribution : NixOS 21.05
- Link to your full system information (Help -> System Information) in a Gist: https://gist.github.com/YellowOnion/53fa0572ecf445f22bf3bd1ac39cce28
- Have you checked for system updates?: Yes
- Are you using the Steam Linux Runtime compatibility tool?: Not sure?
Please describe your issue in as much detail as possible:
I wrote a script to emulate an xbox controller
Steam doesn't detect the new device until I restart Steam.
Steps for reproducing this issue:
- start steam
- use pyevdev to create a virtual xbox controller
- steam doesn't see it.
udevadm log:
$ udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[520375.842949] add /devices/virtual/input/input30 (input)
KERNEL[520375.842968] add /devices/virtual/input/input30/event22 (input)
KERNEL[520375.842978] add /devices/virtual/input/input30/js1 (input)
UDEV [520375.843935] add /devices/virtual/input/input30 (input)
UDEV [520375.844898] add /devices/virtual/input/input30/js1 (input)
UDEV [520375.884209] add /devices/virtual/input/input30/event22 (input)
I have the same issue on NixOS. I have retested with the flatpak version on NixOS and it recognizes controllers no problem, so I think this is related to the native FHS environment.
This got resolved in NixOS by https://github.com/NixOS/nixpkgs/pull/189961.
For everyone not using NixOS, but still running steam inside a container environment, it can be fixed by setting the environment variable SDL_JOYSTICK_DISABLE_UDEV=1, which forces SDL to use inotify instead of udev (which is unreliable inside containers) for discovering joysticks.
Because this is not an error on Steam’s side, I think this issue can be closed, @kisak-valve .
This also applies to the related issue #7729.
Closing per the last comment.