I am new to Steam and linux gaming and want to get a better understanding on how steam uses game controllers. I can see my physical controller under /dev/input/js0 and a second device under /dev/input/event*. Once I start the steam client I see new devices being created under js1 and a new event*. I assume these new devices are being used as a virtual controller and allow all the fancy remapping of keys via steam input.

Are most steam users using the virtual controller to navigate big picture mode and play games?

I would love to hear the technical details on how this all works between games and big picture mode.

  • Crafty_Future4829OPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I very much appreciate your response and the technical details you provided. You definitely must understand how all this works. I am trying to run Steam in an Lxc container using Lxd and everything seems to work fine except controller support.

    The Steam interface shows the PS4 controller and for the most part seems to work in Big Picture except for when I try to use the virtual keyboard to search content. The controller is not being recognized by games although if I unplug the controller and replug I can get some controller support.

    Through my testing I know the the Steam client must create the virtual device which is listed under /dev/input/js1 and also see a virtual event under /dev/input/event17. Both these tie back to the host device listed when I do a cat under /proc/bus/usb/devices. I can see the xpad device.

    The container must be missing something. I am passing the unix-char device uinput and the physical controller under js0 and event* to the container. I and am also passing the hidraw0, hidraw1 and hidraw2 devices as well. There must be a solution as controller support works in the steam snap and flatpak versions.

    Any thoughts on what access or permissions the container must be missing?

    Do you think Steam is using evdev Interface?

    Any thoughts on how to troubleshoot?

    I

    • Qweedo420B
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      One thing you could do to check if your system is registering those inputs is with evtest, run it in your terminal and check if the DS4 controller is emitting events correctly, then check if the virtual controller created by Steam also emits those inputs

      • Crafty_Future4829OPB
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        In the container, I see the following devices under dev/input for the ps4 contoller: jso, event2, event3 and event4. I ran jstest on js0 and that seemed fine. Does Steam even use that device?

        Also, ran evtest on event4 which seemed to be the actual controller. There was a lot of scrolling on the screen, but the button presses appear to be working.

        I did not see js1 or event17 which appeared on my host when I ran Steam directly on the host.

        The container is not able to create the virtual devices which is probably my issue.

        Do you think Steam uses evdev api to create the virtual event device?

        Would Steam use a different api to create the js1 virtual controller?

        I am going look at the info you provided earlier and see if I can manually create the virtual devices in the container.

        Any suggestions on manually creating the virtual devices?

        Thanks for all the help!