Version: (using KDE 4.3.1) Installed from: Fedora RPMs kde is set to sleep on lid close. But, when screen is locked, this doesn't work. I have to unlock the screen, then close the lid. This is very annoying. I believe this breakage dates back to the release of kde4.
I can confirm this in Fedora 12 with kdebase-workspace-4.4.0-7.fc12.x86_64. Opened downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=524798
confirmed.
I'm not sure if that's always desirable. When I've locked the screen I might not want someone to suspend the system by closing the lid.
This behavior is actually consistent with what Felix says: the session is not active when the screen is locked, hence no actions are taken. I'm closing the bug as won't fix. If you don't agree with that, please start a discussion: I might consider adding an option for disabling the session check.
*** Bug 185674 has been marked as a duplicate of this bug. ***
*** Bug 184381 has been marked as a duplicate of this bug. ***
*** Bug 205453 has been marked as a duplicate of this bug. ***
*** Bug 243713 has been marked as a duplicate of this bug. ***
I believe this behavior should be configurable. Consider following scenario: Joe has his laptop running, music is playing, screen is locked. Now Joe wants to go somewhere else really fast and does not want to bother with typing password just to put his laptop to sleep. Closing a lid should do the job. On the other hand I understand that this might be undesirable for somebody else. However an adversary may always shutdown the laptop just by long pressing the power button.