7

My system shuts down when I push te power button instead of suspending like most laptops. There are many complex forum solutions for that on the net, but I like to solve it with this command:

"gsettings set org.gnome.settings-daemon.plugins.power button-power suspend;"

The only problem is lubuntu uses LXQt now, so the result is: No such schema “org.gnome.settings-daemon.plugins.power”...

My question, what would be the equilavent gsettings command for lubuntu 18.10? Thanks for any idea's offered.

2
  • Do you want to use only the power button to suspend? Why not just use the suspend option under "Leave"? Wouldn't that achieve the same purpose? In any case, the command that is run when you choose the suspend option from the menu is lxqt-leave --suspend. You could bind that to an convenient keyboard shortcut such as meta+L (where meta is the Super or Windows key). After logging out and logging back in (just to be sure the command is registered with the system), pressing Meta+L would bring up a small dialog window asking if you really want to suspend.
    – DK Bose
    Dec 3 '18 at 12:32
  • Thanks DK Bose, just I use windows on the same laptop somtimes, a press on the power button in windows will suspend my laptop. That's the problem, I'm used to it for a long time. Also in elementary os it works the same which is a daughter of ubuntu. Now, when I don't think about it, I press the switch button and my system halts when I don't want it......
    – leeuwtje
    Dec 4 '18 at 18:52
7

Right...

Well thanks to all support I found the solution in the end for lubuntu LXQt 18.10
Finally I got rid of my laptop shutting down instead of suspending after pushing the power button...

I realize a power button logically should switch off power, but since the last 15 of years or so, people are used to have their laptops suspending by pushing it.

For others that have the same annoying thing and getting no answer for this simple question try this:

open terminal and run this command:

sudo apt install gnome-settings-daemon
gsettings set org.gnome.settings-daemon.plugins.power power-button-action suspend

and than install a text editor like gedit, and edit a file:

sudo apt install gedit -y;
sudo gedit /etc/systemd/logind.conf;

and paste these lines at the end of the file:

HandlePowerKey=suspend
PowerKeyIgnoreInhibited=yes

and use keys Ctrl+S to save it.

  • Restart your laptop.

The power button should suspend your laptop now.

1

This doesn't quite solve anything for Lubuntu 18.04, but LXQt has new settings for power button in Power Management in lxqt-powermanagement version 0.16.0. Lubuntu 18.04 has version 0.12.0, the current LTS Lubuntu 20.04 has vaersion 0.14.1 and 20.10 uses version 0.15.0.

I hope that the new version will soon be included in Lubuntu, but until then there are some instructions how to build and install the latest version on the projects GitHub page.

This is just to note, that the required setting may some day be readily available in Lubuntu, without the need to install gnome-settings-daemon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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