I'm on Kubuntu 14.04.3 on a ThinkPad X250.
I tried to configure what happens when I close my laptop lid or when I press my power button in the "Configure Energy Saving" dialog in the "System Settings". But no matter what I choose (Sleep, Turn Off screen, Lock Screen, Shutdown) nothing happens if I press the power button or close the laptop lid. It used to work on my ThinkPad X230.
I have a couple of "activities" that had custom settings for energy saving, but now I set them all to "Don't use special settings".
I'm aware of Power button in Lubuntu 13.10 will not suspend. I tried the solution but it did not work for me.
When I perform Sleep, Restart, Shut down, etc.from the launcher menu everything works fine. I can also perform these actions from the terminal using the shutdown
command and I can suspend the machine using 'pm-suspend'.
Following this answer to a related question I added
logger in /etc/acpi/powerbtn.sh, presumably "Power button pressed"
to /etc/acpi/powerbtn.sh
. Now, if I do sudo /etc/acpi/powerbtn.sh
an entry in /var/log/syslog
is made. However, if I press the power button no entry is made, so I guess this script is not executed when I press the power button.
Following this question I made a script that prints out the value of
/proc/acpi/button/lid/LID/state
every second. Opposing to what was reported there the LID state is correctly detected.
I ran 'acpi_listen'. I get a message when closing and opening the lid:
button/lid LID close
button/lid LID open
However, I do not get a message when pressing the power button. So does that mean that the "closing the lid" and the "power button" problem are unrelated? I realized that in '/etc/acpi/' and '/etc/acpi/events' there seem to be no files handling lid close:
$ ls /etc/acpi/events/
asus-keyboard-backlight-down asus-wireless-off ibm-wireless powerbtn tosh-wireless
asus-keyboard-backlight-up asus-wireless-on lenovo-undock thinkpad-cmos
$ ls /etc/acpi/
asus-keyboard-backlight.sh asus-wireless.sh events ibm-wireless.sh powerbtn.sh tosh-wireless.sh undock.sh
I also run Windows on the same machine and there the power button and closing the lid works normally, so it cannot be a mechanical defect.
Any ideas how I can make my Laptop go to sleep when I press the power button or close the laptop lid?
sudo shutdown now
in your terminal. I do realize that this isn't sleep.sudo shutdown now
like David suggested?