How to turn off screen (DPMS) together with locking session in KDE?
Found a way for KDE 4 (up to Ubuntu 14.10). For modern KDE 5 see other answer.
Go to System Settings → Application and System Notifications → Manage Notifications.
Select Screen Saver as the Event Source
Locate and select the Screen Locked
add this command to the event:
xset dpms force off
It will turn off all displays every time it gets locked.
Confirmed: running the command: /bin/sleep 1 ; /usr/bin/xset dpms force off
within the screen locked notification works for Plasmashell 5.10.
Go to: System Settings > Notifications > Event source "Screen Saver":
As of KDE 5, most of the solutions here no longer work.
Here's what I found that works though (as of 2016-09-28), create a text document and in it copy and paste the following code:
#!/bin/sh
sleep 0.5
loginctl lock-session
xset dpms force off
and then save it as "KDE5lockscreenanddpms.sh" The name doesn't matter, just make sure you have the .sh at the end of it. Then navigate to where you saved with your file manager, right click on it and open up properties>permissions> and make it executable.
Now you can click on it and it will run the script which will lock your screen and then after .5 seconds will turn your monitor(s) off.
Here are some posts with the info about these commands.
KDE.org- loginctl lock-session
Linux-apps.com - sleep 0.5 xset dpms force off