yoyossef / ds360

xboxdrv wrapper to use a Dualsense as a Xbox 360 controller on Linux
38 stars 6 forks source link

[QUESTION] does this interfere with hid-playstation? #4

Open vide0hanz opened 2 years ago

vide0hanz commented 2 years ago

This is a great solution for pesky games which don't recognize the DualSense controller :)

This might be a silly question, so forgive my ignorance if so. While using ds360, does this override or interfere with the hid-playstation kernel module? As in, while active is input effictevly being handled via xboxdrv going forward or is it setup as a fallback? Many games already work as-is via the kernel driver. Does your program merely trick games which do not work into thinking there is an Xbox 360 gamepad connected at all times?

Basically I am wondering, if I set this up as a systemd service, whether or not hid-playstation is still going to be utilized in games which don't need this wrapper to function correctly with the controller.

yoyossef commented 2 years ago

Yeah honestly I don't believe it's the best idea to set it as a service, given it'll be treated as an Xbox 360 controller everywhere. I'd only use it for the relatively few non-steam games that don't work with it by launching the script.

If you find some conflicts while having hid-playstation loaded let me know.

vide0hanz commented 2 years ago

Yeah honestly I don't believe it's the best idea to set it as a service, given it'll be treated as an Xbox 360 controller everywhere.

That answers my question. Using it on an as-needed basis sounds ideal. I've been using it in my own scripts to launch games via wine/proton and just set it to kill the pid of ds360 when the script exits.

vide0hanz commented 2 years ago

Looking closer at this, despite killing the process for ds360 there still remains an active process for xboxdrv that I suspect should probably be killed as well, in addition to removing /dev/input/js2. Otherwise powering off the controller results in high CPU usage by this process.

tonibgd commented 2 years ago

@vide0hanz I always have ds360 service installed, but not enabled (so it doesn't start on boot). You can start the service as a pre launch script and stop it on post exit script.

systemctl start --user ds360.service systemctl stop --user ds360.service

There are a couple of games on Steam where I still need to use ds360. When I only play those games I install udev rules which start/stop the service automatically when I connect/disconnect the controller

vide0hanz commented 2 years ago

Seems like the ds360 PID gets destroyed if the process gets forked, for example setsid -f ds360.

This results in an xboxdrv process being created (as expected), but with no automatic way of killing it. This could interfere with other input devices. If nothing else, this results in every game being launched to display xbox button prompts even if there necessarily shouldn't be.

The systemd service sounds like a cumbersome workaround when we could just kill any child processes ds360 creates instead. What do you think @yoyossef ?