Lock on lidswitch on gnome3/wayland

I always have my laptop set to lock on close. I just upgraded to 19.09 and thought I would give gnome3 a try. I am really digging it. I tried

services.logind.lidSwitch = “lock”;

first but it seemed to have no effect, I also tried “ignore”
But I can’t figure out anyway to detect the event in gnome, or systemd isnt sending correct signal.

I am able to lock the screen from cli with
dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock

So if I could just find some way to catch the signal I think I could get it working. any advice?

1 Like

What does

gsettings get org.gnome.desktop.screensaver lock-enabled 

return?

1 Like

that command responds with
true

1 Like

I figured it out changing logind settings dont go into effect without a manual restart of the service or a reboot.

1 Like