SUMMARY Recently I'm play StoneStory RPG, an ascii art gaming developer using Unity. The game itself involves a lot of automatic farming (archievement: AFK Farmer). However even when the game window is minimized, the game is still prevent screen saver/locker from kicking in. Even manually locked the screen, the screen never get dimmed/blanked/turned of at all. Is there any way to skip such session and force locking the screen? Just like KWin rules. STEPS TO REPRODUCE 1. Download and play StoneStoryRPG (or any other Unity based game) 2. Use windowed mode for the game 3. Minimize the game, wait for the screen locker to kick in OBSERVED RESULT Screen saver never kick in EXPECTED RESULT Screen saver kicks in as expected SOFTWARE/OS VERSIONS Linux/KDE Plasma: Archlinux (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
If you click on the Battery and Brightness system tray applet, does it say that the game is "currently supressing power management?"
(In reply to Nate Graham from comment #1) > If you click on the Battery and Brightness system tray applet, does it say > that the game is "currently supressing power management?" I'm using a desktop, thus no battery and I see no such prompt.
It also controls the brightness, so you should still see it on the desktop. It might be in the system tray's list of extras, accessed by clicking on the little arrow.
(In reply to Nate Graham from comment #3) > It also controls the brightness, so you should still see it on the desktop. > It might be in the system tray's list of extras, accessed by clicking on the > little arrow. Yes, I have double checked the system tray, nothing at all.
Okay, so you'll need to make it appear, at least temporarily. 1. Right-click on system tray arrow > Configure System Tray 2. On the General page, make sure "Battery and Brightness" is checked in the list 3. Go do Entries page and change the visibility of "Battery and Brightness" to "Shown" If it's not even visible on the "General page" that suggests that your system is missing packages.
(In reply to Nate Graham from comment #5) > Okay, so you'll need to make it appear, at least temporarily. > > 1. Right-click on system tray arrow > Configure System Tray > 2. On the General page, make sure "Battery and Brightness" is checked in the > list > 3. Go do Entries page and change the visibility of "Battery and Brightness" > to "Shown" > > If it's not even visible on the "General page" that suggests that your > system is missing packages. I think you didn't get the point. I know regular programs like firefox video playback will show up in that tab. And I can confirm that battery indicator gadget is working. But still, for that stream game, it doesn't show up in that indicator, and I have no way to force screensaver to kick in.
Sorry about that. Might be an issue with the games themselves (or it might be intentional).
(In reply to Nate Graham from comment #7) > Sorry about that. Might be an issue with the games themselves (or it might > be intentional). Then the problem is, is there anyway to force screensaver to kick in or add some window rule to force it?
Press Meta+L or Ctrl+Alt+L.
(In reply to Kai Uwe Broulik from comment #9) > Press Meta+L or Ctrl+Alt+L. Not enough. The screen will keep on, never go blank, and that's the problem.
What Plasma version is this? When the screen is locked, PowerDevil should disregard any inhibitions for screensaving: https://cgit.kde.org/powerdevil.git/tree/daemon/powerdevilpolicyagent.cpp#n401 Maybe the game is simulating user activity continuously instead of posting an inhibition, which might explain why it doesn't show up, and there's not really anything we can do about this.
(In reply to Kai Uwe Broulik from comment #11) > What Plasma version is this? > When the screen is locked, PowerDevil should disregard any inhibitions for > screensaving: > https://cgit.kde.org/powerdevil.git/tree/daemon/powerdevilpolicyagent. > cpp#n401 > > Maybe the game is simulating user activity continuously instead of posting > an inhibition, which might explain why it doesn't show up, and there's not > really anything we can do about this. 5.16.4 for powerdevil Is it possible to handle it like Kwin to add some window rule to override that?
If the game is calling simulateUserActivity on the screensaver iface or generating fake events then there is nothing we can do in KDE. All signs above point to that happening.