Bug 486292 - Screen switches off when gaming with a joypad
Summary: Screen switches off when gaming with a joypad
Status: RESOLVED DUPLICATE of bug 328987
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-29 11:54 UTC by Mike Lothian
Modified: 2024-06-03 02:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2024-04-29 11:54:57 UTC
The default idle settings for screen dimming and switching off kick in when gaming using a joypad (usb connected Switch controller) on steam

This is a regression from X11 Plasma5 but I'm not sure if this is an issue with Wayland only, 6.0 or plasma 6.1 git

Should steam/wine be doing something to inhibit this? Should powerdevil be ignoring the timeouts when running a full screen app? Or should powerdevil be monitoring the other input devices for button presses as well as keyboard and mouse?
Comment 1 Jakob Petsovits 2024-06-03 02:41:16 UTC
Duplicate of a long-running bug, I don't think this is even a regression, I think Plasma never handled this properly. Steam/Wine should ideally set an idle inhibitor. As a user one can do this by wrapping a command (either the game or Steam itself) with systemd-inhibit. You can also manually block suspend using the power management applet.

A proper solution unfortunately isn't as easy as inhibiting all fullscreen apps, because regular apps or websites can also go fullscreen and it wouldn't be right to auto-inhibit those without a clearer indication that those are games or media which need this. The root cause is that libinput doesn't handle game controllers like it handles touchpads, mice, keyboards and other input devices, so KWin does not register the controller as user activity and will eventually send an inactivity signal to PowerDevil.

I tried my hand on a daemon to monitor controller inputs, unfortunately this has side effects as the kernel will automatically disable mouse emulation once any process opens the controller input device explicitly. So that would be simply switching one annoying bug for another. According to the KWin guys, the proper solution would be to have KWin itself open the game controller input device, do its own mouse emulation if no other process uses the controller, and have controller input activity reset the inactivity timer.

*** This bug has been marked as a duplicate of bug 328987 ***