steam-for-linux icon indicating copy to clipboard operation
steam-for-linux copied to clipboard

Steam doesn't hotplug uinput devices.

Open YellowOnion opened this issue 4 years ago • 3 comments

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:

  1. start steam
  2. use pyevdev to create a virtual xbox controller
  3. steam doesn't see it.

YellowOnion avatar Apr 10 '21 07:04 YellowOnion

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)

YellowOnion avatar Jul 18 '21 10:07 YellowOnion

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.

baracoder avatar Aug 08 '21 22:08 baracoder

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.

sbruder avatar Sep 07 '22 12:09 sbruder

Closing per the last comment.

kisak-valve avatar Oct 08 '22 17:10 kisak-valve