1

I have read the post on "What is suspend".

However, I would like to know exactly which ACPI Global State does pressing the Suspend button lead to. Can someone explain this?

Specifically, how do I know if pressing the Suspend button in Ubuntu 16.04 will lead to S1, S2, S3, S4, or S5? Is this determined by setting in the UEFI/BIOS or Ubuntu or both?

3 Answers 3

2

It depends on Ubuntu (and the BIOS capabilities). It couldn't be any other way because the operating system needs to coordinate a great deal of things to enter any state above S2. The BIOS may however inform the operating system that it would like to enter a particular state.

There are two suspension modes in Ubuntu, Linux and modern PCs in general:

  • Suspend-to-RAM (ACPI S3) powers off the CPU and all other devices unless they indicate that they need to stay on in S3. The main memory (RAM) retains its power supply and maintains the system state for later resumption.

  • Suspend-to-disk or "hibernate" (ACPI S4) saves the system state to a non-volatile storage medium, typically a hard drive or SSD, and powers off the system entirely. The operating system can see the stored system image on reboot and choose to resume from it.

    It's not enabled or exposed to Ubuntu desktop users by default these days.

The other ACPI global states you mention are:

  • S1 and S2 are states with less power saving potential but quicker resumption. These are not typically considered suspension state but a computer may choose to enter them automatically as soon as the CPU is unused for a few milliseconds. This is typically done by the CPU and BIOS without direct interaction of the operating system.

  • Power-off (S5) means exactly what you'd think it does.

(Source)

5
  • @ David Thanks but your reply only elaborated the definition of the power states. Other posts has explained these. My question has not been answered: "Specifically, how do I know if pressing the Suspend button in Ubuntu 16.04 will lead to S1, S2, S3, S4, or S5? Is this determined by setting in the UEFI/BIOS or Ubuntu or both?"
    – Sun Bear
    May 17, 2016 at 4:41
  • Read the first line of my answer again: "It depends on Ubuntu […]." May 17, 2016 at 10:06
  • I relations to my 2nd question, I believe you are saying in general BIOS/UEFI tell Ubuntu its power state setting but Ubuntu (or specifically Linux) may override that setting. Do you happen to know the answer to my 1st question, i.e. (paraphrased) in which ubuntu/linux file is the power state of the system defined in? Btw, I just learned about the commands acpi, acpitool & acpid and am reading through them. They look informative. There is also another useful site I came across 01.org/linux-acpi/utilities which I think is worth a read.
    – Sun Bear
    May 20, 2016 at 6:57
  • Unfortunately I don't know that but I would guess that it's some kernel parameter under /sys. May 20, 2016 at 9:54
  • I have concluded the answer to my question is the UEFI/BIOS instead of your answer. I have posted an answer with the links that help me arrive at this conclusion.
    – Sun Bear
    May 21, 2016 at 10:47
1

Q1. How do I know if pressing the Suspend button in Ubuntu 16.04 will lead to S1, S2, S3, S4, or S5?

Ans1: On my system, I found the information in the file /proc/acpi/wakeup. Also, the commands acpitool -w or acpitool -e present the same information as that found in /proc/acpi/wakeup.

Q2. Is this (i.e. ACPI Global State) determined by settings in the UEFI/BIOS or Ubuntu or both?

Ans2: The answer is UEFI/BIOS. It is possible to amend the UEFI/BIOS defined ACPI Global State in Ubuntu, however any changes are only to be done for debugging and development purposes.

According to Linux/ACPI, "DSDT modification is for debugging and development only". Also, "DSDT is an acronym for Differentiated System Description Table. This table contains the Differentiated Definition Block, which supplies the information and configuration information about the base system. It is always inserted into the ACPI Namespace by the OS at boot time.".

According to IntelOpenSource.org Linux*-ACPI:

The DSDT (Differentiated System Description Table) is the primary AML table in the BIOS. Per the description of acpidump, the DSDT can be extracted from the machine, the ASL modified, and a new AML DSDT can be compiled. The sections below show two ways to tell Linux to use this modified DSDT instead of the version that came with the BIOS.

Note that overriding the DSDT is a debugging technique only. It is not a viable way to run a production system, as no vendor would support a system when the customer has modified the system firmware, and no Linux Distributor could possibly support modified system firmware either.

In the early days of Linux ACPI, DSDT modifications were common to work around both BIOS bugs and Linux bugs. However, the stated goal of the Linux ACPI project today is that Linux should run on unmodified firmware. Thus, the DSDT database at the old acpi.sourceforge.net web site is now largely a historical artifact.

For detail understanding on ACPI and the Global state and S-states, a good read is the "Advanced Configuration and Power Interface Specification" from www.acpi.info.

0

From my experience, suspension state will be determined by BIOS. On one of my PCs the power state in BIOS can be set to 'S3' or 'Disabled'. Setting 'S3' makes the PC to go into suspension/'stand by'. Setting it to 'Disabled' makes the PC to go into S1, because the processor's fan keeps spinning. Hibernation is always 'S4', as well as power off - 'S5'.

1
  • Thanks Alexiy. I agree with you it is the BIOS/UEFI. Thanks. I have posted an answer with the links to support this conclusion.
    – Sun Bear
    May 21, 2016 at 10:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .