mate-desktop / mate-screensaver

MATE screen saver and locker
https://mate-desktop.org
GNU General Public License v2.0
48 stars 40 forks source link

Always display a black screen when laptop is in battery mode #132

Open sinecode opened 7 years ago

sinecode commented 7 years ago

When my Dell Inspiron laptop is not connected to a power source the mate-screensaver starts and locks the screen correctly but it always display a black screen, even if I have selected a different screensaver from the options. That behavior is very strange because if I run the command mate-screensaver from a terminal everything works fine, but if the process is launched at login (for example with startup applications) the selected screensaver isn't displayed.

Some informations

$ uname -a
Linux inspiron 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -d
Description:    Ubuntu 17.04
$ mate-about --version
MATE Desktop Environment 1.18.0
$ mate-screensaver-command --version
mate-screensaver-command 1.18.0

If I insert the command mate-screensaver --debug in Startup Applications:

$ cat .xsession-errors | grep screensaver
[main] mate-screensaver.c:92 (14:13:13):     initializing mate-screensaver 1.18.0
[listener_add_ref_entry] gs-listener-dbus.c:772 (14:13:13):  adding throttler from Power screensaver for reason 'On battery power' on connection :1.545
[list_ref_entry] gs-listener-dbus.c:301 (14:13:13):  throttler: Power screensaver for reason: On battery power
[gs_job_set_command] gs-job.c:207 (14:14:24):    Setting command for job: '/usr/lib/mate-screensaver/mate-screensaver/popsquares'
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
[gs_window_raise] gs-window-x11.c:688 (14:14:24):    Raising screensaver window
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/48052598-always-display-a-black-screen-when-laptop-is-in-battery-mode?utm_campaign=plugin&utm_content=tracker%2F1635706&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1635706&utm_medium=issues&utm_source=github).
seigneurfuo commented 6 years ago

Same problem for me.

VABritto commented 3 years ago

Three years later and I also have the same problem lol

uname -a Linux rivendell 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -d Description: Linux Mint 20

mate-about --version MATE Desktop Environment 1.24.0

mate-screensaver-command --version mate-screensaver-command 1.24.0

lukefromdc commented 3 years ago

Title is a little confusing: makes it sound like a feature request to deliberately always display a back screen on battery rather than a complaint that this is already occurring and is undesirable(which if it if the user tried to set something else as the behavior).

maxresd3fault commented 8 months ago

I have found a temporary solution that can be used until this is patched, because it does not seem to be an intended feature it is a bug. I know this because when you kill the mate-screensaver process and then restart it from the terminal it has the intended effect and the screensaver starts on battery.

So to fix it, what you want to do is go to System, Preferences, Personal, Startup Applications.

From there make a new startup application name it something like "Screensaver Exit", add a startup delay of 5 seconds, and put this command in:

mate-screensaver-command --exit

So it looks like this:

image

Next make another startup application, name it something like "Screensaver Reboot", add a delay of 10 seconds, and add the command:

mate-screensaver

So it looks like this:

image

This is far from ideal, and a hacky way to get it to work, but this is the only way I've found that will get it working correctly. All it's doing is forcing the screensaver program to reboot after login. Hopefully this eventually gets patched.