ares-emulator / ares

ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
https://ares-emu.net
Other
939 stars 114 forks source link

Running on GNOME 44 in fullscreen does not disable auto-suspend/auto screen blank when using a game controller #1368

Open wired-filipino-owl opened 8 months ago

wired-filipino-owl commented 8 months ago

Describe the bug I imagine most people like to play emulators with game controllers. When running Ares via commandline with the --fullscreen option or just running Ares normally and going fullscreen, GNOME does not detect it properly as a full screen application. To be more precise, when using a game controller and not the keyboard, GNOME thinks it's okay to turn off the screen when you're just trying to play some classic games with a game controller..

I also tried the Caffeine GNOME extension, and it also did not detect Ares properly. I apologize if this is actually a bug with GNOME. The same behavior occurs when using the Pegasus frontend software to launch Ares.

To Reproduce Steps to reproduce the behavior:

  1. Use a GNOME desktop environment and plug in a USB gamepad
  2. For testing, set the timeout for the screen blank in GNOME (Settings -> Power -> Screen Blank) to something low like 1 minute.
  3. Run Ares with the terminal and the --fullscreen switch or just run Ares normally and switch to fullscreen with a hotkey
  4. Attempt to play a game until the screen turns off
  5. Be frustrated with GNOME being nonsensical

Expected behavior GNOME shouldn't shut the screen off when Ares is fullscreen and running a game.

Additional context I compiled from source, version 134 from tags (d381bb46780c3f). Installed with make install Running on Fedora Linux 38, on GNOME desktop environment. I tested both a Hori PS4 fighting stick controller and an Xbox One controller. I used the OpenGL 3.2 video driver. I don't know if this is relevant, but I'm using the proprietary NVIDIA driver for my graphics card. This string is in my /etc/environment due to a bug with the NVIDIA driver right now: MUTTER_DEBUG_FORCE_EGL_STREAM=1

Seedthis commented 7 months ago

Just passing by, I noticed this behaviour with Ryujinx emulator on GNOME 45.3 (Fedora 39). I supposed it was a GNOME bug/shortcoming and was not related to the emulator per se.

I've noticed that Yuzu emulator has a "Gamemode" checkbox in its settings. Using Gamemode prevents the screen from shutting down. After launching Ryujinx with Gamemode (gamemoderun ryujinx in a terminal), my screen doesn't shut down.

It's not a real fix though, it just seems GNOME doesn't treat gamepads as other input devices like keyboards and mice.

In any case this has been reported on the GNOME Gitlab here : Screensaver is not inhibited on gamepad input