Can you share your details before I add more info to this bug?
My dm is slim, though I have tried startx as well, with the same results. All logind settings are set to their defaults. That is if xfce4 hadn't started, logind would be handling lid and button events and executing the various default actions. I have also tried disabling logind's lid and button handling. This has had no effect.
As a temporary workaround, I have done the following:
xfce4-session-logout --suspend; slock
Replace slock with whatever screen-locking solution you use. This works from sh-like shells. It can be mapped to a global keyboard shortcut like Fn-sleep or given an alias in the shell.
Hibernation is basically the same:
xfce4-session-logout --hibernate; slock
I can't understand why the power manager can't just do this by itself!
Sorry for the late reply, but what happens if you call "xflock4"? Does it lock your session as expected? Theoretically it should support slock and xfce4-power-manager uses this script (usually residing in /usr/bin) to lock your session.
I just doublechecked the Power Manager settings, and "Lock screen when system is going for sleep" is indeed checked. When I call xflock4, the screen does lock.
The line I don't see in your xfce4-session output is this:
/shutdown/LockScreen true
What versions of xfce4-session and xfce4-power-manager are you using exactly? Thing is, at some point this setting was handled by both the power-manager and the session, which seemed like an unnecessary and confusing duplication, so we made the xfce4-session-settings dialog handle it and the "lock screen on suspend" checkbox should only show up in xfce4-power-manager when used without xfce4-session.
This is on x86-64 archlinux with slim as a DM. XFCE is started with "exec startxfce4" in ~/.xinitrc. I found the setting in the power manager settings. Looks like it should never have appeared there, though. I found the second setting you mentioned in the "Session and Startup" UI under "Advanced". It works just fine. So, yay? I have a workaround now. Thanks!
The problem remains, but it looks like the problem really is that "lock screen" appears in the power manager settings when it shouldn't.