flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
340 stars 69 forks source link

Borderlands 2 doesn't get input from Steam Controller #251

Open etam opened 6 years ago

etam commented 6 years ago

Game information Borderlands 2

Distribution name and version where applicable openSUSE Tumbleweed

Flatpak info Flatpak 1.0.0 gl-driver nvidia-390-87

Problem description I have proper udev rules installed and I have access to /dev/uinput. I tried with Slime Rancher and it gets input from Steam Controller. If I run Borderlands 2 it gets no input from Steam Controller.

Logs: controller.txt

Does this issue reproduce with native Steam Have not tested

etam commented 5 years ago

may be related: #255

etam commented 5 years ago

What I have checked:

  1. Recently uinput became a separate kernel module, that needs to be loaded. Without it the /dev/uinput device exists, but is unusable. Solution: modprobe uinput and create a file /etc/modules-load.d/uinput.conf with an uinput line, to load it automatically on every boot.

  2. With this small program https://www.kernel.org/doc/html/latest/input/uinput.html#keyboard-events and with running a shell inside flatpak sandbox flatpak run --command=bash com.valvesoftware.Steam I checked that there is no problem accessing uinput from within container.

etam commented 5 years ago
  1. lsusb uses /etc/udev/hwdb.bin file to get info about devices. It's made by udev. There's no udev in flatpak image.
  2. lsusb.py uses /app/share/usb.ids, but there's no such file either.

Maybe that's the reason, why steam games are not detecting controller?

nanonyme commented 5 years ago

udev itself cannot be inside Flatpak

etam commented 5 years ago

I just checked with strace, that borderlands executable is loading libudev (it finds libudev.so.0 in steam runtime) and probes available devices. Unfortunately it's not even trying to touch /dev/uinput.

Yes, I found numerous issues on flatpack about problems with udev and that it's not going to be simply integrated. Just wanted to share my findings.

valentindavid commented 5 years ago

Have you installed steam-devices? Eventually on non Debian distributions, just install those files manually: https://github.com/ValveSoftware/steam-devices

etam commented 5 years ago

I wrote in description:

I have proper udev rules installed and I have access to /dev/uinput.

nanonyme commented 5 years ago

Does this still persist?

laci200270 commented 5 years ago

Well, for Overcooked yes it persists for me Had to modprobe uinput to even show, but after that Overcooked can't detect the controller On native steam it worked fine