Project

General

Profile

Actions

Emulator Issues #3279

closed

Disable screensaver, power management on Linux

Added by nitro322 over 13 years ago. Updated over 2 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?

  1. Play game (on Linux) for X minutes until screensaver/power management kicks in
  2. Watch game disappear :-(

What is the expected output? What do you see instead?
Screen savers and display power management functionality should be disabled while a game is running. Rationale is that you don't want you game interrupted by a screen saver covering the image or the monitor powering down.

Previous issues relating to this: bug 2568, bug 2315, bug 1084, bug 203

On current Linux builds, this functionality does not seem to be implemented. Every 10 minutes while I'm playing a game, my monitor enters sleep mode and powers down. This occurs whether I'm running in windowed or full-screen mode.

Previous discussion and code seems to focus on Windows support, so I'm not sure if this is a regression on Linux or just if it's never been implemented.

Dolphin version with the problem? Other Dolphin version without the
problem?
r6239 fails. I'm new to Dolphin, so I've not seen it work.

32-bit or 64-bit and any other build parameters?
amd64. Build options:
scons -j 7 opencl=true shared_glew=true shared_lzo=true shared_sdl=true shared_zlib=true shared_sfml=false shared_soil=false verbose=false

OS version and versions of tools/libraries used?
Gentoo amd64, GCC 4.4.3, wxGTK 2.8.10, KDE 4.4.5

Please provide any additional information below.
This definitely occurs for power management. I'll check tonight to verify whether it's an issue with screen savers as well.


Files

Screenshot.png (87.8 KB) Screenshot.png MasterQ, 09/14/2021 01:23 AM
Actions #1

Updated by Billiard26 over 13 years ago

I don't think power management is disabled in the Windows build either.

Actions #2

Updated by nitro322 over 13 years ago

FYI, I've confirmed that screen savers are indeed not disabled either on Linux.

Actions #3

Updated by nitro322 over 13 years ago

I found a possibly easy solution. I did some digging into how various media players disable screensavers and and power management and found the Xine and VLC have both switched to using xdg-screensaver to handle it rather than their own code. xdg-screensaver is part of the xdg-utils package, which includes utilities for handling various desktop and window management functions through a common interface.

The rationale, of course, is to leverage another utility specifically written for this purpose rather than trying to custom write and maintain a solution yourself. Based on some brief research this doesn't seem to be a perfect solution - there are some edge cases where xdg-screensaver doesn't work, as well as some bugs in the program that have been fixed only in CVS - but it looks like it should handle the majority usage scenarios just fine, and should be relatively easy to implement.

I tested this on my own system by manually running "xdg-screensaver suspend 0x02e00154" (the Dolphin WindowID) while playing a game, and it did indeed temporarily disable both my screensaver and power management settings.

For anyone interested in looking into this, here's some info about the utility:
http://portland.freedesktop.org/xdg-utils-1.0/xdg-screensaver.html

and here's how VLC uses it:
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/misc/inhibit/xdg.c;h=01decacc9a5799a174529197949f41aaf003b6bf;hb=HEAD

Actions #4

Updated by tomman over 13 years ago

I vote for this bug :)

It's real annoying to have the power management stuff kick in in the middle of the action, and it's more annoying that you have to disable it before gaming... just to forget re-enabling it once you exit.

The xdg-screensaver is a neat trick too, and since even my ancient FC6 has it, it would be nice to have it implemented. In the meanwhile, we could survive with some shell-fu magic.

Actions #5

Updated by glennricster over 13 years ago

  • Status changed from New to Fixed

This issue was closed by revision r6477.

Actions #6

Updated by Paragoumba almost 4 years ago

This issue happens for me with the last Dolphin (built from the master branch). I use it with KDE on ArchLinux. After a few minutes, when the power management is on, it dims the screen then shuts it off.

Actions #7

Updated by MasterQ over 2 years ago

I have the same issue, also on KDE, but Debian linux bookworm. My CMake config is attached as image. Else just default compiling:

cmake ..
make -j12

!Screenshot.png!

Actions

Also available in: Atom PDF