1

I am having trouble with the suspend option. I have a laptop and I want whenever I close the lid to suspend. I changed it from the Power of the System Settings both for Plugged In and On Battery, but to no avail. I close the lid and it still is on. I tried to suspend it manually from the power button in the top right corner and it shows the same behavior as the Lock option. What can I do? Nothing I found on the web works. It's of importance to me to have the suspend option because of overheating. I should probably say that I am new in the elementary OS. Thank you in advance.

  • is systemctl suspend working? – user170 Dec 6 '17 at 16:23
1

It is probably because you are missing the swap space. Trying adding a swap partition manually. You can check if you have a swap space using free -m If total swap is 0, you need to allocate some space for swap. Usually taken 1.5x Your RAM size.

Create a 4 Gigabyte or more (according to your RAM size) swap file by typing:

sudo fallocate -l 4G /swapfile

Change permissions for your swap file

sudo chmod 600 /swapfile

Now make swap using sudo mkswap /swapfile and then enable the swap partion by typing

sudo swapon /swapfile

  • 2
    First of, thank you for your time. No, I have swap partition. I have 3GB of RAM and i made 4.1GB swap partition. To be sure, I used the free -m command and it shows 3909 total and all of them free right now. But as far as I know, the swap partition is needed for the hibernate option. The suspend option keeps the laptop on, so it keeps everything in the RAM as usual. Maybe it's a bug? Because when I suspend manually from the menu, after 2-3 seconds it locks instead of suspend. – geo1230 Apr 10 '17 at 9:38
  • Try installing pm-utils and then try suspending using pm-suspend. See how that works out. – Shashank Shekhar Apr 10 '17 at 10:10
  • how do i install it? just with sudo apt-get install pm-utils? And what exactly is this? Is there any chance I have this already? Thanks. – geo1230 Apr 10 '17 at 10:36
  • Yes, that is how you install it. Pm-utils is a collection of shell scripts that wrap the kernel mode suspend/resume with the various hacks. These hacks are needed to work around bugs in drivers and subsystems that are not yet aware of suspend. – Shashank Shekhar Apr 10 '17 at 12:16
  • I used the pm-suspend and it says "This utility may only be run by the root user." So, I used sudo pm-suspend, the screen went black for a couple of seconds and then nothing, it returned to the terminal. Now what should I do? – geo1230 Apr 10 '17 at 12:31

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.