# Problems disabling ACPI



## Robert Kopp (Dec 17, 2020)

(I think this is a hardware issue, and that's why I posted it here.) The system uses an ASUS TUF X299 Mark 2 mobo and an Nvidia GTX 970 GPU. (Nvidia cards are of course prone to ACPI problems.)

Anyhow, the system is supposed to be capable of suspend and resume "hw.acpi.supported_sleep_state: S3 S4 S5." After a period of 30 minutes or less of inactivity (which apparently cannot be adjusted) it tries to suspend, but does not resume, requiring a hard reset.  Since I don't always want to turn it off when it is idle for more than 30 minutes, I consider this a problem.

I tried to disable ACPI, setting "set hint.acpi.0.disabled=1." The boot process stops after one second with "panic: running without device atpic requires a local APIC" (Does someone have dyslexia? ACPI is not APIC.)

Can anyone determine the cause of this problem? It could be that, at least with existing hardware, the system is just not fully compatible with FreeBSD. (There are no suspend/resume problems with any other OS on this hardware.)


----------



## Phishfry (Dec 17, 2020)

Disabling all of ACPI on FreeBSD can have bad consequences on modern motherboards.
You would be better off disabling subsystems of ACPI like acpi.thermal settings for example.

From the acpi manpage


> To    disable    the *acpi* driver    completely, set    the kernel environment vari-
> able _hint.acpi.0.disabled_ to 1.
> 
> Some i386 machines    totally    fail to    operate    with some or all of ACPI dis-
> ...


----------



## Robert Kopp (Dec 17, 2020)

Phishfry said:


> Disabling all of ACPI on FreeBSD can have bad consequences on modern motherboards.
> You would be better off disabling subsystems of ACPI like acpi.thermal settings for example.
> 
> From the acpi manpage


It's not clear whether this would help me or not. If, for example, the machine did not unsuccessfully attempt to suspend for a full hour (instead of 30 minutes), it would hardly ever occur during a period of inactivity. If I knew how to do that, I might be satisfied.


----------



## George (Dec 17, 2020)

Is this a generic kernel? FreeBSD doesn't suspend unless you (or some program/script) tells it to do so, right?


----------



## Robert Kopp (Dec 17, 2020)

It's a generic kernel. I suppose I should review the configuration options some time, in case I have a need to  modify it (but perhaps not for this purpose).


----------



## SirDice (Dec 18, 2020)

Robert Kopp said:


> (Does someone have dyslexia? ACPI is not APIC.)


They are related though. ACPI is used to detect the CPU's APIC ID for example.



> There are a number of known bugs in implementations of APIC systems, especially with concern to how the 8254 is connected. Defective BIOSes may not set up interrupt routing properly, or provide incorrect ACPI tables and Intel MultiProcessor Specification (MPS) tables.








						Advanced Programmable Interrupt Controller - Wikipedia
					






					en.wikipedia.org
				






> To begin with, the ACPI MADT table or the MP Specification table should be used to determine the APIC IDs for all CPUs. To better organize the information, a table of structures can be created that contains the information that is different for each CPU (e.g. APIC ID, topology information, etc.).








						Detecting CPU Topology (80x86) - OSDev Wiki
					






					wiki.osdev.org


----------



## Robert Kopp (Dec 18, 2020)

That's going to take a while to digest. Meanwhile, perhaps the best option is the use of software that generates a fake mouse click every 5 minutes or so, to prevent an unsuccessful attempt to suspend.


----------



## SirDice (Dec 18, 2020)

Short version, ACPI is used to detect various bits of hardware on modern systems. The APIC is just one of those bits of hardware, it's a device that manages interrupts.


----------

