How to create keyboard shortcut which initiates suspend

When I was running the Unity shell I was able to do Fn + F1 and get my machine to suspend, however now that I am running Gnome Shell, when I do this keyboard shortcut, absolutely nothing happens, so I was wondering if there was anyway to get it so that when doing that keyboard shortcut, my machine does actually suspend?

I have tried looking in my System Settings and found nothing obvious, I have also looked in Gnome Tweak Tool, but still nothing obvious. When I had Unity it was just the case though, and even when I had Windows 7 before that it was the case that that keyboard combination did that, I have never needed to configure anything specially, nor have I to get this working.

OS Information:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:    15.04
Codename:   vivid
Asked By: user364819


I tested the command mentioned here on Gnome 15.04, and it did the job well. The next thing to do is then to make it available under a shortcut key.

The easiest way would be to create a small script of it:


dbus-send --system --print-reply 
  org.freedesktop.login1.Manager.Suspend boolean:true

save it as, and make it available under a shortcut key. To do that works the same in Gnome as it works in Unity: choose: System Settings > “Keyboard” > “Shortcuts” > “Custom Shortcuts”. Click the “+” and add the command:

/bin/bash /path/to/

to a shortcut key combination of your choice.

Answered By: Jacob Vlijm

You can just add this

gksudo pm-suspend

in Settings>>Keyboard>>Shortcut and map it to any key combination you want.

Answered By: peeyush113

Using pm-utils with PolicyKit

With this way, you have to enter a password before suspend.

  1. First install pm-utils, we need pm-suspend

    sudo apt-get install pm-utils
  2. After that, create a new script file and add the code below

    pkexec "pm-suspend" "$@"
  3. Open Keyboard via Activities menu and navigate to Custom Shortcuts and add a new shortcut.



  4. Now add a new file in /usr/share/polkit-1/actions/

     sudo nano cat /usr/share/polkit-1/actions/pm-suspend.policy

    And add the lines below

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE policyconfig PUBLIC
     "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
      <action id="">
        <description>Run FlashTool</description>
        <message>Authentication is required to run pm-suspend</message>
        <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/pm-suspend</annotate>
        <annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>

That’s all 😉

Answered By: A.B.

To suspend Ubuntu 18.10 I use the Super key to launch a command and type sus to highlight the Suspend command, then hit Return.


Not quick as elegant as Super+l to lock screen, but it works without adding any configuration and no need for a mouse.

Answered By: practicalli-john

I know this post is old. But in new Gnome versions, it’s very easy.

Simply go to settings > keyboard > keyboard shortcuts and add a custom shortcut with this command systemctl suspend.

Answered By: heikrana

Here a exaple how to create keyboard shortcut to suspend the system by pressing <Super> + s keys:

gsettings set suspend "['<Super>s']"

or create a custom keybinding:

gsettings set custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set name 'suspend'
gsettings set command 'systemctl suspend'
gsettings set binding '<Super>p'
Answered By: panticz