Modern desktop and (especially) mobile processors use a number of energy-saving technologies: ODCM, CxE, EIST, etc. Today we will be interested in perhaps the highest level of them: flexible control of the frequency and voltage of the processor core during operation - Cool 'n ' Quiet, PowerNow! for AMD and Enhanced SpeedStep (EIST) for Intel. Most often, a computer or laptop user simply needs to enable (check a box) support for a particular technology in the BIOS and/or operating system - no fine-tuning is usually provided, although, as practice shows, it can be very useful. In this article I will talk about how you can control the operating voltage of the processor core from the operating system (using the example of Intel Pentium M and FreeBSD), and why this might be needed.
Despite the large number of manuals, it is rare to find a detailed description of Enhanced SpeedStep technology from the point of view of the operating system (rather than the end user), especially in Russian, so a significant part of the article is devoted to implementation details and is somewhat theoretical in nature.
I hope this article will be useful not only for FreeBSD users: we will also touch a little on GNU/Linux, Windows and Mac OS X. However, in this case the specific operating system is of secondary importance.
Preface
Last year, I upgraded the processor in my old laptop: I installed a Pentium M 780 instead of the standard 735, and pushed it to the maximum, so to speak.
The laptop began to heat up more under load (due to the heat dissipation increasing by 10 W); I didn’t pay much attention to this (except that I cleaned and lubricated the cooler just in case), but one fine day, during a long compilation, the computer... simply turned off (the temperature did reach a critical hundred degrees). I displayed the value of the system variable hw.acpi.thermal.tz0.temperature in the tray in order to monitor the temperature and, if anything happens, interrupt the “heavy” task in time. But after some time I lost my vigilance (the temperature always remained within the normal range), and everything happened again. At this point, I decided that I no longer wanted to constantly fear a crash during a long CPU load and keep my hand on Ctrl-C, nor to force the processor. Typically, changing the standard voltage means increasing it in order to ensure stable operation of the processor during overclocking (i.e. at an increased frequency). Roughly speaking, each voltage value corresponds to a certain range of frequencies at which it can operate, and the overclocker’s task is to find the maximum frequency at which the processor does not “glitch” yet. In our case, the task is in some sense symmetrical: for a known frequency (more precisely, as we will soon find out, a set of frequencies), find the lowest voltage that ensures stable operation of the CPU. I don’t want to lower the operating frequency, so as not to lose performance - the laptop is already far from top-end. In addition, lowering the voltage is more profitable.
Settings scenarios
I want the processor to work only at the minimum frequency:
I want the processor to constantly operate at maximum frequency:
The processor operates at a maximum of half the frequency:
If you have a 3 GHz processor, then with these settings a maximum of 1.5 GHz will work. To ensure that the processor does not reduce the frequency when idle, but always works at 1.5, also set the minimum processor state to 50%.
By the way, to apply the settings, you can click not OKAY, but APPLY. Thus, the window will continue to hang - you can continue to work and test changes. And if anything happens, play with the settings, they are always at hand
I hope I managed to explain everything normally and clearly
A little theory
As you know, the heat dissipation of a processor is proportional to its capacity, frequency and square of voltage (those who are interested in why this is so can try to derive the dependence on their own, considering the processor as a set of elementary CMOS inverters (logical negators), or follow the links: one, two, three ).
Modern mobile processors can consume up to 50-70 W, which ultimately dissipates into heat. This is a lot (remember incandescent lamps), especially for a laptop, which in offline mode under load will “eat” the battery like that pig eats oranges. In confined spaces, heat will most likely have to be actively removed, which means additional energy consumption to rotate the cooler fan (possibly several).
Naturally, this state of affairs did not suit anyone, and processor manufacturers began to think about how to optimize power consumption (and, accordingly, heat transfer), and at the same time prevent the processor from overheating. For those interested, I recommend reading a number of wonderful articles by Dmitry Besedin, and in the meantime I’ll get straight to the point.
What does reducing the CPU clock speed do?
The problem is more relevant on a laptop than on a computer, although in the case of a desktop PC this method may be useful. Lowering this setting reduces the computer's power consumption.
In the case of a stationary computer, this is simply a minor energy saving. In the case of a laptop, this can increase the life of the device in offline mode, that is, on battery power. Exactly how much savings you can squeeze out depends on the battery capacity and performance of the laptop.
With less electrical current supplied, the CPU heats up less. Thanks to automatic adjustment of the cooling system, the CPU cooler rotates more slowly and, accordingly, makes less noise.
Also, reducing the clock frequency helps prevent the “stone” from overheating - it can be used as a temporary solution until you buy a new part or upgrade the cooling system. Here are, in fact, three main reasons why it may be necessary to reduce this indicator for the CPU. Now let's talk about how to do it.
A little history
For the first time, SpeedStep technology (version 1.1) appeared in the second generation of third Pentiums (mobile Coppermine for laptops produced using the .18 micron technical process, 2000), which, depending on the load or power source of the computer - network or battery - could switch between high and low frequencies due to a variable multiplier.
In economy mode, the processor consumed approximately half as much energy. With the transition to the .13 micron process technology, the technology receives version number 2.1 and becomes “enhanced” - now the processor can reduce not only the frequency, but also the voltage. Version 2.2 is an adaptation for the NetBurst architecture, and by the third version (Centrino platform) the technology will officially be called Enhanced Intel SpeedStep (EIST).
Version 3.1 (2003) was first used in the first and second generations of Pentium M processors (Banias and Dothan cores). The frequency varied (at first it just switched between two values) from 40% to 100% of the base, in steps of 100 MHz (for Banias) or 133 MHz (for Dothan, our case). At the same time, Intel is introducing dynamic capacity management of the second level cache (L2), which allows for even better optimization of power consumption. Version 3.2 (Enhanced EIST) - adaptation for multi-core processors with a shared L2 cache. (Small FAQ from Intel on SpeedStep technology.)
Now, instead of blindly following numerous howtos and tutorials, let’s download the pdf and try to understand the working principle of EST (I will continue to use this abbreviation, because it is more universal and shorter).
How to reduce the maximum CPU frequency through BIOS
The recommendations given do not depend on the brand of CPU and are equally effective for both Intel and AMD. There is no fundamental difference in their architecture, so the advice can be considered universal. Algorithm of actions:
- Restart the computer and before Windows loads, press one of the keys to enter the BIOS - F2, F12, Del or Esc, depending on the BIOS/UEFI version and the motherboard model.
- Find the appropriate section - MB Tweaker, Quantum BIOS, AI Tweaker or MIB It is called differently in different versions of the Bios.
- Find the item where the clock frequency of the processor bus (FSB) is indicated - a three-digit number marked mHz.
- Find the CPU Ratio parameter (bus multiplier).
- Set a value lower than specified in the initial settings.
- Save changes and restart your computer or laptop.
Important! Your device may already have a minimum multiplier value set. In this case, it will not be possible to reduce CPU performance using the described method.
How EST works
So, EST allows you to control the performance and power consumption of the processor, dynamically, while it is running.
Unlike earlier implementations, which required hardware support (in the chipset) to change the operating parameters of the processor, EST allows software, i.e. using the BIOS or operating system, change the multiplier (the ratio of processor frequency to bus frequency) and core voltage (Vcc) depending on the load, type of computer power source, CPU temperature and/or OS settings (policies). During operation, the processor is in one of several states (power states): T (throttle), S (sleep), C (idle), P (performance), switching between them according to certain rules (p. 386 of the ACPI 5.0 specification).
Each processor present on the system must be described in a DSDT table, most often in the namespace \_PR, and usually provides a number of methods through which it interacts with the operating system (PM driver) and which describe the capabilities of the processor (_PDC, _PPC) , supported states (_CST, _TSS, _PSS) and their management (_PTC, _PCT). The required values for each CPU (if it is included in the so-called CPU support package) are determined by the motherboard BIOS, which fills in the corresponding ACPI tables and methods (p. 11 pdf) when the machine boots.
EST controls the operation of the processor in the P-state, and they will be of interest to us. For example, Pentium M supports six P-states (see Fig. 1.1 and Table 1.6 pdf), differing in voltage and frequency:
In the general case, when the processor is unknown in advance, the only more or less reliable (and recommended by Intel) method of working with it is ACPI. You can interact with a specific processor directly, bypassing ACPI, through MSR registers (Model-Specific Register), including directly from the command line: starting with version 7.2, FreeBSD uses the cpucontrol(8) utility for this.
To find out if your processor supports EST, you can look at the 16th bit in the IA_32_MISC_ENABLE register (0x1A0), it should be set:
# kldload cpuctl # cpucontrol -m 0x1a0 /dev/cpuctl0 | (read _ msr hi lo ; echo $((lo >> 16 & 1))) 1 Similar command for GNU/Linux (requires msr-tools package): # modprobe msr # echo $((`rdmsr -c 0x1a0` > > 16 & 1)) 1 The transition between states occurs when writing to the IA32_PERF_CTL register (0x199). You can find out the current operating mode by reading the IA32_PERF_STATUS (0x198) register, which is updated dynamically (Table 1.4 pdf). In what follows, I will omit the IA32_ prefix for brevity.
Let's first try to read the current value of PERF_STATUS:
# cpucontrol -m 0x198 /dev/cpuctl0 MSR 0x198: 0x0612112b 0x06000c20 From the documentation it follows that the current state is encoded in the lower 16 bits (if the command is executed several times, their value may change - this means that EST is working). If you look more closely at the remaining bits, they are clearly not garbage either. By Googling, you can find out what they mean.
If the problem is the svchost.exe process
There are two possible options here:
- The system process svchosts.exe loads the system
- Under svchosts.exe viruses are disguised
First, you need to figure out which of the two options you have. The first thing you can do is look in the “Task Manager” to see if there are any other suspicious processes; if you find something that does not inspire confidence, then you should use the AVZ program.
Download and run the AVZ program. Go to “Service/Process Manager”, all processes running on the computer will be shown there. The main advantage of AVZ is that the program marks system processes in green. Those. You should take a closer look to see if there is a process called svchosts.exe, which is colored black.
If no third-party processes are detected, then you can try disabling automatic Windows updates .
To disable updates, you need to go to the “ Services ” tab, the easiest way is to press Win + R, in the window that appears, write services.msc and click “OK”. In the window that opens, find the line “ Windows Update ”, double-click on it and select “Startup type” - Disabled, and below click the “Stop” button. Then save the settings and restart the PC.
Structure of the PERF_STATUS register
The data read from PERF_STATUS is represented by the following structure (assuming the data is stored as little-endian): struct msr_perf_status { unsigned curr_psv : 16;
/* Current PSV */ unsigned status : 8; /* Status flags */ unsigned min_mult : 8; /* Minimum multiplier */ unsigned max_psv : 16; /* Maximum PSV */ unsigned init_psv : 16; /* Power-on PSV */ }; Three 16-bit fields are the so-called Performance State Values (PSV), we will look at their structure below: the current PSV value, the maximum (depending on the processor) and the value at system start (when turned on). The current value (curr_psv) obviously changes when the operating mode changes, the maximum (max_psv) usually remains constant, the starting value (init_psv) does not change: as a rule, it is equal to the maximum value for desktops and servers, but the minimum for mobile CPUs. The minimum multiplier (min_mult) for Intel processors is almost always six. The status field contains the value of some flags, for example, when the EST or THERM events occur (that is, when the P-state changes or the processor overheats, respectively). Now that we know the purpose of all 64 bits of the PERF_STATUS register, we can decipher the word we read above: 0x0612112b 0x06000c20
⇒ PSV at start 0x0612, maximum value 0x112b, minimum multiplier 6 (as expected), flags cleared, current PSV value = 0x0c20. What exactly do these 16 bits mean?
CPU load due to overheating
The key parameter for stable operation of a computer is its temperature. If the CPU begins to overheat, then the user notices unstable system operation, freezes, blue screens and sudden PC shutdowns.
Managing processor cores on a computer - programs and built-in system tools
To find out the CPU temperature, you should use third-party programs, for example Aida 64.
A computer can overheat for several reasons :
- Pollution . A computer or laptop requires constant cleaning (every 6-12 months), because during use dust accumulates in it, which impairs the operation of coolers and heat transfer of the radiator, thereby contributing to overheating. Solution : take the computer to a service center to clean it, or open the side cover yourself and carefully but thoroughly remove all accumulated dust. (If you are the owner of a laptop, you will have to take it to the service center)
- Cooler malfunctions . The main task of the cooler is to continuously supply cold air to the radiator to cool the CPU. If it malfunctions, the computer begins to overheat. You can verify the malfunction yourself; you should open the side cover of the computer and see if the cooler rotates normally (if there are any creaks or crackling noises). Solution : If the cooler is really faulty, you should immediately contact a service center to replace it.
- High room temperature . This problem is very relevant in the summer, it is hot at home and outside, therefore, the cooler will draw in hot air. Because of this, its cooling efficiency decreases significantly. Solution : You can open the side cover of the computer yourself and point a regular fan there. Special cooling stands are produced for laptops.
Performance State Value (PSV) Structure
It is very important to know and understand what PSV is, because it is in this form that the processor operating modes are set.
struct psv { unsigned vid : 6; /* Voltage Identifier */ unsigned _reserved1 : 2; unsigned frequency: 5; /* Frequency Identifier */ unsigned _reserved2 : 1; unsigned nibr : 1; /* Non-integer bus ratio */ unsigned slfm : 1; /* Dynamic FSB frequency (Super-LFM) */ }; Dynamic FSB frequency switching specifies to skip every second FSB clock cycle, i.e. reduce the operating frequency by half; this feature was first implemented in Core 2 Duo processors (Merom core) and does not concern us, as does the Non-integer bus ratio - a special mode supported by some processors, which allows, as the name suggests, more precise control of their frequency. Two fields are related to the EST technology itself - frequency identifiers (Frequency Identifier, Fid), which is numerically equal to the multiplier, and voltage (Voltage Identifier, Vid), which corresponds to the voltage level (it is also usually the least documented).
Disabling Turbo Boost
The easiest way to do this is through the power settings in Windows. Yes, of course, after disabling Turbo Boost, performance will drop slightly, but this will only be noticeable when performing a certain range of tasks: for example, converting videos will take a little longer...
But the device will heat up less, make less noise, and will most likely last longer.
And so, first you need to open the control panel, go to the “Hardware and Sound / Power Options” tab. See screenshot below.
Hardware and Sound - Power
Next, open the settings of the current power supply scheme (in my example there is only one).
Setting up the power plan
Then go to the advanced settings settings.
Additional power options
In the “Processor Power Management / Maximum Processor Status” tab, change 100% to 99%, as in the screenshot below. After saving the settings, Turbo Boost should stop working, and you will most likely immediately notice that the temperature has dropped slightly...
Maximum processor health 99%
By the way , you can check whether Turbo Boost works using special. CPU-Z utilities. It shows the current operating frequency of the processor in real time (and knowing the technical characteristics of your CPU, i.e. its operating frequency, you can quickly determine whether Turbo Boost is enabled).
Does Turbo Boost work on a laptop / Screenshot from the previous article as an example
It should be noted that Turbo Boost can also be disabled in UEFI/BIOS (not on all devices!). Usually, to do this you need to set the Turbo Mode parameter to Disabled mode (example in the photo below).
Turbo Boost (UEFI) / Screenshot from previous article
Voltage Identifier
Intel is very reluctant to disclose information (usually an NDA is required) about exactly how the voltage ID is encoded for each processor. But for most popular CPUs, fortunately, this formula is known; in particular, for our Pentium M (and many others): Vcc = Vid0 + (Vid × Vstep), where Vcc is the current (real) voltage, Vid0 is the base voltage (when Vid == 0), Vstep is the step. Table for some popular processors (all values in millivolts):
CPU | Vid0 | Vstep | Vboot | Vmin | Vmax |
Pentium M | 700,0 | 16,0 | xxxx,x | xxx,x | xxxx,x |
E6000, E4000 | 825,0 | 12,5 | 1100,0 | 850,0 | 1500,0 |
E8000, E7000 | 825,0 | 12,5 | 1100,0 | 850,0 | 1362,5 |
X9000 | 712,5 | 12,5 | 1200,0 | 800,0 | 1325,0 |
T9000 | 712,5 | 12,5 | 1200,0 | 750,0 | 1300,0 |
P9000, P8000 | 712,5 | 12,5 | 1200,0 | 750,0 | 1300,0 |
Q9000D, Q8000D | 825,0 | 12,5 | 1100,0 | 850,0 | 1362,5 |
Q9000M | 712,5 | 12,5 | 1200,0 | 850,0 | 1300,0 |
The multiplier (i.e. Fid) is written to PSV shifted 8 bits to the left, the lower six bits are occupied by Vid. Because in our case, the remaining bits can be neglected, then PSV, processor frequency, system bus and physical voltage are related by a simple formula (for Pentium M): Now consider the control register (PERF_CTL). Writing to it should be done as follows: first, the current value (the entire 64-bit word) is read, the necessary bits are changed in it, and written back to the register (the so-called read-modify-write).
Table _PSS
The _PSS table is an array of states ( Package
in ACPI terminology) or a method that returns such an array; each state (P-state) in turn is defined by the following structure (p. 409 of the ACPI specification): struct Pstate { unsigned CoreFrequency; /* Core CPU operating frequency, MHz */ unsigned Power; /* Maximum power dissipation, mW */ unsigned Latency; /* Worst-case latency of CPU unavailability during transition, µs */ unsigned BusMasterLatency; /* Worst-case latency while Bus Masters are unable to access memory, µs */ unsigned Control; /* Value to be written to the PERF_CTL to switch to this state */ unsigned Status; /* Value (should be equal to the one read from PERF_STATUS) */ }; Thus, each P-state is characterized by some operating frequency of the core, maximum power dissipation, transit delays (in fact, this is the transition time between states during which the CPU and memory are unavailable), finally, the most interesting: PSV, which corresponds to this state and which must be written to PERF_CTL in order to move to this state (Control). To ensure that the processor has successfully transitioned to a new state, you need to read the PERF_STATUS register and compare it with the value recorded in the Status field.
The EST driver of the operating system can “know” about some processors, i.e. will be able to manage them without ACPI support. But this is rare, especially these days (although for undervolting on Linux, somewhere before version 2.6.20, it was necessary to patch the tables in the driver, and back in 2011 this method was quite common).
It is worth noting that the EST driver can work even if there is no _PSS table and an unknown processor, because the maximum and minimum values can be found from PERF_STATUS (in this case, obviously, the number of P-states degenerates to two).
Why this might not work for Zen 2
announcements and advertising
2080 Super Gigabyte Gaming OC for 60 rubles.
Compeo.ru - the right comp store without any tricks
RTX 2060 becomes cheaper before the arrival of 3xxx
Ryzen 4000
series included in computers already in Citylink
The price of MSI RTX 2070 has collapsed after the announcement of RTX 3xxx
Core i9 10 series is half the price of the same 9 series
The price of memory has been halved in Regard - it’s more expensive everywhere
I would like to immediately warn owners of Ryzen processors with Zen 2 architecture ( Ryzen 5 3600, etc.), this method may not be suitable for you. Not because Zen 2 processors are bad in any way. It’s just that processors are becoming more and more complex before our eyes, and using the example of Zen 2 we see that the manufacturer was able to squeeze out not only the overclocking potential of the chips to the maximum, but also the ability to reduce power consumption.
If you apply the methods in this guide to a Zen 2 processor, power consumption will drop, but performance may also drop. Test performance thoroughly before and after reducing voltage.
However, the community of users of Ryzen processors does not sit idly by and is constantly improving something on its own. For example, our conference user 1usmus was able to create a power saving profile for Zen 2 that gives higher frequencies under load.
Therefore, I would not be at all surprised if the problem of improving the energy efficiency of Zen 2 can also be solved. Link to Zen 2 voltage reduction study from gamersnexus.net.
Enough theory. What to do with all this?
Now that we know 1) the purpose of all the bits in the necessary MSR words, 2) exactly how PSV is encoded for our processor, and 3) where to look for the necessary settings in DSDT, it’s time to create a table of default frequencies and voltages.
Let's dump DSDT and look for the _PSS table there. For Pentium M 780 it should look something like this: Default _PSS values
Name (_PSS, Package (0x06) { // A total of 6 states are defined (P-states) Package (0x06) { 0x000008DB, // 2267 MHz (cf. Fid × FSB clock) 0x00006978, // 27000 mW 0x0000000A, // 10 µs (meets spec) 0x0000000A, // 10 µs 0x0000112B, // 0x11 = 17 (multiplier, Fid), 0x2b = 43 (Vid) 0x0000112B }, Package (0x06) { 0x0000074B, // 1867 MHz (82% of maximum) 0x000059D8, // 23000 mW 0x0000000A, 0x0000000A, 0x00000E25, // Fid = 14, Vid = 37 0x00000E25 }, Package (0x06) { 0x00000640, // 1600 MHz (71% of maximum) 0x 00005208, // 21000 mW 0x0000000A, 0x0000000A , 0x00000C20, // Fid = 12, Vid = 32 0x00000C20 }, Package (0x06) { 0x00000535, // 1333 MHz (59% of maximum) 0x00004650, // 18000 mW 0x0000000A, 0x0000000A, 0x00000A1C, // Fid = 10, Vid = 28 0x00000A1C }, Package (0x06) { 0x0000042B, // 1067 MHz (47% of maximum) 0x00003E80, // 16000 mW 0x0000000A, 0x0000000A, 0x00000817, // Fid = 8, Vid = 23 0x00000817 }, Package (0x06 ) { 0x00000320, // 800 MHz (35% of maximum) 0x000032C8, // 13000 mW 0x0000000A, 0x0000000A, 0x00000612, // Fid = 6, Vid = 18 0x00000612 } })
So, we know the default Vi d for each P-level : 43, 37, 32, 28, 23, 18, which corresponds to voltages from 1388 mV to 988 mV.
The essence of undervolting is that these voltages are probably somewhat higher than what is actually necessary for stable operation of the processor. Let's try to determine the “boundaries of what is permitted.” I wrote a simple shell script for this, which gradually lowers Vid and performs a simple loop (the powerd(8) daemon must be killed before this, of course). Thus, I determined the voltages that would at least allow the processor not to freeze, then I ran the Super Pi test several times and reassembled the kernel; Later, I raised the Vid value for the two maximum frequencies by one more point, otherwise gcc would occasionally crash due to an illegal instruction error. As a result of all the experiments over several days, the following set of “stable” Vids was obtained: 30, 18, 12, 7, 2, 0.
Results
Ryzen nothing complicated about lowering the voltage . Essentially, this is the same overclocking where we test combinations of frequency and voltage, but we need to pay closer attention to intermediate loads and idle conditions.
Only with such a reduction in voltage did my Ryzen 5 1600 begin to fit within the rated 60 watts. The temperature and noise from the cooler have decreased. For operation without overclocking, this is the most optimal mode.
This procedure will be especially useful for owners of inexpensive motherboards whose power supply system is weak and overheats.
Analysis of results
Now that we have empirically determined the minimum safe voltages, it is interesting to compare them with the original ones:
Frequency, MHz (multiplier) | Vidold | Vidnew | Vcc change |
2267 (17) | 43 | 30 | -15% |
1867 (14) | 37 | 18 | -24% |
1600 (12) | 32 | 12 | -26% |
1333 (10) | 28 | 7 | -29% |
1067 (8) | 23 | 2 | -31% |
800 (6) | 18 | 0 | -29% |
Reducing the maximum voltage even by 15% brought quite noticeable results: long-term load not only no longer leads to processor overheating and emergency shutdown, but the temperature now almost never exceeds 80°C.
The predicted battery life in “office” mode, judging by acpiconf -i 0, increased from 1 hour 40 m to 2 h 25 m. (Not so much, but lithium-ion cells get tired over time, and I haven’t changed the battery since I bought the laptop about seven years ago.) Now we need to make sure that the settings are applied automatically. You can, for example, modify the cpufreq(4) driver so that PSV values are taken from its own table, rather than via ACPI. But this is inconvenient if only because you need to remember to patch the driver when updating the system, and in general it looks more like a dirty hack than a solution. You can probably patch powerd(8) somehow, which is bad for about the same reasons. You can simply run the script, lowering the voltage by directly writing to the MSR (which, in fact, is what I did to determine the “stable” voltages), but then you will have to remember and independently process transitions between states (not only P-states, but any at all, for example, when the laptop wakes up from sleep). That's not the point either.
If we receive PSV values via ACPI, then it is most logical to change the _PSS table in DSDT. Fortunately, you don’t have to tinker with the BIOS for this: FreeBSD can load DSDT from a file (we’ve already written about modifying ACPI tables on Habré, so we won’t dwell on this in detail now). Replace the required fields in DSDT:
Undervolting patch for _PSS
@@ -7385.8 +7385.8 @@ 0x00006978, 0x0000000A, 0x0000000A, - 0x0000112B, - 0x0000112B + 0x0000111D, + 0x0000111D }, Package (0x06) @@ -7395.8 +7395.8 @@ 0x000059D8, 0x0000000A, 0x0000000A, — 0x00000E25, — 0x00000E25 + 0x00000E12, + 0x00000E12 }, Package (0x06) @@ -7405.8 +7405.8 @@ 0x00005208, 0x0000000A, 0x000000 0A, - 0x00000C20, - 0x00000C20 + 0x00000C0C, + 0x00000C0C }, Package ( 0x06) @@ -7415.8 +7415.8 @@ 0x00004650, 0x0000000A, 0x0000000A, - 0x00000A1C, - 0x00000A1C + 0x00000A07, + 0x00000A07 }, Package (0x06) @@ - 7425.8 +7425.8 @@ 0x00003E80, 0x0000000A, 0x0000000A, — 0x00000817, — 0x00000817 + 0x00000802, + 0x00000802 }, Package (0x06) @@ -7435.8 +7435.8 @@ 0x000032C8, 0x000000 0A, 0x0000000A, — 0x00000612, — 0x00000612 + 0x00000600, + 0x00000600 } } )
We compile a new AML file (ACPI bytecode) and modify /boot/loader.conf so that FreeBSD loads our modified DSDT instead of the default one: acpi_dsdt_load=”YES” acpi_dsdt_name=”/root/undervolt.aml” That’s basically it All.
The only thing is, don’t forget to comment out these two lines in /boot/loader.conf if you change the processor. Even if you are not going to lower the standard voltages, the ability to configure the management of processor states (not just P-states) can be useful. After all, it often happens that a “crooked” BIOS fills the tables incorrectly, incompletely, or does not fill them in at all (for example, because there is a Celerone that does not support EST, and the manufacturer does not officially provide for its replacement). In this case, you will have to do all the work yourself. Note that adding just the _PSS table may not be enough; Thus, C-states are specified by the _CST table, and in addition, it may be necessary to describe the control procedures themselves (Performance Control, _PCT). Fortunately, this is not difficult and is described in quite detail, with examples, in chapter eight of the ACPI specification.
CPU usage for no reason
It happens that in the standard Task Manager utility, processes that load the CPU are not visible, but the processor is still loaded at 100 percent for no reason. In such cases, you can turn to third-party programs .
Can't connect via Wi-Fi in Windows 10
Process Explorer is a program presented directly by Microsoft that will show absolutely all existing processes on the user’s PC and help get rid of them.
Let's look at the program in more detail.
System idle process is the % indicator of system inactivity . At the top of the screenshot you can see that the central processing unit (CPU) is not under load. This is normal operation of the PC, taking into account that there are no “heavy” programs running on it.
Interrupts is the percentage of system interrupts (during normal operation it should not exceed a couple of percent). In the second part of the screenshot, its indicator is several times higher than the norm, therefore, it is the culprit for the PC slowdown.
It is also common that the system slows down due to the svchosts.exe process. various viruses are often disguised as it . Next, we'll figure out how to get rid of them.
Once you have found the process that is loading your PC, you can begin to reduce CPU usage.
If the problem is Interrupts, then most likely the drivers are to blame , or rather their incompatibility with Windows or conflicts with each other.
It is worth paying attention to the drivers: chipset, motherboard, video card, Wi-Fi module, sound and network adapter.
Undervolting in GNU/Linux
To tell you the truth, at first I thought all I could do was read the Gentoo Undervolting Guide and just adapt it for FreeBSD.
This turned out to be not so simple, because the document turned out to be extremely stupid (which is actually strange for the Gentoo Wiki). Unfortunately, I didn’t find anything similar on their new website, so I had to be content with the old copy; and although I understand that this guide has lost much of its relevance, I will still criticize it a little. For some reason, they immediately, without declaring war, offered me to patch the kernel (in FreeBSD, for a minute, we didn’t have to modify any system code at all). Enter into the driver’s internals or write into some init scripts the values of certain “safe” voltages, obtained by someone unknown and how, from a special table (in which the Pentium M 780 is mockingly represented by a line consisting of only question marks). Follow advice, some of which is written by people who clearly have no idea what they are talking about. And most importantly, it is completely unclear why and how exactly these magical replacements of some numbers with others work; there is no way to “touch” EST before patching something and rebuilding the kernel, and there is never any mention of MSR registers and working with them from the command line. Modification of ACPI tables is not considered as an alternative or preferable option.
ThinkWiki has a slightly better (and newer) guide, but not much. The ArchWiki page looks even more succinct. This line especially delivers:
# echo 34 26 18 12 8 5 > /sys/devices/system/cpu/cpu0/cpufreq/phc_vids Just like Lost’s “4, 8, 15, 16, 23, 42” (though in reverse order, which somewhat spoils joke).
Perhaps the most sensible description of the entire process for Linux is from Pat Earley, the link to which I gave above.
Finding and removing viruses
If the CPU load problem is a virus, then it can be tracked in the manager or Process Explorer. Viruses are often disguised as system processes so that the user cannot remove them. Most often, this process is svchosts.exe, which creates problems with recognizing a virus in it, even for an experienced user.
Ways to fix kernel power error with event code 41
To recognize viruses, you need to boot into “ Safe Mode ”.
If you have Windows XP, 7 , when booting your PC, press F8 so that a “black” window appears, in which you select to boot in “Safe Mode”.
Windows 8, 8.1, 10 – you need to press Win+R, enter the msconfig command, go to the “Boot” section, click on Windows OS and check the “ Safe Mode ” box, save and restart the PC.
Once you are in Safe Mode, you can start scanning for viruses. There are enough programs on the Internet that check your PC for viruses without installation. One of these is Dr.Web Cureit. This can help relieve stress.
Undervolting on Windows and Mac OS X
There’s no point in talking much about Windows: there’s software and discussions on forums, so I’ll just leave a couple of links here.
Makos interacts quite closely with (and expects correct operation) ACPI, and modifying tables is one of the main methods of customizing it for specific hardware. Therefore, the first thing that comes to mind is to dump and patch your DSDT in the same way. Alternative method: google://IntelEnhancedSpeedStep.kext, for example, one, two, three.
Another “wonderful” utility (fortunately, already outdated) offers to buy for $10 the ability to change the voltage and frequency.