Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get controllers working in steam? #82

Open
crestfalln opened this issue Feb 16, 2022 · 5 comments
Open

How to get controllers working in steam? #82

crestfalln opened this issue Feb 16, 2022 · 5 comments

Comments

@crestfalln
Copy link

How do you get controllers working with steam using ego? Steam doesn't detect the dualshock 4 I am using.

@intgr
Copy link
Owner

intgr commented Feb 16, 2022

I will try some day and let you know. Feel free to ping me again if I forget to reply.

@crestfalln
Copy link
Author

I was able to find a workaround for this. The problem exists with udev not adding the ego user to the device file acl. This may be caused by how the udev rules(the ones that came with the steam package on archlinux) handle pts sessions.
For the workaround I made a new group, added the ego user to it, and changed the udev rules to use this group for the device file.

@bjornfor
Copy link

Here's a NixOS config snippet (for the PS5 controller):

  # Allow 'ego' to acccess gamepads/controllers, ref.
  # https://github.com/intgr/ego/issues/82 ("How to get controllers working in steam?")
  # Rules based on "60-steam-input.rules", where MODE= and TAG+= were replaced
  # with RUN+=.
  services.udev.extraRules = ''
    # PS5 DualSense controller over USB hidraw
    KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", RUN+="${pkgs.acl}/bin/setfacl -m u:ego:rw /dev/$name"

    # PS5 DualSense controller over bluetooth hidraw
    KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", RUN+="${pkgs.acl}/bin/setfacl -m u:ego:rw /dev/$name"
  '';

@ostoru
Copy link

ostoru commented Dec 22, 2024

I spend too much time trying to make sense of udev rules but they are too alien to me, basically i was trying a way to add only my controllers, in my case /dev/input/js1 and /dev/input/js2, but i gave up and gave the ego user blanket access to all input devices by adding it to the input group with sudo usermod -a -G input ego
is working now, but i seriously don't know how unsafe it might be.

@bjornfor
Copy link

@ostoru: If you want a "tighter" udev rule set you can find attributes(?) to put in your rules by running udevadm info -a /dev/input/js1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants