RetroArch on Ubuntu does not respond to input from Steam Link (Raspberry Pi)

Created on 12 Jan 2019  路  6Comments  路  Source: libretro/RetroArch

Description

RetroArch on Ubuntu is not responding to input coming from an Xbox 360 Wireless Controller via Steam Link on Raspberry Pi.

Expected behavior

Controller input should be recognized by RetroArch.

Actual behavior

RetroArch opens and detects a controller is connected. Buttons / directionals / joysticks are not being recognized by RetroArch.

Steps to reproduce the bug

  1. Configure Ubuntu
  2. Add user to group input
  3. Create udev rule with following contents: KERNEL=="event*", NAME="input/%k", MODE="666"
  4. Reboot
  5. Install Steam on Ubuntu 18.10
  6. Create a non-Steam game shortcut for RetroArch
  7. Games -> Add Non-Steam Game to My Library
  8. Select RetroArch
  9. Click Add Selected Programs
  10. Update Rasbperry Pi to latest Raspbian
  11. Install Steam Link app on Raspberry Pi
  12. Plug Xbox 360 Wireless Receiver into Raspberry Pi and sync controller
  13. Run Steam Link app on Raspberry Pi and connect it to Ubuntu
  14. Launch RetroArch from the Steam Library

RetroArch will launch. Yellow text on the bottom of the screen will display the text 100%: Xbox 360 Controller configured in port #0

Pressing any buttons / joysticks on the controller will not invoke any response in RetroArch.

Console prints the following lines related to detecting the controller:
[INFO] [udev]: Plugged pad: Microsoft X-Box 360 pad (10462:4607) on port #0.
[INFO] [udev]: Pad #0 (/dev/input/event16) supports 0 force feedback effects.
[INFO] [Autoconf]: 2 profiles found.
[INFO] [autoconf]: selected configuration: /home/ubuntu/.config/retroarch/autoconfig/Microsoft X-Box 360 pad.cfg
[INFO] [Joypad]: Found joypad driver: "udev".

Ubuntu detects the control once Steam Link is connected as follows:
I: Bus=0003 Vendor=28de Product=11ff Version=0001
N: Name="Microsoft X-Box 360 pad"
P: Phys=
S: Sysfs=/devices/virtual/input/input36
U: Uniq=
H: Handlers=event16 js0
B: PROP=0
B: EV=b
B: KEY=7cdb000000000000 0 0 0 0
B: ABS=3003f

Other steps I have taken:

  • Disable Steam Overlay
  • Disable controller Desktop Mode (to ensure the controller is only used as a gamepad)

Other Steam games are able to detect and make use of the control.

If I use Steam to launch RetroArch without the Raspberry Pi/Steam Link and have the controller plugged into the Ubuntu system, the controller works correctly, even in Big Picture mode.

Bisect Results

I do not know when this began.

Version/Commit

  • RetroArch 1.7.5 (Git ccec13e)

Environment information

  • OS: Ubuntu 18.10
  • Compiler: Build from ppa:libretro/testing
  • Raspberry Pi 3 running Rasbian
  • Steam Link App running on Raspberry Pi
steam link

Most helpful comment

I just found that the controller can work with the Steam Link, but only if I select sdl2 as the video driver. It seems that Steam is conditionally sending gamepad events based on the state it thinks it's in.

I tested this by having RetroArch already running on Ubuntu in the background with the remotejoy core loaded and allowing the interface to continue running when RetroArch has lost focus.

  • When the Steam Link connects to the Ubuntu system, RetroArch detects a controller is plugged in and displays a message.
  • While navigating through the Steam interface with the controller, RetroArch does not pick up any input.
  • I launched Bastion through Steam, which is a game that makes use of the controller.
  • Once Bastion was running, _RetroArch begin picking up and displaying controller events_ on the remotejoy core.

This shows that Steam is sending gamepad events on the condition that it thinks a game (as opposed to an application?) is running.

Out of curiosity, I changed the video driver from gl to sdl2 and launched RetroArch from the Steam Link. Input was passed successfully into RetroArch.

Something is happening with sdl2 that is not happening in gl that lets Steam know a game is running. I am unable to test Vulkan and xVideo drivers at this time.

Is this something that can be addressed on the RetroArch side?

All 6 comments

Does the controller work without steam link?

Yeah, if I plug the controller into the Ubuntu system and launch RetroArch from Steam, the controller works correctly.

I just found that the controller can work with the Steam Link, but only if I select sdl2 as the video driver. It seems that Steam is conditionally sending gamepad events based on the state it thinks it's in.

I tested this by having RetroArch already running on Ubuntu in the background with the remotejoy core loaded and allowing the interface to continue running when RetroArch has lost focus.

  • When the Steam Link connects to the Ubuntu system, RetroArch detects a controller is plugged in and displays a message.
  • While navigating through the Steam interface with the controller, RetroArch does not pick up any input.
  • I launched Bastion through Steam, which is a game that makes use of the controller.
  • Once Bastion was running, _RetroArch begin picking up and displaying controller events_ on the remotejoy core.

This shows that Steam is sending gamepad events on the condition that it thinks a game (as opposed to an application?) is running.

Out of curiosity, I changed the video driver from gl to sdl2 and launched RetroArch from the Steam Link. Input was passed successfully into RetroArch.

Something is happening with sdl2 that is not happening in gl that lets Steam know a game is running. I am unable to test Vulkan and xVideo drivers at this time.

Is this something that can be addressed on the RetroArch side?

Found a semi-workaround to get the controller working with GL...

  • Set the Desktop mode configuration in Steam to be a gamepad (rather than mouse/keyboard).
  • After launching RetroArch from the Steam Link, toggling Windowed/Fullscreen mode will get the controller detected and working.

Hey,
I meet the same issue using gamestream. I did one post here to explain my issue. I first thought it was related to gamestream system, but it looks like clearly now that it is related to retroarch project. I am happy to find there is already some folks investigating on this issue.

I will start do some extra search around content here to understand what is this problem real state.
The better would be that is is already solved. In case this is not, I will try to help in any way to solve this issue.
Here is my post on Nvidia forum related to this where I started my investigations.

Does someone have any more clue / information to share to think about a fix for this ? Low level code c/sdl/driver and such is not where I shine, but I really would like to help in any way to solve this issue. Is it really something related to some drivers ? is it related to window environment that does not handle things properly ?

For now, I don't really mind how to reproduce this bug in a development environment because the stack is quite complicated. I guess my best bet would be to compile retroarch and hot patch my emulation system (retrobat) for testing purposes.

The next step I think is to run my retrobat install through a steam process on the shield in case this is a viable workaround.

thank you for this project anyway !

Edit :

Well I tried what reaper mantis said about using steam as wrapper. It works just fine. This is enough as solution for me so it is ok for my usage.

The procedure I used for those interested and how to run a "clean" gamestream integration is described in my post on nvidia forums.

Thank you very much reaper for this sufficient working workaround !

Was this page helpful?
0 / 5 - 0 ratings