You are not logged in.

#1 2015-07-26 15:45:04

xaine
Member
From: Brooklyn, NY
Registered: 2014-10-24
Posts: 5
Website

Macbook Air 5.2 Won't sleep on lid close with xscreensaver active

I am using the most recent version of i3, and my system is up to date. When the screensaver is active (e.g. the lock screen is up) when I close my laptop lid, it does not sleep. When the screensaver is not active, and the xscreensaver program is running, the laptop will suspend when I close the lid. When I open it, xscreensaver is still running...  Anyone have any ideas how to make this work? I could install pm-utils , but that project is "largely undeveloped now" so I would rather have a more developed program running instead (or just use systemd to manage it). I am using powertop for managing my battery life.

xscreensaver is started in my i3 config (It won't load for some reason in .xinitrc)

exec --no-startup-id /usr/bin/xscreensaver -no-splash &

The only thing in my .xinitrc is starting i3 with logging.

And I have this systemd unit file setup, so when I suspend, xscreensaver starts up. Which I suspect could be the cause of the issue.

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

[Service]
User=alex
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/usr/bin/xscreensaver-command -lock

[Install]
WantedBy=sleep.target

Please let me know if any futher info is needed!

Offline

Board footer

Powered by FluxBB