I have used Automatically locking screen without shutting it off and other threads but ultimately it locks the screen, which is not what i am asking.

  • 1
    Why are you posting a new question from a new account? Please edit your older question and add details. – pomsky Jan 18 at 8:16
  • sorry about that. but i can't seems to access that a/c. I tried like for an hour and i gave up. Please help me solve the question – Prabesh Bhattarai Jan 18 at 8:18
  • Through my original a/c, i can't ask question anymore. So i have almost created like 3 a/c to get my answer. Keeping track of them is a bit annoying. – Prabesh Bhattarai Jan 18 at 8:20
  • u asked me, "gsettings get org.gnome.settings-daemon.plugins.power power-button-action" the output is "suspend". – Prabesh Bhattarai Jan 18 at 8:21
  • 2
    Please don't demand for an answer in that way. In case you're mistaken Ask Ubuntu is not a free Ubuntu tech support, we're just a community of (mostly) average Ubuntu users. And also I failed to realise how I'm putting you in loop again and again. I suggested something, which didn't work. So I suggested the way to undo the effect of my previous suggestion before completely disengaging from this question. Thank you, have a good day. – pomsky Jan 18 at 9:05

You can set the power management to turn off the screen when you press the power button, but unless automatic locking is set to "Off" (in "Privacy" setting), the system will lock when you turn off the screen.

Unfortunately there's no way in Ubuntu (based on GNOME) to change that behavior - either no lock at all, or lock when the screen turns off.

Other desktop environment, such as KDE Plasma, XFCE or Budgie might offer more refined settings.


I could somehow manage the "physical button" "power off" button as a custom shortcut to the command xset dpms force off with the help of this Q&A Is there any way to make a hotkey turn the screen off?

while other settings are set to

gsettings set org.gnome.settings-daemon.plugins.power button-power 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power power-button-action 'nothing'

enter image description here

It worked as expected. https://imgur.com/YWVHCcP

enter image description here enter image description here

  • That seems very promising and real but when i at the time of choosing a Keyboard, "Power button" doesn't respond at all. That is, it ain't get selected or anything like that. – Prabesh Bhattarai Jan 19 at 3:24
  • yes i too struggled to make it.. i played around giving power off button to other default ones example.. select snap left and select poweroff it will take.. later in dconf edit it.. – PRATAP Jan 19 at 4:11
  • Can u explain it in minor details? "snap left ?" (I do have dconf edit though). – Prabesh Bhattarai Jan 19 at 4:27
  • go to keyboard shortcuts find "View Split on Right" "Super+Right" select it to and press PowerOff button to see it is working. then if it works disable it. make a short cut with the xset command and give keypad number 5 as the shortcut. when you press keypad 5, it should off the monitor. later in dconf edit 5 to PowerOff – PRATAP Jan 19 at 4:30
  • i tried searching in dconf but couldn't find it. – Prabesh Bhattarai Jan 19 at 4:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.