You are not logged in.

#1 2013-11-04 10:36:39

thejpster
Member
Registered: 2013-11-04
Posts: 2

Laptop screen visible before xscreensaver appears on resume

I use the XFCE, lightdm and xscreensaver.  My laptop is a Toshiba with an Intel Core i3-330 and integrated graphics. The laptop is shared and there's usually two of us logged in simultaneously. Fast user switching works.

If I suspend the laptop, that works. If I take the laptop out of suspend, the screen contents from before the suspend are displayed for about four seconds, during which time the screen is frozen (i.e. the mouse cursor won't move). Then xscreensaver starts, hiding my desktop, and the unlock dialog appears.

It's not ideal that my desktop is on display before the unlock dialog appears after resume. Is there something I can do to change this? Perhaps get xscreensaver to lock the screen before the suspend occurs? I could switch to the lightdm screen and then suspend, but that's a faff. I usually just close the lid.

Cheers

JP

Offline

#2 2013-11-04 15:49:50

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: Laptop screen visible before xscreensaver appears on resume

If you are using suspend from systemd for suspending your system, you could be interested in reading this:

man systemd-suspend.service

English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#3 2013-11-16 19:06:49

thejpster
Member
Registered: 2013-11-04
Posts: 2

Re: Laptop screen visible before xscreensaver appears on resume

Thank you!

That lead me to https://wiki.archlinux.org/index.php/XS … ibernating, which says you should install xuserrun-git from AUR, and create /etc/systemd/system/xscreensaver.service:

[Unit]
Description=Lock X session using xscreensaver
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/usr/bin/xuserrun /usr/bin/xscreensaver-command -lock

[Install]
WantedBy=sleep.target

Once the service is enabled (d'oh), it works perfectly! I should have read the wiki first wink

It would be nice if this came with xscreensaver though.

Offline

#4 2013-11-16 19:58:22

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: Laptop screen visible before xscreensaver appears on resume

If you are the only user of your computer, you can use similar solution (without xuserrun) mentioned on the same page from your link.

Edit: Nevermind, sorry, I forgot, that you mentioned, that you are sharing your computer.

Last edited by mrinx (2013-11-16 20:00:02)


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

Board footer

Powered by FluxBB