2

I'm using Arch Linux with Gnome as DE and lightdm as display manager.

I have a keyboard shortcut with the xset dpms force off command for turning off the laptop monitor. When I execute this command display goes off but when I press any key it turns up to the lightdm login screen.

I just want to turn off the screen not log out from the desktop.

slm
  • 363,520
  • 117
  • 767
  • 871
Milad ABC
  • 173
  • 1
  • 7
  • What's the `dmsg` output, right after logging back in? It would also be helpful to tell us, which resources you already know. This page, for example: https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling – Minix Jun 30 '18 at 20:02
  • @Minix Here is the dmesg output: https://pastebin.com/htvR9u6x I've read that page but didnt help me. – Milad ABC Jun 30 '18 at 20:19
  • Did you try `xset dpms force standby` or `xset dpms force suspend`, instead of `xset dpms force off`? And did you try prepending `sleep 1` as mentioned on the page? – Minix Jun 30 '18 at 20:23
  • @Minix yes have tried all of them. Result is the same. – Milad ABC Jun 30 '18 at 20:30
  • Related - https://wiki.archlinux.org/index.php/Display_Power_Management_Signaling – slm Jun 30 '18 at 20:33

1 Answers1

0

LightDM locking is controlled by the light-locker. Starting it with option --no-lock-on-suspend and then issuing command xset dpms force suspend should turn off the screen without locking the session.

Sergey
  • 353
  • 1
  • 3
  • 13