YARC-Official / YARG

YARG (a.k.a. Yet Another Rhythm Game) is a free, open-source, plastic guitar game that is still in development. It supports guitar (five fret), drums (plastic or e-kit), vocals, pro-guitar, and more!
https://yarg.in/
GNU Lesser General Public License v3.0
693 stars 151 forks source link

Controller disconnects as soon as it's plugged in #773

Open Kommynct opened 3 months ago

Kommynct commented 3 months ago

My controller isn't detected, if I unplug it and plug it back in, I get the notification that it's disconnected and connected at the same time.

image

It works in clone hero. I'm on archlinux using the aur package

NicKoehler commented 3 months ago

I'm on Arch Linux too, but the game is from the official AppImage launcher. I still have the same issue, but with another guitar.

image

EliteAsian123 commented 3 months ago

Did y'all follow the additional setup instructions needed for Linux in the readme?

NicKoehler commented 3 months ago

Yes.

If there is something I can do to debug this issue, I'm willing to help!

NicKoehler commented 3 months ago

Clone hero:

Yarg:

TheNathannator commented 3 months ago

Xbox stuff isn't reliably supported currently on Linux, there's some hacks going on to disable the native Unity controller support and that's the "instant disconnect" you're seeing. I tried to make sure Xbox controllers would make it through, but unfortunately that doesn't work on all distros.

Kommynct commented 3 months ago

Did y'all follow the additional setup instructions needed for Linux in the readme?

It wouldn't have worked in clone hero if I hadn't.

My controller isn't an xbox controller, i'd like an option to enable the native unity controller support because again, this works absolutely flawlessly in clone hero.

EliteAsian123 commented 3 months ago

As far as I know, Clone Hero uses Rewired and not the native Unity controller support, so unfortunately that wouldn't help with this problem.

TheNathannator commented 3 months ago

It wouldn't have worked in clone hero if I hadn't.

Yes it would have, CH doesn't use the same input system we use and has no dependencies on hidapi. We use the newer Unity input system and handle bindings more manually, while CH uses Rewired which is much more generic.

For now, if you want to re-enable the native Unity input support, uninstall hidapi, that'll make our custom backend not initialize. Just beware that it is not perfect, and will likely miss certain controls. The custom HID backend exists to fix these issues, there just isn't an equivalent for evdev devices on Linux yet.

NicKoehler commented 3 months ago

hidapi is required for a lot of other packages on my system. I tried to remove it temporarily to see if my guitar would be detected, but as you said, certain controls do not work, like the red button and the strums.

AlenaEK commented 1 month ago

I had this problem too. My solution was to just install the game on Windows instead lol.