On W*ndows I used DS4Wind*ws, and I have no issues with Steam, but how can I use it to play with RetoArch and Lutris?

Is DS4DRV the way?

  • notTheCat
    link
    fedilink
    English
    arrow-up
    15
    ·
    21 days ago

    I think you don’t need any special software, the linux kernel recognizes DS4 OOTB as a game controller, I tried it with Flycast (standalone, not libretro’s) and it was just plug and play

  • SmoochyPit@lemmy.ca
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    21 days ago

    My ds4 works out of the box— the touchpad even maps to the mouse cursor (I use libinput and Wayland).

    Ds4drv, if you use it, will override the default kernel driver I believe. Make sure it’s not emulating an Xbox 360 controller, unless you want that.

    ArchWiki also mentions that you need to disable hidraw in Wine. Maybe that’s related, if you have issues with Windows games?

  • mox@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    20 days ago

    AFAIK, RetroArch is just a front-end for the emulators that actually use the controller, so getting this to work depends on the emulator you’ll be using.

    I would expect any decent emulator on Linux to work with the standard Linux joystick and/or evdev APIs, which are supported by the Linux DualShock 4 driver. This driver is built in to the Linux kernel; nothing more should require installation. However:

    It’s possible that your distro might not load that driver automatically. To check, connect the DS4, power it up with the Playstation button (if its light isn’t already on), and run lsmod |grep -E 'hid_sony|hid_playstation' in a terminal. If it responds with some lines containing hid_sony or hid_playstation, then the driver is loaded.

    It’s possible that your distro might not have labeled the DS4 as a joystick device in udev, which isn’t strictly required, but some software expects to see. On the distros I’ve used, the easiest way to get this done is to install the steam-devices package. I think most desktop distros do it automatically these days, though.

    You don’t want DS4Windows. That’s Windows software. There is a program (not a driver) called ds4linux, which creates a virtual Xbox controller alongside the real DS4, similar to what Steam Input does when you use it. You shouldn’t need this for games/emulators that were written properly for Linux, but it’s there for cases when a developer took a shortcut and assumed Microsoft game hardware is standard on our non-Microsoft OS. Alternatively, I think you can use Steam Input when launching non-Steam games in Steam.

    There are various joystick test programs for linux, to give you an idea of whether the OS sees the controller. (This can be helpful when a game doesn’t appear to see it, to determine if it’s the game’s problem or a connection/driver problem.) KDE Plasma has one built in to the System Settings. There’s a also generic one called jstest-gtk, available with most desktop distros. There are probably more out there.

    Keep in mind that test programs like that don’t necessarily know which inputs map to which buttons/sticks on the controller. Don’t panic if they look mixed up in a test program; try it in a game first. If they’re still mixed up, look for a way to remap the inputs.

  • burgersc12@mander.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    21 days ago

    Don’t forget to configure the DS4 in retroarch, I think theres an option where it will map the controller automatically.

  • ITGuyLevi@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    21 days ago

    This totally isn’t what you’re asking for, but I absolutely love the 8bitdo adapter 2 thing (https://www.8bitdo.com/usb-wireless-adapter-2/) pair your DS4 controller to it and then just plug in the dongle. I haven’t found anything it doesn’t work on, but mainly I pop it between a pi3, pi400, and my LMDE desktop.

    So handy.