Wondering if anyone has a workaround to treat controller inputs as something that will keep the computer awake. I like to have my power settings set to timeout the screen after a short period of inactivity due to having an OLED laptop screen (minimize burn in). Problem is if I’m playing a game with a controller, it doesn’t detect that as being “active” and times the screen out. Right now I just go and change the power settings every time I want to play a game with a controller, but it’d be nice if there is a proper way to recognize controller inputs as well, inputs.

From some preliminary searching it seems the problem is they likely don’t present as HID devices on Linux despite doing so on w1ndows. I couldn’t find a solution to that; my instincts say that would need to be fixed at the driver level but its above my pay grade.

Thanks for any tips!

OS: Nobara (Fedora) 38

Controllers tested: Xbox series X|S (wireless and wired), Gulikit King Kong 2 Pro (wireless and wired), Logitech F310 (wired)

Drivers: XOne/Xpadneo installed through Nobara welcome screen

  • @entropicdrift
    link
    English
    6
    edit-2
    4 months ago

    You could try systemd-inhibit as a prefix to any game launch command, much in the same way as gamemoderun is used.

    Sidebar: this could be considered an example of the XY Problem. You should consider editing the title since the problem you’re really hoping to solve is your laptop going to sleep while you play a game.

    • mox
      link
      English
      3
      edit-2
      4 months ago

      While the XY problem sort of applies to this post, I think labeling it as such might be a little too dismissive, since this is one of those rare cases where OP has correctly identified the root cause of the observed issue.

      (Easier workarounds exist, but the ideal solution would indeed be fixing the hardware manager’s input idle detection such that it no longer ignores game controllers.)