Skip to main content

How to recover Ubuntu System from suspend mode

Types of Suspend
  1. standby – Standby offers little power savings, but restoring to a running system is very quick. This is the default mode if you omit the -m switch.
  2. mem – Suspend to RAM. ...
  3. disk – Suspend to disk. ...
  4. off – Turn the computer off completely. ...
  5. no – Don't suspend the computer immediately, just set the wakeup time.
What is suspend mode in Ubuntu?

Suspend mode is a special low-power mode, often used on laptops, that preserves the contents of RAM while conserving power. There are two main forms of suspend - suspend-to-RAM and suspend-to-disk (also known as "software suspend" or "hibernation"). Suspend-to-RAM uses more power, but is almost instant

How do I turn off auto suspend in Ubuntu?
  1. Install gnome-tweak-tool: sudo apt install gnome-tweak-tool.
  2. Run gnome-tweaks .
  3. Change the option under "Power" for "Suspend when laptop lid is closed" to "off".
How to Enable Hibernate in Ubuntu
  1. Test if hibernate works on your machine. 
  2. To re-enable hibernate, run the command to edit the configuration file: sudo nano /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla. 
  3. “[Disable hibernate by default in upower]” and “[Disable hibernate by default in logind]”
How to automatically wake up Linux system

The rtcwake command requires root permissions, so it must be run with sudo on Ubuntu and other Ubuntu-derived distributions. On Linux distributions that don’t use sudo, you’ll have to log in as root with the su command first.

Here’s the basic syntax of the command:

sudo rtcwake -m [type of suspend] -s [number of seconds]

For example, the following command suspends your system to disk (hibernates it) and wakes it up 60 seconds later:

sudo rtcwake -m disk -s 60


Seconds vs. Specific Time

The -s option takes a number of seconds in the future. For example, -s 60 wakes your computer up in 60 seconds, while -s 3600 wakes your computer up in an hour.

The -t option allows you to wake your computer up at a specific time. This switch wants a number of seconds since the Unix epoch (00:00:00 UTC on January 1, 1970). To easily provide the correct number of seconds, combine the date command with the rtcwake command.

The -l switch tells rtcwake that the hardware clock is set to local time, while the -u switch tells rtcwake that the hardware clock (in your computer’s BIOS) is set to UTC time. Linux distributions often set your hardware clock to UTC time and translate that to your local time.

For example, to have your computer wake up at 6:30am tomorrow but not suspend immediately (assuming your hardware clock is set to local time), run the following command:

sudo rtcwake -m no -l -t $(date +%s -d ‘tomorrow 06:30’)


My computer is suspended and is not resuming

If you suspend your computer and then press a key or click the mouse, it should wake up and display a screen asking for your password. If this does not happen, try pressing the power button (do not hold it in, just press it once).

If this still does not help, make sure that your computer’s monitor is switched on and try pressing a key on the keyboard again.

As a last resort, turn off the computer by holding in the power button for 5-10 seconds, although you will lose any unsaved work by doing this. You should then be able to turn on the computer again.

If this happens every time you suspend your computer, the suspend feature may not work with your hardware.

If your computer loses power and does not have an alternative power supply (such as a working battery), it will switch off.

Comments