regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.48k stars 31 forks source link

screensaver AND blank screen: Locks but does NOT blank #785

Open digital-tinta opened 1 year ago

digital-tinta commented 1 year ago

Describe the bug

1) If I call the screensaver [meta+Esc], it locks and blanks the screen (as defined in Gnome Settings -> Privacy -> Screen) 2) If I call a second time the screensaver, then it locks, but it does NOT blank the screen; it will stay on in the lock screen without blanking. 3) Even after a period of inactivity, it does not blank the screen.

To Reproduce As described above

Expected behavior Screen is supposed to blank and enter save energy mode. It does the very first time I activate the screensaver. If I login into Ubuntu's default desktop, screensaver and blank screen work as expected; first time and all subsequent locks.

Configuration file(s) The output of regolith-diagnostic regolith-diagnostic.log

Installation Details

Many thanks!

sr9992 commented 1 year ago

I'm seeing the exact same behaviour! The first time I lock with Super+Esc, it locks and blanks. But after that, I can't get it to blank again, either by timeout or by explicit lock.

It worked fine when my system was running Regolith 2.1 on top of Ubuntu 22.04. It stopped working when I upgraded to Regolith 2.2 and Ubuntu 22.10 (I upgraded both at the same time, so I can't comment on if it was the Regolith upgrade or Ubuntu upgrade, or both, that broke it).

kgilmer commented 1 year ago

do you notice any error messages in /var/log/syslog at the time that the screen is to turn off but doesn't?

sr9992 commented 1 year ago

No, nothing in there unfortunately.

ajeshp commented 1 year ago

I'm seeing the same issue after upgrading to ubuntu 22.10. Don't think I saw this with Regolith 2.2 and Ubuntu 22.04 (however, I might have upgraded to 22.10 within a day or two of going to Regolith 2.2). I am also on regolith unstable repo now to work with 22.10 Screen does go blank the first time, but the second time onwards, the screen does not even lock after the inactivity period. Win + Esc does lock the screen, but screen stays on

sr9992 commented 1 year ago

It's difficult to Google how the GNOME Flashback screensaver works. It doesn't seem to be widely used given that GNOME Shell/GDM handle things differently.

In case it helps anyone, I just switched to using xautolock and i3lock because I understand how they work :)

i3lock's man page has instructions on how to get the monitors to turn blank. You have to wrap it in a script like this:

#!/bin/sh
revert() {
  xset dpms 0 0 0
}
trap revert HUP INT TERM
xset +dpms dpms 5 5 5
i3lock -n
revert

Then you can bind that script to Super+Esc in your Xresources:

i3-wm.program.lock: /path/to/myscript

And also get i3 to start xautolock in your i3 config file:

exec --no-startup-id xautolock -time <some number of minutes> -locker /path/to/myscript

At least you'll get something that works until the GNOME Flashback Screensaver thing is figured out :)

ajeshp commented 1 year ago

screen lock with screen off (for both win+esc and after inactivity) seems to work fine after installing gnome-session-flashback as discussed here: https://github.com/regolith-linux/regolith-desktop/discussions/804

found that as a side effect of installing gnome-session-flashback, some of the tray icons disappeared. I had to uninstall indicator-application, just in case somebody else has the same issue.

lawrencegripper commented 1 year ago

Thanks @ajeshp this worked for me :+1: