Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Screensaver inhabitation does not disable lock screen #12169

Open
spixi opened this issue Jan 7, 2025 · 16 comments · May be fixed by #12174
Open

[BUG]: Screensaver inhabitation does not disable lock screen #12169

spixi opened this issue Jan 7, 2025 · 16 comments · May be fixed by #12174

Comments

@spixi
Copy link

spixi commented Jan 7, 2025

Describe the Bug

Screensaver inhabitation does not disable lock screen

Reproduction Steps

I am using PCSX2 2.2.0 on Gentoo GNU/Linux, the official Portage ebuild. My display manager is LightDM 1.32.0 and I use MATE Screensaver 1.28.0 for the lock screen. screensaver-timeout is not set in /etc/lightdm/lightdm-gtk-greeter.conf, so it defaults to 5 minutes.

MATE Screensaver uses gsettings and not dbus.

Inhibit screensaver is ticked on:
Image

Expected Behavior

The lock screen should be inhibited when "Inhibit screensaver" is checked.

The following script can be used to disable the lock screen (code copied from https://github.com/canonical/lightdm/blob/main/debian/guest-session-auto.sh)

#!/bin/sh
# disable screen locking (GNOME, Unity)
gsettings set org.gnome.desktop.lockdown disable-lock-screen true

# disable screen locking (MATE)
gsettings set org.mate.screensaver lock-enabled false

# disable screenlocking (XFCE, Pantheon)
gsettings set apps.light-locker light-locker-enabled false
gsettings set apps.light-locker late-locking false
gsettings set apps.light-locker lock-on-lid false
gsettings set apps.light-locker lock-on-suspend false

PCSX2 Revision

v2.2.0

Operating System

Linux (64bit) - Specify distro below

If Linux - Specify Distro

Gentoo

Logs & Dumps

OpenType support missing for "DejaVu Sans", script 11
MESA-INTEL: warning: Haswell Vulkan support is incomplete

@spixi spixi added the Bug label Jan 7, 2025
@F0bes
Copy link
Member

F0bes commented Jan 7, 2025

Not a bug. If your system doesn't support the org.freedesktop.ScreenSaver DBus method, then it's not going to work.
Someone is free to extend the Common::InhibitScreensaver function to support other common configurations.

@F0bes F0bes closed this as completed Jan 7, 2025
@spixi
Copy link
Author

spixi commented Jan 7, 2025

@F0bes My system supports org.freedesktop.ScreenSaver, but this does NOT inhibit the lock screen. This affects common Desktop environments like GNOME, MATE and Unity.

@F0bes
Copy link
Member

F0bes commented Jan 7, 2025

So, the screensaver inhibition works, but it still ends up locking?

@spixi
Copy link
Author

spixi commented Jan 7, 2025

So, the screensaver inhibition works, but it still ends up locking?

Correct. Screensaver and screen-locking are different processes apparently.

@F0bes F0bes reopened this Jan 7, 2025
@TheTechnician27
Copy link
Contributor

I'm going to spin up a Manjaro Gnome VM and give this a try.

@F0bes
Copy link
Member

F0bes commented Jan 7, 2025

That's incredibly backwards. If the C gsettings library is trivial to add, I suppose we should try and use it.

@spixi
Copy link
Author

spixi commented Jan 7, 2025

I can try to integrate it in the next weeks and look if that works, but this will take some time, please leave the bug open.

@TheTechnician27
Copy link
Contributor

TheTechnician27 commented Jan 7, 2025

The OP suggested that Gnome potentially experiences the same problem ("This affects common Desktop environments like GNOME, MATE and Unity"), but testing I've done seems to disprove that. I installed a VM using Manjaro Gnome and set up PCSX2. Using 'Inhibit screensaver', the screen will not blank and subsequently lock (mouse and keyboard were physically switched off). Turning off 'Inhibit screensaver', this happens within the expected amount of time (the default of 5 minutes). Thus, Gnome appears unaffected.

@TheTechnician27
Copy link
Contributor

I can confirm that I am able to replicate this issue on Fedora Mate.

@F0bes
Copy link
Member

F0bes commented Jan 8, 2025

Maybe this is more of a MATE issue rather than our issue.

@TheTechnician27
Copy link
Contributor

TheTechnician27 commented Jan 8, 2025

@TheLastRar has pointed out that RPCS3 encountered the same issue and managed to fix it, and it does appear to be MATE-specific. RPCS3/rpcs3#11033

@spixi
Copy link
Author

spixi commented Jan 8, 2025

RPCS3/rpcs3#11034
This should be an easy fix, I guess.

@spixi
Copy link
Author

spixi commented Jan 8, 2025

I will have a look if this fix would work in PCSX2 as well and create a PR if it worked.

@F0bes
Copy link
Member

F0bes commented Jan 8, 2025

The last commit to mate screen saver was months ago. A PR that would fix this has not been reviewed or responded to by maintainers.
Is it really of our interest to support unmaintained software?
Especially those who have decided to create their own standard for seemingly no good reason.

spixi added a commit to spixi/pcsx2 that referenced this issue Jan 8, 2025
@spixi spixi linked a pull request Jan 8, 2025 that will close this issue
@spixi
Copy link
Author

spixi commented Jan 8, 2025

The last commit to mate screen saver was months ago. A PR that would fix this has not been reviewed or responded to by maintainers. Is it really of our interest to support unmaintained software? Especially those who have decided to create their own standard for seemingly no good reason.

MATE Desktop is not unmaintained software. Other projects like VLC, Gnomecast, Printrun, ExMplayer, XScreensaver, Veyon, MythTV etc. use either org.mate.SessionManager or org.mate.ScreenSaver. Because org.mate.SessionManager has been replaced by org.gnome.SessionManager in MATE 1.12, I use org.mate.ScreenSaver, which works.

@F0bes
Copy link
Member

F0bes commented Jan 8, 2025

I said mate-screensaver appears to be unmaintained.
Just because other software supports org.mate.SessionManager, org.mate.ScreenSaver or org.gnome.SessionManager doesn't change the fact that there's no need for MATE to force usage of a separate DBus method that isn't the defacto-standard, org.freedesktop.ScreenSaver.

spixi added a commit to spixi/pcsx2 that referenced this issue Jan 8, 2025
spixi added a commit to spixi/pcsx2 that referenced this issue Jan 8, 2025
spixi added a commit to spixi/pcsx2 that referenced this issue Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants