swaywm / swayidle

Idle management daemon for Wayland
MIT License
550 stars 50 forks source link

Gamepad Use #122

Closed lennie420 closed 2 years ago

lennie420 commented 2 years ago

When using a controller in a game swayidle/swaylock will lock the screen etc as if the computer is inactive.

emersion commented 2 years ago

Yes, nothing we can really do here, the Wayland compositor isn't aware about the gamepads, games open these devices directly.

YellowOnion commented 5 months ago

@emersion does it matter if a game opens a joystick or not? activity from the input device should prevent the system going idle irrespective if the WM is sending the input events down stream to a client or the client directly opening the device, having to wrap games in systemd-inhibit is a PITA. I don't even know how to wrap steam remote play in it.

I'm not against sway saying "it's not our problem" but I'm worried that no solution will ever be provided if no one takes responsibility. it does seem like there's a sort of anti-pattern here, where by joysticks are still using the low-level input device, and if they can capture input in exclusive mod, then sway is screwed, but until the window manager provides a better input API for joysticks, they'll keep using these low-level interfaces. And users will still have to create ad-hoc workarounds or just lose a boss fight because there display decided to turn off in the worst possible moment.

kennylevinsen commented 5 months ago

You misunderstood - display servers do not interact with or have support for gamepads in part because of games chosing to do their own thing and open them directly.

All input devices handled by the display server interrupt idle, but gamepads are unfortunately not such devices and it's not clear if that will change. Discussion around that might make better sense in the wayland-protocols project.