CPU power management, ACPI and CPU C states

As the title suggests, I need to know how CPU power management works in Haiku.

My laptop has some CPU incompatibility with what Intel calls “Enhanced Intel SpeedStep Technology” (EIST). Because of that, it won’t accept Windows starting from XP SP2 (because EIST was enabled in SP2).
I can install some Linux distributions choosing “ACPI off” during installation, and then manually disabling C states in the system, along with setting CPU power management to “performance”. I guess I can also choose other static power management options - either specific frequency values or low performance - just not those which dynamically changes frequencies.

Now, Haiku works just fine without changing ANYTHING. I guess EIST support is not included in Haiku, but I doubt it is in Linux, Linux just uses some analogical power management through its ACPI driver.

I wonder what exactly Haiku does differently and if it’s possible to use the same method elsewhere. I cannot just use Haiku alone despite I really like it because I need external monitors support through HDMI and some other specific software.

1 Like

Haiku has ACPI and Intel C-states, and they are enabled by default. If by “EIST” you mean the version of CPU-idle which requires the kernel to change frequencies itself instead of just relying on the CPU to do it by setting an idle state, then yes, we don’t support that.

1 Like


Intel Speed Shift /HWP/ P-States and С-States

i5-8400
Work fine

2 Likes

Wish we had frequency scaling for older AMD CPUs (K8/K10 PowerNow!). I tried to grab some code from {Open,Free}BSD, but I just lack the required skills :smiley:

Edit: CPU frequency scaling - ArchWiki has a good overview of the different drivers Linux uses for different platforms.

Seems I would also need some “speedstep_lib” equivalent for my old Atom N450 netbooks.

But Linux also doesn’t use EIST, nevertheless, my laptop cannot normally work under Linux. There should be something else…

@kim1963 Спасибо, вижу, что всё есть и используется. Значит используется как-то по-другому :slight_smile:

@BiPolar Yeah, I know this article and it actually helped me to make my laptop work on Linux. I have Intel:

Processor: CPU Intel Core 2 Duo Mobile Processor P7350 2,00 GHz
Memory: 2x 2048 MB DDR2 SO-DIMM (PC2-5300/667 MHz) (keine Bank frei, 4 GB max.)
BIOS/Chipsatz: Phoenix (BIOS)Intel PM45 SLB97 (NB)Intel ICH9M SLB8Q (SB)
Display: 15,4" (39,1 cm) WXGA TFT WidescreenAuflösung: 1280 x 800 Pixel (16:9) non Glare
Graphics card: ATI Mobility Radeon HD 3470(onBoard, 256 MB GDDR2)Core-Taktfrequenz: 680 MHzShader-Taktfrequenz: 680 MHzSpeicher-Taktfrequenz: 800 MHzSpeicherschnittstelle: 64-bit
Optical drive: DVDRW SAMSUNG SN S083A
Hard disk: HDD 320GB SATA WD3200BEVT
Sound card: Realtek HDA861 (onBoard)
Network: * LAN (onBoard); 10/100/1000 Mbit; Realtek RTL8168C(P) * WLAN Intel 5100AGN_MMWG 512AN PCIe MiniCard

UPDATE. After using Linux for about a week (I don’t use this laptop every day and if I do it’s no more than for about 2 hours), today I had this defect to appear again out of the blue.

Thus I turned off ACPI completely (I’ve also re-enabled C states and set power management to “ondemand” beforehand).
The issue hasn’t been present since. I don’t know if the system is now able to shut down in case of too much heat on CPU, but the fan is now more silent, so I guess some power management still works. Temperatures has noticeably decreased.

It seems I have no issues so far except I cannot shut down without using the power button.

So, again, ACPI driver/method that is present in Haiku is fundamentally different, there seem to be something more than just C states and frequencies management.

The ACPI driver is based on ACPICA, exactly the same library that everyone else uses. So I doubt it’s fundamentally different, it should be quite similar.

The difference is that Haiku doesn’t do a lot of power management except the idling.

There used to be support for CPU idle on these CPUs but it was broken during introduction of another CPU idle driver. For more info see this topic https://discuss.haiku-os.org/t/question-about-p-states-cpu-frequency-stepping/

2 Likes

Thanks for the pointer! Doubt I have the skills to bring back support for that old Atom N450, but… will be interesting to read those code changes for sure! :smiley:

Thanks. I’ve read this topic, but I’m not sure it applies in my case as I have a bit newer Core 2 Duo processor. Looking at the history of the relevant development, however, it doesn’t look as simple as just implementing the same as what Linux does. Even if the basic library is the same.

Also, while reading this I also thought that maybe it’s not a matter of C states after all, but rather P states, too. Or just general management of everything together. That’s why simply disabling C states (on Linux) wasn’t enough.

My laptop is 14 years old now (I have 3 more, so please do not suggest me to throw it away - each has its own task), I haven’t used it for the past 3-5 years. Nevertheless, despite having this severe malfunction it was working just fine for almost 10 years under WinXP SP1 (including even gaming)! It’s hilarious. Too bad WinXP SP1 is impossible to use nowadays because of lacking software support. Haiku is a great alternative for such machines.

Indeed. This old Atom machine is small and light, and the battery lasts a ton. It’s tedious to use Windows on it but Haiku works fast as lightning. It’s a shame the CPU is always at max frequency and thus generating a lot of heat, otherwise it would be a great Haiku machine.

1 Like

Yes sorry I believe your issue is different, core 2 duo is quite different to the old amd cpus mentioned by @BiPolar, I think.