From the terminal you can do everything, in this case I will show how to know if your computer supports entering sleep or hibernation mode, and if it can how to do it.
To know if your computer can suspend and / or hibernate, we must read what is in the / sys / power / state file
cat /sys/power/state
If "mem" appears in the results, it means that we can suspend the computer. If "disk" appears it means that we can hibernate.
Both to suspend and to hibernate we need administrative privileges, so we must either execute the commands as root or with sudo.
Lay off:
To suspend we will use pm-suspend
sudo pm-suspend
Hibernate:
To hibernate we will use pm-hibernate
sudo pm-hibernate
Sleep and Hibernate at the same time:
If your computer supports both, that is, suspend and hibernate, you can use a hybrid of both.
sudo pm-suspend-hybrid
What does this allow?
This is a suspension like the first command I showed you, but in addition to suspending, a system image is saved, that is, suspend + hibernate.
Let me explain better, if they leave the laptop in suspension and they are left with 0% battery when starting the laptop, the system would start in white, while with this command in theory, it suspends the system but if we run out of power when starting the laptop we will not have lost anything, because the image that was saved when suspending will be used + hibernate
The end!
Well, I hope you found it interesting.
regards
I get «mem disk» 😀
Then you can suspend and hibernate 🙂
Let's see in my system:
root @ debian: ~ # cat / sys / power / state
freeze memory disk
root @ debian: ~ # pm-
pm-hibernate pm-is-supported pm-powersave pm-suspend pm-suspend-hybrid
In my system, what I use is the 'hibernate' program, having known that it already had tools.
Thanks for the Tip.
@ proxy server: ~ $ cat / sys / power / state
freeze memory disk
Very good, so now I will use sudo pm-suspend-hybrid, for more security, Regards
Sandy, do a review of the post .. ..it has a lot of repeated text .. not stable ..
Ready, thank you very much. I don't know where my head is lately… ^ - ^ U
I have used these commands for a long time, in addition to init 0, poweroff or shutdown -h now because for unknown reasons the gnome takes a minute to react to these commands
Added to favorites.
Thanks man ;)!
Thanks for the info!
Regards,
Thanks for sharing the tip, I just saw it and remembered that I was looking for a long time, now I just need to find how to copy the clipboard by console.
Thanks for the contribution and great blog 😉
For nothing, a pleasure.
About the clipboard, check here if there is something that works for you: https://blog.desdelinux.net/tag/clipboard/
I think they had put an article here on that, just in case xclip helps you get from the console to applications, in debian it is in the repository.
Thank you very much, my computer is compatible to suspend and hibernate, I use Kubuntu 14.04 (64) and I already added it to do the process.
Hi all!
With the command:
cat / sys / power / state
I get:
freeze memory disk
and I was able to do the tests indicated in this article, but I have a password enabled to start the system and after returning from suspension and hibernation using the Terminal with the commands:
sudo pm, the system starts where it was without asking for the password, and that is strange because if I suspend in the usual way using the graphical interface, when it comes back from suspension it always asks me for the password.
Thanks for the commands, but how to return from sleep or hibernation? My laptop is left with the screen black and on, and nothing I press takes me back to the system, so I have to force it off.
I wrote the command cat / sys / power / state
I got the following: freeze mem disk
typing sudo pm-suspend suspends the pc
typing sudo pm-hibernate shuts down the screen for a second and then returns to normal. Before having Ubuntu 14.04 I had Windows 8.1 and I could hibernate the computer, what do you think is my problem?
The same happens to me. According to this article it should be able to hibernate but I don't know why it doesn't work.
By using the command:
cat / sys / power / state
the answer is:
freeze memory disk
I use Ubuntu 14.04, but I also have Windows on this PC. Ubuntu's partition is 4GB ext20 and SWAP is 6,0GB, equal to the size of RAM (from what I understood to hibernate SWAP is used). I don't know if a bigger partition is necessary or if I am missing something else. Hopefully someone can help me.
Thank you, your tutorial helped me a lot, I am new to the Linux environment and with it I want to exploit what I did not do in Windows. Just an observation, and how do I get back to taking control of my lap?
uuups, I already saw in the comments how to recover the state of the lap, thank you very much
My laptop supports many options, I already tried them in the console and everything. Ok, my question is, how do I add these options in Gnome? Since the system only gives me the option to Shut Down and Block, the latter only turns off the monitor and locks the session, but it remains on.
I want it to be suspended when closing the lid of the laptop so that I can move it more comfortably, but I don't have those options, in the Power option it appears disabled.
Greetings.
it tells me standby mem disk
Thank you very much for sharing this, I threw "freeze standby mem disk", the other two words will matter of anything?
Do you know if there is any way I can turn off the screen? I have been using the xset but the screen remains black and does not turn off at all .. It would be to be able to turn off a screen from the mobile with a raspberry pi2 by ssh .. Thank you very much and congratulations for the tutorial 🙂
How can I remove the option to hibernate. Since I activate it, the battery lasts very little. I attribute it to this… it helps !!!
Thanks for the tutorial usemoslinux.
Thanks, it worked perfectly! Let's use Linux Ubuntu
Men, sorry I tried it but it didn't work for me with version 16.04. Greetings and thank you very much
Not working !
sudo: pm-hibernate: command not found
sudo: pm-suspend-hybrid: command not found
solution:
sudo apt-get install pm-utils
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
done!
https://command–not–found-com.translate.goog/pm-suspend-hybrid?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=es-419&_x_tr_pto=sc