Disabling screen lock when running Wine

Hello,

screen locking is configured and working, but I need a way to disable screen locking temporarily when playing a game using Wine and a game pad or a joystick, because KDE does not seem to recognize these events, resulting in a blank screen e.g. in the middle of a car race. :frowning:

If I remember correctly, there used to be an option in KDE systemsettings, to keep the screen active when the mouse was moved to a certain desktop edge. But in recent version (KDE 5.17+) this option seems to be removed. Is this option still available in KDE, e.g. via some configuration file? If so, I could just move the mouse to the right spot before I start a game.

I have a similar scenario where I do not want the screen to lock (or system to suspend) while playing along to MP3s. There is even no touching of the system involved.

Activities are a great thing here: I created a new activity ‘Practicing’, then adjusted the power setting exactly to my taste for the (via System Settings > Power Management > Activity Power Settings, tab ‘Practicing’, then ‘Define a special behavior’).
I even adjusted the desktop (showing MP3 folders, having different backgrounds).

You could try something similar; I think it would be even possible that whenever you are starting Wine, the activity will be automatically switched (and you could have your desktop showing all your Windows programs you can execute)

Thanks for this idea, I’ll give it a try!

Nevertheless, I suggest that KDE (or any other GUI / desktop / window manager) should recognise the movements of a joystick the same way as it recognises the movements of a mouse when running a game with the help of Wine, thus keeping the screen unlocked.

1 Like

In Plasma 6, the “Power and Battery” applet has a switch to “Manually block sleep and screen locking”. That would be a way to quickly disable locking temporarily. Not sure when this switch was introduced, but I checked Plasma 5.27 as well which had it already.

I agree though, if gamepad movements are coming in, KIdleTime (used across Plasma and apps) should regard this as an event that resets the inactivity timer. [Edit: and if there isn’t a bug about this on https://bugs.kde.org/ yet, please create one! thank you :slight_smile: ]

Thanks, I will also give this suggestion a try.

But regarding your request to open a bug report: NO! That I won’t do, because it’s a total waste of time!

Why?

Because the bug report site has become a discussion board, and none of the attendants seems to be able or willing to fix reported bugs like this. I found this bug, that is not particular about playing a game in Wine, but about the use of a joystick and the system’s power management in general. That bug has been reported in December 2013 (that is twenty-thirteen!), more than 10 (ten!) years ago, and since then the involved persons have done a lot of discussing, and talking, and discussing, and discussing again, but apparently no one has had the knowledge how to fix this, as the last entries from 2023 are showing.

That is not what I call a useful bug reporting site. I do not want to wait more than 10 years for a bug to be fixed. I’d rather switch to another operating system instead if it provides a solution for my problem within my life span that is left. And that bug is not the only one that has been talked about and discussed for decades without any progress. Just look around in the bug data base.

Sorry having to say this, but 10 years of talking and discussing a problem without any visible effort of trying to fix it is frustrating and pushing people away from Linux.

Yeah, Plasma 5.27 has also the “Manually block sleep and screen locking” switch, and I really liked it first.

But I finally refrained from using this, as there is no visual indicator that the switch is on. So I ended up many times with an empty laptop battery simply because I forgot to turn this off and leaving my laptop unattended.

Having a dedicated activity, I can now clearly see that I am blocking sleep and screen lock.

1 Like

It’s been a while since I ran Windows and I don’t have a system to look at, but I remember having a setting on a shortcut that would allow you to block the screensaver when the app is running. That was quite handy for something like a video player or a game. So, it is possible.

Probably kde-inhibit?

It has, atleast in Plasma 6.
Screenshot_20240107_150840

1 Like

Bugs like those are outliers, I promise not all bugs on our bugtracker are “unsolved for years” :slight_smile: We’re all volunteers, or doing this in some limited paid capacity.

2 Likes

a good work around on any desktop environment or window manager is a utility called caffeine which is designed to prohibit screen locking and sleep when certain apps are running.