Intel power gadget doesn’t work — opencore
§
Using the intel power gadget api on mac os x
Intel® Power Gadget for Mac* is a GUI application that provides real-time data on processor frequency and estimated processor power, and can log frequency, power, energy, and temperature data over time. Intel® Power Gadget also provides a C Application Programming Interface (API) for accessing this power and frequency data in your program. Intel® Power Gadget is also available for Windows* and Linux*. Intel® Power Gadget and the API are only supported on 2nd generation and later Intel® Core processors, because previous processors do not support the necessary power Model Specific Registers (MSRs).
Intro to the Intel® Power Gadget API
The Intel® Power Gadget API is a framework (IntelPowerGadget .framework) that provides a C interface for reading current estimated processor power, current processor frequency, base frequency, thermal design power (TDP), current temperature, maximum temperature, timestamps, and elapsed time. It also provides logging functionality.
What You Need
To use the API you’ll need the Intel® Power Gadget for Mac* driver and framework. These are included in the Intel® Power Gadget installer, or as a standalone API installer. The driver is installed to /System/Library/Extensions/EnergyDriver.kext, and the framework is installed to /Library/Frameworks/IntelPowerGadget.framework.
To link with the Intel® Power Gadget API you simply need to include–framework IntelPowerGadget
in your link command.
Using the Intel® Power Gadget API
To begin you must initialize the library by calling IntelEnergyLibInitialize
.
The most common use of the Intel® Power Gadget API is to read samples with ReadSample. The API supports sampling of specific Model Specific Registers (MSRs). Meta data on the sampled MSRs can be queried with GetNumMsrs
, GetMsrName
, and GetMsrFunc
. GetNumMsrs
returns the number of sampled MSRs; MSRs are given an ID from 0 to n-1, where n is the number returned by GetNumMsrs
. The MSR ID is used to get data for a specific MSR with functions GetPowerData
, GetMsrName
, and GetMsrFunc
.
Calling GetPowerData
for each sampled MSR will provide you with the relevant data from that MSR. An MSR’s function (from GetMsrFunc
) determines the amount and meaning of data returned from GetPowerData
. MSRs with function 0 (frequency) return 1 result, which represents the frequency in megahertz. MSRs with function 1 (power) return 3 results, which represent the average power in watts, cumulative energy in Joules, and cumulative energy in milliwatt-hours. MSRs with function 2 (temperature) return 1 result, which represents the temperature in degrees Celsius. The Intel® Power Gadget API currently supports sampling with the following MSRs: processor frequency, estimated processor power, and package temperature. The currently supported MSR functions are: frequency (0), power (1), temperature (2).
ReadSample also reads the system time and Time Stamp Counter (TSC) at the time the sample is read. These values are available via GetSysTime
and GetRDTSC
; the time interval between samples is available (in seconds) via GetTimeInterval. Note that you must call ReadSample prior to calling GetPowerData
, GetRDTSC
, and GetTimeInterval
, and that you must call ReadSample twice before calling GetTimeInterval
and before getting power data (as opposed to frequency or temperature data) from GetPowerData
, as they are computed using the difference between two samples.
The Intel® Power Gadget API also supports reading generic MSRs with ReadMSR, which returns the raw data from the MSR. However, note that specifying an invalid MSR address can crash your system and could potentially corrupt it. There is no method to determine if an MSR address is valid. The API supports reading common individual MSRs without having to specify the MSR address or read an entire sample; the supported functions are: GetIAFrequency
, GetMaxTemperature
, GetTemperature
, and GetTDP
.
The sample data from ReadSample
can be logged to a file. Logging can be enabled at any time by calling StartLog, and subsequently disabled by calling StopLog. Note that the logged data isn’t written until StopLog is called. Both StartLog and StopLog cause an internal call to ReadSample.
Sampling Considerations
The frequency at which you read samples may have an impact on the accuracy of data. The instantaneous processor frequency can change significantly from moment to moment. Frequency data may be more meaningful if you sample often and average the frequency samples over time. The processor power is calculated by taking the difference between two samples, thus a shorter interval between samples will result in more fine-grained power data. However, the frequency at which you read samples may also impact the performance of the system. Using a very short frequency (e.g. less than 20 milliseconds) may result in significant overhead, and may also increase the power consumption of the system, both of which may reduce the usefulness of the data. The Intel® Power Gadget application uses a default sampling frequency of 50 milliseconds, and updates the GUI with averaged frequency and power data every second.
Example
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <IntelPowerGadget/EnergyLib.h>
int main(int argc, char* argv[]) {
IntelEnergyLibInitialize();
StartLog("/tmp/PowerGadgetLog.csv"); // causes a sample to be read
int numMsrs = 0;
GetNumMsrs(&numMsrs);
for (int i = 0; i < 10; i ) {
sleep(1);
ReadSample();
for (int j = 0; j < numMsrs; j ) {
int funcID;
char szName[1024];
GetMsrFunc(j, &funcID);
GetMsrName(j, szName);
int nData;
double data[3];
GetPowerData(0, j, data, &nData);
// Frequency
if (funcID == MSR_FUNC_FREQ) {
printf("%s = %4.0f", szName, data[0]);
}
// Power
else if (funcID == MSR_FUNC_POWER) {
printf(", %s Power (W) = %3.2f", szName, data[0]);
printf(", %s Energy(J) = %3.2f", szName, data[1]);
printf(", %s Energy(mWh)=%3.2f", szName, data[2]);
}
// Temperature
else if (funcID == MSR_FUNC_TEMP) {
printf(", %s Temp (C) = %3.0f", szName, data[0]);
}
}
printf("n");
}
sleep(1);
StopLog();// causes a sample to be read
return 0;
}
Download the Xcode project for this example application here.
API Reference
int IntelEnergyLibInitialize();
Initializes the library and connects to the driver.
int GetNumNodes(int *nNodes);
Returns the number of CPU packages on the system.
int GetNumMsrs(int *nMsr);
Returns the number of supported MSRs for bulk reading and logging.
int GetMsrName(int iMsr, char *szName);
Returns in szName the name of the MSR specified by iMsr. Note that the Windows version uses wchar_t.
int GetMsrFunc(int iMsr, int *pFuncID);
Returns in pFuncID the function of the MSR specified by iMsrCurrently supported functions are: 0 = frequency, 1 = power, 2 = temperature.
int ReadMSR(int iNode, unsigned int address, uint64_t *value);
Reads the MSR specified by address on the package specified by iNode, and returns the value in value. Warning: Specifying an invalid MSR address can crash your system and could potentially corrupt it. There is no method to determine if an MSR address is valid.
int GetIAFrequency(int iNode, int *freqInMHz);
Reads the processor frequency MSR on the package specified by iNode, and returns the frequency in MHz in freqInMHz.
int GetTDP(int iNode, double *TDP);
Reads the package power info MSR on the package specified by iNode, and returns the TDP in watts in TDP.
int GetMaxTemperature(int iNode, int *degreeC);
Reads the temperature target MSR on the package specified by iNode, and returns the maximum temperature in degrees Celsius in degreeC.
int GetTemperature(int iNode, int *degreeC);
Reads the temperature MSR on the package specified by iNode, and returns the current temperature in degrees Celsius in degreeC.
int ReadSample();
Reads sample data from the driver for all the supported MSRs. Note that two calls to ReadSample are necessary to calculate power data, as power data is calculated using the difference between two samples.
int GetSysTime(void *pSysTime);
Returns the system time as of the last call to ReadSample. The data returned in pSysTime is structured as follows:
pSysTime[63:32]
= time in seconds
pSysTime[31:0]
= time in nanoseconds
int GetRDTSC(uint64_t *pTSC);
Returns in pTSC the processors time stamp counter as of the last call to ReadSample. Note that this function does not execute the rdtsc instruction directly, but instead returns the TSC from when the last sample was read.
int GetTimeInterval(double *pOffset);
Returns in pOffset the time in seconds that has elapsed between the two most recent calls to ReadSample.
int GetBaseFrequency(int iNode, double *pBaseFrequency);
Returns in pBaseFrequency the advertised processor frequency for the package specified by iNode.
int GetPowerData(int iNode, int iMSR, double *pResult, int *nResult);
Returns the data collected by the most recent call to ReadSample. The returned data is for the data on the package specified by iNode, from the MSR specified by iMSR. The data is returned in pResult, and the number of double results returned in pResult is returned in nResult. Frequency MSRs (function 0) return 1 result, which represents the frequency in megahertz. Power MSRs (function 1) return 3 results, which represent the average power in watts, cumulative energy in Joules, and cumulative energy in milliwatt-hours. Temperature MSRs (function 2) return 1 result, which represents the temperature in degrees Celsius.
int StartLog(char *szFileName);
Starts saving the data collected by ReadSample. When StopLog is called, this data will be written to the file specified by szFileName. Note that the Windows version uses wchar_t. StartLog will cause an initial call to ReadSample.
int StopLog();
Stops saving data and writes all saved data to the file specified by the call to StartLog. StopLog will cause a final call to ReadSample.
Upd: объективности ради: end
страдаете наслаждаетесь перфекционизмом в тяжёлой форме. Тяга к маленьким и лёгким ноутбукам, с которыми будет кофортно, интересно и всё такое, приятное, затмевает здравый смысл и прочие рациональные предпочтения. Большие и тяжёлые железки я не люблю, равно как и маленькие, комфортные и удобные, но всё же не такие уж интересные по, хотя бы, соотношению цен Маки. К слову, два года назад у меня был уже не первый 11.6 ноутбук: Обзор нетбука MSI S12 / Geektimes.
По моим субъективным требованиям даже 1.5 килограмма — это уже много. Мой «предыдущий» Lenovo Flex-2-14 был в основном вынужденной покупкой. Это был тот самый момент, когда Рубль «лихорадило» и ничего лучшего с нормальной клавиатурой и Full HD матрицей, что хотя бы примерно влезаюло в имеющийся бюджет, найти было невозможно. К тому же свой «пред предидущий» MSI S12 я всяческими эксперементами довёл до того, PCB пошла трещинами, и ждать было просто больше «некуда». А ещё через месяц после того как я его купил он стоил уже на 15 тысяч рублей дороже, так что я остался вдвойне доволень покупкой.
Но, всё же прошло примерно несколько дней, эйфория прошла, и стал я ежемесячно искать что-нибудь более подходящее. Так, в начале зимы 2021 года решил было остановиться на Lenovo Yoga 3 11, но потом как-то всё завертелось, и вот, лето прошло, настала осень, и появилась эта линейка: 700-11. Посмотрев характеристики, обзоры и перерыв, как казалось, всё, что было можно по этой модели, я не нашёл оснований сомневаться в выборе. Даже несмотря на заявленое отсутствие активной системы охлаждения, и негативные отзывы по этой теме на просторах интернетов.
Альтернативные варианты были или неприлично дороже, или не устраивали по каким-нибудь другим характеристикам, таким, как, например, совмещение стрелок с клавишами Home, End, PgUp и PgDn. Так как я использую ноутбук для работы, то мне, конечно, важны все эти кнопки в «раздельном» режиме. Максимально допустимое пересечение — это комбинации Home PgUp и End PgDn. Все остальные варианты клавиатур идут сразу «ф топку», несмотря на любые остальные достоинства анализируемой техники. В этом ноутбуке клавиатура как раз подходящая, я бы даже сказал, что именно это совмещение вышло на редкость удачным. Единственное, что PgUp и PgDn шли «по умолчанию», и мне пришлось переназначить их «наоборот» при помощи modmap:
#!/bin/bash
xmodmap -e "keycode 112 = Home"
xmodmap -e "keycode 117 = End"
xmodmap -e "keycode 110 = Prior"
xmodmap -e "keycode 115 = Next"
Но, конечно, это всё совсем несложно, и, так как оно стартует вместе с загрузкой рабочего стола, то никаких неудобств не вызывает.
Примерно в конце сентября я его заказал, прям там, в магазине на сайте Lenovo. В начале октября я получил посылку с заветным девайсом. Радости моей, конечно, не было вообще никакого предела. Лёгкий, мощный, клавиатура, матрица, всё работает, всё что мне нужно есть, SSD 265 на очень быстрой шине. Памяти, правда, всего 8 Gb, но надо ли мне больше? И всё такое, прям, радостное-радостное, да ещё и рыжее… | ![]() ![]() |
Проверив, что окошко «до-установки» Windows 10 Home Edition грузится нормально, я выключил компьютер, снял образ диска, стёр все разделы и
со своего Flex 2 на «теперешний», как я думал, ноутбук.
Вот тут, как вы можете догадаться, вполне ожидаемо включился «режим кирпича», без него не было бы этой статьи. И, да, дело не в том, что я забыл поставить Grub или что-то там ещё забыл, он вполне себе включался, но не загружался. Выглядело это примерно так:
...
... OOPS [#010], SMP error ...
...
какая-то китайская грамота
...
fixing recursive fault but reboot is needed ...
Более детальных логов не сохранилось, но они и не нужны, наверное. После нескольких перезагрузок он вполне себе загружался, и работать было можно. Но было очень некомфортно, так как было просто нереально горячо. Датчики показывали минимум 63 ℃ градуса на ядрах, а если просто пошевелить мышкой, то подскакивали до 70 ℃.
Конечно же, я вернул Windows на место, просто чтобы убедиться, что всё ок.
И, действительно, всё было ОК. Он был горячий, но не настолько, чтобы к нему было сложно прикасаться. YouTube в Full HD и прочие прелести жизни вполне себе радовали, но нужно же было работать, а для этого нужно было как-нибудь поставить Linux.
Установка системы начисто, с нуля, тоже, как и ожидалось — ни к чему не приводила, всё оставалось по прежнему. В то время как «сборщица вирусов» предлагала уже сейчас работать и быстро, и с «холодной» головой: где-то во вполне комфортном для прикосновения рук диапазоне температур задней крышки. Бесчисленые попытки поставить другие ядра и/или дистрибутивы (свежие Mint | Ubuntu LTS) аналогично терпели полное фиаско: он по прежнему включался раза с третьего с той же ошибкой SMP.
Работать всё же было как-то нужно, и я вернулся на Flex-2-14. В последний из возможных 14 дней возврата я оформил заявку на сайте Lenovo и дал объявление на Avito.
Кстати, я пробовал купить его сразу БЕЗ Windows. К чести Lenovo надо отметить, что у меня ничего не вышло. Стоны по поводу того, что большинство пользовательского железа идёт с предустановленным Microsoft Windows и отказаться от этой, для меня лично «медвежьей услуги» — дело очень и очень проблемное, будут продолжаться, видимо, ещё очень долго.
Да, это уже получалось у кого-то, тут есть статьи:
Да, как бы, сами по себе ноутбуки Lenovo «вполне use-абильны», лично для меня без альтернативы, так как по соотношению «цена/качество» найти что-нибудь с вменяемой клавиатурой и матрицей практически невозможно, тем более в сегменте 11.6.
Стартовав с какой-то формы на http://www.lenovo.com/ru/ru/ я в итоге получил:
Response By E-mail (Ольга) (03/10/2021 11.28 AM)
Здравствуйте, Виктор!
Спасибо за обращение в компанию Lenovo.
Мы получили официальный ответ от Главного офиса, что, к сожалению, на данный момент, процедуру по возврату денежных средств за ОС, невозможно осуществить через наш интернет-магазин. Искренне сожалею.
С наилучшими пожеланиями, Ольга
Служба поддержки клиентов Lenovo.
Видимо они знают о проблемах с Linux у не совсем опытных пользователей. И, хотя мне никто в общем-то не запрещал ставить на компьютер всё, что вздумается, и в BIOS всё разлочено, но тем не менее, сдать Windows не вышло.
После выяснившихся проблем с Перегревом я снова им написал, и рассказал о ситуации. Поработав немного на Windows, я убедился, что в режиме планшета компьютер всё же совершенно не use-абелен. Он перегревается, и ничего с этим сделать нельзя, просто потому, что в задней крышке нет отверстий, от слова «совсем». Поэтмому перегрев, начинающийся в области кулера постепенно распространяется на остальные внутренности, приводя к полному отказу системы хоть как-нибудь внятно работать. Со временем отключается Wi-Fi, просто из-за перегрева, подозреваю, что в чип WiFi встроена какая-нибудь защита на этот случай, и он просто «железно» выключается. Конечно же мне предложили обратиться в Сервисный Центр и, описав им причину и сдав его на диагностику я, возможно, получил бы деньги по заявке на возврат. Но перспектива остатсья с бумажкой «принято в СЦ» меня очень не радовала.
На Avito тоже ничего не вышло, была пара звонков, но, видимо, все люди в тот же примерно момент нашли что-нибудь более интересное. Один человек даже хотел из Краснодара приехать в Ростов-на-Дону, но ему я, конечно, сказал, что за те же самые деньги он может купить Новый в магазине Lenovo, и не нужно никуда ехать.
Кстати, на всякий случай, если вдруг кого интересуют мои альтернативные варианты с безальтернативно заоблачными ценниками:
Итак, все круги мучений с поддержкой Lenovo закончились, объявление с Avito никому более не было интересно, и, уж совсем кстати днях я прочитал это:
В связи с чем, я решил попытаться ещё раз, уже никуда не торопясь, обстоятельно, так, как я могу, если хочу или очень надо. Практически сразу выяснилось, что BIOS моего ноутбука не совсем свежей версии, если не сказать, что совсем не свежей. Конечно же, после обновления изменилось ровным счётом — абсолютно ничего.
Для тех, кому интересны внутренности, как их видит Linux:
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
71 structures occupying 3632 bytes.
Table at 0x857DA000.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: LENOVO
Version: DDCN25WW(V1.09)
Release Date: 04/15/2021
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 6144 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
5.25"/360 kB floppy services are supported (int 13h)
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 1.25
Firmware Revision: 1.25
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: LENOVO
Product Name: 80QE
Version: Lenovo YOGA 700-11ISK
Serial Number: MP13DHX6
UUID: A6EA5D9D-1B3A-11E6-B27E-1C3947C50FC2
Wake-up Type: Power Switch
SKU Number: LENOVO_MT_80QE_BU_idea_FM_Lenovo YOGA 700-11ISK
Family: IDEAPAD
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: LENOVO
Product Name: Lenovo YOGA 700-
Version: SDK0J40688 WIN
Serial Number: MP13DHX6
Asset Tag: NO Asset Tag
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Type2 - Board Chassis Location
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
Manufacturer: LENOVO
Type: Notebook
Lock: Not Present
Version: Lenovo YOGA 700-11ISK
Serial Number: MP13DHX6
Asset Tag: NO Asset Tag
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0
SKU Number: SKU Number
Handle 0x0004, DMI type 4, 42 bytes
Processor Information
Socket Designation: U3E1
Type: Central Processor
Family: Other
Manufacturer: Intel(R) Corporation
ID: E3 06 04 00 FF FB EB BF
Version: Intel(R) Core(TM) m5-6Y54 CPU @ 1.10GHz
Voltage: 1.0 V
External Clock: 100 MHz
Max Speed: 1500 MHz
Current Speed: 2400 MHz
Status: Populated, Enabled
Upgrade: Other
L1 Cache Handle: 0x0006
L2 Cache Handle: 0x0007
L3 Cache Handle: 0x0008
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Part Number: To Be Filled By O.E.M.
Core Count: 2
Core Enabled: 2
Thread Count: 4
Characteristics:
64-bit capable
Multi-Core
Hardware Thread
Execute Protection
Enhanced Virtualization
Power/Performance Control
Handle 0x0005, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 64 kB
Maximum Size: 64 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Parity
System Type: Data
Associativity: 8-way Set-associative
Handle 0x0006, DMI type 7, 19 bytes
Cache Information
Socket Designation: L1 Cache
Configuration: Enabled, Not Socketed, Level 1
Operational Mode: Write Back
Location: Internal
Installed Size: 64 kB
Maximum Size: 64 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Parity
System Type: Instruction
Associativity: 8-way Set-associative
Handle 0x0007, DMI type 7, 19 bytes
Cache Information
Socket Designation: L2 Cache
Configuration: Enabled, Not Socketed, Level 2
Operational Mode: Write Back
Location: Internal
Installed Size: 512 kB
Maximum Size: 512 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Single-bit ECC
System Type: Unified
Associativity: 4-way Set-associative
Handle 0x0008, DMI type 7, 19 bytes
Cache Information
Socket Designation: L3 Cache
Configuration: Enabled, Not Socketed, Level 3
Operational Mode: Write Back
Location: Internal
Installed Size: 4096 kB
Maximum Size: 4096 kB
Supported SRAM Types:
Synchronous
Installed SRAM Type: Synchronous
Speed: Unknown
Error Correction Type: Multi-bit ECC
System Type: Unified
Associativity: 16-way Set-associative
Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: Keyboard
External Connector Type: PS/2
Port Type: Keyboard Port
Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: Mouse
External Connector Type: PS/2
Port Type: Mouse Port
Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A1
Internal Connector Type: None
External Reference Designator: TV OUT
External Connector Type: Mini DIN
Port Type: Video Port
Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2
Internal Connector Type: None
External Reference Designator: CRT
External Connector Type: DB-15 female
Port Type: Video Port
Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2
Internal Connector Type: None
External Reference Designator: COM 1
External Connector Type: DB-9 male
Port Type: Serial Port 16550A Compatible
Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A1
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A2
Internal Connector Type: None
External Reference Designator: USB
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J5A1
Internal Connector Type: None
External Reference Designator: Network
External Connector Type: RJ-45
Port Type: Network Port
Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9G2
Internal Connector Type: On Board Floppy
External Reference Designator: OnBoard Floppy Type
External Connector Type: None
Port Type: Other
Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J7J1
Internal Connector Type: On Board IDE
External Reference Designator: OnBoard Primary IDE
External Connector Type: None
Port Type: Other
Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J30
Internal Connector Type: None
External Reference Designator: Microphone In
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port
Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J30
Internal Connector Type: None
External Reference Designator: Line In
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port
Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J30
Internal Connector Type: None
External Reference Designator: Speaker Out
External Connector Type: Mini Jack (headphones)
Port Type: Audio Port
Handle 0x001A, DMI type 9, 17 bytes
System Slot Information
Designation: J6C1
Type: x1 PCI Express x1
Current Usage: In Use
Length: Other
ID: 1
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.0
Handle 0x001B, DMI type 9, 17 bytes
System Slot Information
Designation: J6D2
Type: x1 PCI Express x1
Current Usage: Available
Length: Other
ID: 2
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.1
Handle 0x001C, DMI type 9, 17 bytes
System Slot Information
Designation: J7C1
Type: x1 PCI Express x1
Current Usage: Available
Length: Other
ID: 3
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.2
Handle 0x001D, DMI type 9, 17 bytes
System Slot Information
Designation: J7D1
Type: x1 PCI Express x1
Current Usage: Available
Length: Other
ID: 4
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.3
Handle 0x001E, DMI type 9, 17 bytes
System Slot Information
Designation: J8C1
Type: x4 PCI Express x4
Current Usage: Available
Length: Other
ID: 5
Characteristics:
PME signal is supported
Hot-plug devices are supported
Bus Address: 0000:00:1c.4
Handle 0x001F, DMI type 11, 5 bytes
OEM Strings
String 1: OemString1
String 2: OemString2
String 3: OemString3
Handle 0x0020, DMI type 12, 5 bytes
System Configuration Options
Option 1: ConfigOptions1
Option 2: ConfigOptions2
Option 3: ConfigOptions3
Handle 0x0021, DMI type 13, 22 bytes
BIOS Language Information
Language Description Format: Long
Installable Languages: 8
en|US|iso8859-1,0
fr|CA|iso8859-1,0
zh|TW|unicode,0
ja|JP|unicode,0
it|IT|iso8859-1,0
es|ES|iso8859-1,0
de|DE|iso8859-1,0
pt|PT|iso8859-1,0
Currently Installed Language: en|US|iso8859-1,0
Handle 0x0022, DMI type 14, 17 bytes
Group Associations
Name: Firmware Version Info
Items: 4
0x0040 (<OUT OF SPEC>)
0x003B (<OUT OF SPEC>)
0x003A (<OUT OF SPEC>)
0x0039 (<OUT OF SPEC>)
Handle 0x0023, DMI type 14, 8 bytes
Group Associations
Name: Intel(R) Silicon View Technology
Items: 1
0x0044 (<OUT OF SPEC>)
Handle 0x0024, DMI type 14, 8 bytes
Group Associations
Name: $MEI
Items: 1
0x003F (<OUT OF SPEC>)
Handle 0x0025, DMI type 15, 29 bytes
System Event Log
Area Length: 0 bytes
Header Start Offset: 0x0000
Header Length: 8192 bytes
Data Start Offset: 0x2000
Access Method: General-purpose non-volatile data functions
Access Address: 0x0000
Status: Valid, Not Full
Change Token: 0x12345678
Header Format: OEM-specific
Supported Log Type Descriptors: 3
Descriptor 1: POST memory resize
Data Format 1: None
Descriptor 2: POST error
Data Format 2: POST results bitmap
Descriptor 3: Log area reset/cleared
Data Format 3: None
Handle 0x0026, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 16 GB
Error Information Handle: No Error
Number Of Devices: 2
Handle 0x0027, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0026
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: LPDDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Samsung
Serial Number: 85000000
Asset Tag: 9876543210
Part Number: K4E6E304EE-EGCF
Rank: 2
Configured Clock Speed: 1600 MHz
Minimum Voltage: 1.5 V
Maximum Voltage: 1.5 V
Configured Voltage: 1.2 V
Handle 0x0028, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0026
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: Unknown
Set: None
Locator: ChannelA-DIMM1
Bank Locator: BANK 1
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: Unknown
Handle 0x0029, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0026
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: LPDDR3
Type Detail: Synchronous
Speed: 1600 MHz
Manufacturer: Samsung
Serial Number: 85000000
Asset Tag: 9876543210
Part Number: K4E6E304EE-EGCF
Rank: 2
Configured Clock Speed: 1600 MHz
Minimum Voltage: 1.5 V
Maximum Voltage: 1.5 V
Configured Voltage: 1.2 V
Handle 0x002A, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0026
Error Information Handle: No Error
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: Unknown
Set: None
Locator: ChannelB-DIMM1
Bank Locator: BANK 3
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: Unknown
Handle 0x002B, DMI type 19, 31 bytes
Memory Array Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x001FFFFFFFF
Range Size: 8 GB
Physical Array Handle: 0x0026
Partition Width: 2
Handle 0x002C, DMI type 20, 35 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x000FFFFFFFF
Range Size: 4 GB
Physical Device Handle: 0x0027
Memory Array Mapped Address Handle: 0x002B
Partition Row Position: Unknown
Interleave Position: 1
Interleaved Data Depth: 1
Handle 0x002D, DMI type 20, 35 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x000FFFFFFFF
Range Size: 4 GB
Physical Device Handle: 0x0028
Memory Array Mapped Address Handle: 0x002B
Partition Row Position: Unknown
Interleave Position: 2
Interleaved Data Depth: 1
Handle 0x002E, DMI type 21, 7 bytes
Built-in Pointing Device
Type: Touch Pad
Interface: PS/2
Buttons: 4
Handle 0x002F, DMI type 22, 26 bytes
Portable Battery
Location: Fake
Manufacturer: -Virtual Battery 0-
Manufacture Date: 08/08/2021
Serial Number: Battery 0
Name: CRB Battery 0
Chemistry: Zinc Air
Design Capacity: Unknown
Design Voltage: Unknown
SBDS Version: Not Specified
Maximum Error: Unknown
OEM-specific Information: 0x00000000
Handle 0x0030, DMI type 24, 5 bytes
Hardware Security
Power-On Password Status: Disabled
Keyboard Password Status: Disabled
Administrator Password Status: Disabled
Front Panel Reset Status: Disabled
Handle 0x0031, DMI type 26, 24 bytes
Voltage Probe
Description: Voltage Probe Description
Location: Unknown
Status: Unknown
Maximum Value: Unknown
Minimum Value: Unknown
Resolution: Unknown
Tolerance: Unknown
Accuracy: Unknown
OEM-specific Information: 0x00008000
Nominal Value: 0.000 V
Handle 0x0032, DMI type 27, 15 bytes
Cooling Device
Temperature Probe Handle: 0x0033
Type: Fan
Status: OK
OEM-specific Information: 0x00000000
Nominal Speed: 8192 rpm
Description: Cooling Device Description
Handle 0x0033, DMI type 28, 24 bytes
Temperature Probe
Description: Temperature Probe Description
Location: Unknown
Status: Unknown
Maximum Value: Unknown
Minimum Value: Unknown
Resolution: Unknown
Tolerance: Unknown
Accuracy: Unknown
OEM-specific Information: 0x00008000
Nominal Value: 0.0 deg C
Handle 0x0034, DMI type 32, 11 bytes
System Boot Information
Status: No errors detected
Handle 0x0035, DMI type 39, 22 bytes
System Power Supply
Location: OEM Define 0
Name: OEM Define 1
Manufacturer: OEM Define 2
Serial Number: OEM Define 3
Asset Tag: OEM Define 4
Model Part Number: OEM Define 5
Revision: OEM Define 6
Max Power Capacity: 75 W
Status: Not Present
Type: Regulator
Input Voltage Range Switching: Auto-switch
Plugged: No
Hot Replaceable: No
Handle 0x0036, DMI type 40, 17 bytes
Additional Information 1
Referenced Handle: 0x000e
Referenced Offset: 0x05
String: PCIExpressx16
Value: 0xaa
Additional Information 2
Referenced Handle: 0x0000
Referenced Offset: 0x05
String: Compiler Version: VC 9.0
Value: 0x00
Handle 0x0037, DMI type 41, 11 bytes
Onboard Device
Reference Designation: IGD
Type: Video
Status: Disabled
Type Instance: 1
Bus Address: 0000:00:02.0
Handle 0x0038, DMI type 128, 8 bytes
OEM-specific Type
Header and Data:
80 08 38 00 55 AA 55 AA
Strings:
Oem Type 128 Test 1
Oem Type 128 Test 2
Handle 0x0039, DMI type 129, 8 bytes
OEM-specific Type
Header and Data:
81 08 39 00 01 01 02 01
Strings:
Insyde_ASF_001
Insyde_ASF_002
Handle 0x003A, DMI type 130, 20 bytes
OEM-specific Type
Header and Data:
82 14 3A 00 24 41 4D 54 01 01 01 01 01 A5 1F 02
00 00 00 00
Handle 0x003B, DMI type 131, 64 bytes
OEM-specific Type
Header and Data:
83 40 3B 00 10 00 00 00 00 00 00 00 00 00 00 00
F8 00 46 9D 00 00 00 00 01 00 00 00 00 00 0B 00
88 04 00 00 00 00 00 00 FE 00 FF FF 00 00 00 00
00 FF 00 00 26 00 00 00 76 50 72 6F 00 00 00 00
Handle 0x003C, DMI type 133, 5 bytes
OEM-specific Type
Header and Data:
85 05 3C 00 01
Strings:
KHOIHGIUCCHHII
Handle 0x003D, DMI type 136, 6 bytes
OEM-specific Type
Header and Data:
88 06 3D 00 FF FF
Handle 0x003E, DMI type 200, 16 bytes
OEM-specific Type
Header and Data:
C8 10 3E 00 01 02 01 22 01 12 01 3D B2 80 01 05
Strings:
IdeaPad
80QE0034RK
Handle 0x003F, DMI type 219, 81 bytes
OEM-specific Type
Header and Data:
DB 51 3F 00 01 03 01 45 00 00 90 06 01 00 60 00
00 00 00 00 40 08 00 00 00 00 00 00 00 00 40 02
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF 03 FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF
Strings:
MEI1
MEI2
MEI3
Handle 0x0040, DMI type 221, 26 bytes
OEM-specific Type
Header and Data:
DD 1A 40 00 03 01 00 01 03 00 00 00 02 00 00 00
00 74 00 03 00 00 05 00 00 00
Strings:
Reference Code - CPU
uCode Version
TXT ACM version
Handle 0x0041, DMI type 221, 26 bytes
OEM-specific Type
Header and Data:
DD 1A 41 00 03 01 00 01 03 00 00 00 02 00 01 03
00 00 00 03 04 0B 00 00 88 04
Strings:
Reference Code - ME 11.0
MEBx version
ME Firmware Version
Consumer SKU
Handle 0x0042, DMI type 221, 68 bytes
OEM-specific Type
Header and Data:
DD 44 42 00 09 01 00 01 03 00 00 00 02 03 FF FF
FF FF FF 04 00 FF FF FF 21 00 05 00 FF FF FF 21
00 06 00 FF FF FF FF FF 07 00 3E 00 00 00 00 08
00 34 00 00 00 00 09 00 3E 00 00 00 00 0A 00 34
00 00 00 00
Strings:
Reference Code - SKL PCH
PCH-CRID Status
Disabled
PCH-CRID Original Value
PCH-CRID New Value
OPROM - RST - RAID
SKL PCH H Bx Hsio Version
SKL PCH H Dx Hsio Version
SKL PCH LP Bx Hsio Version
SKL PCH LP Cx Hsio Version
Handle 0x0043, DMI type 221, 54 bytes
OEM-specific Type
Header and Data:
DD 36 43 00 07 01 00 01 03 00 00 00 02 00 01 04
00 02 00 03 00 01 03 00 00 00 04 05 FF FF FF FF
FF 06 00 FF FF FF 08 00 07 00 FF FF FF 08 00 08
00 FF FF FF FF FF
Strings:
Reference Code - SA - System Agent
Reference Code - MRC
SA - PCIe Version
SA-CRID Status
Disabled
SA-CRID Original Value
SA-CRID New Value
OPROM - VBIOS
Handle 0x0044, DMI type 222, 14 bytes
OEM-specific Type
Header and Data:
DE 0E 44 00 01 99 00 03 10 01 20 02 30 03
Strings:
Memory Init Complete
End of DXE Phase
BIOS Boot Complete
Handle 0x0045, DMI type 248, 18 bytes
OEM-specific Type
Header and Data:
F8 12 45 00 AC AC AA 17 00 00 00 00 00 00 00 00
00 00
Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table
Основательно изучив эти наши интернеты я выяснил, что SMP — это
. Как это использовать было пока не совсем понятно, но останавливаться было некуда, и я решил зайти несколько с другой стороны. Я снял крышку (кликабельно)…
Безусловно, проблем с загрузкой это не решило, но вполне решило проблемы с дальнейшей работой, температура резко упала, и не росла до критических значений. И WiFi работал стабильно, как говорится: «ни единого разрыва». Убедившись, что я всё же скорее прав, чем не прав, и заменив штатную, кстати, довольно в общем-то не плохую термопасту, я собрал его назад и стал разбираться дальше.
И, да, смена термопасты отсудила «первоначальный» пыл, теперь после загрузки он уже достаточно долго был способен держаться в диапазоне 55-57 ℃, что, в общем-то почти комфортно. Я даже стал пытаться работать работу на работе. Но, через два-четыре часа, в зависимости от нагрузки, он всё же нагревался до потери WiFi.
# service network-manager stop
# service networking stop
# service network-manager start
# service networking start
В общем, стало можно гуглить «не отходя», как говорится, «от кассы». Довольно скоро я узнал, что в мире
теперь за всё отвечает Power Profile. Это несколько прояснило ситуацию, оказывается гугление на предмет «температура процессора» было совсем не тем, что мне было нужно. Нужно было гуглить «Power Management Ubuntu» с сопутствующими уточнениями, желательно за последний год-два.
часть вывода
# dmesg
...
[ 0.036609] CPU: Physical Processor ID: 0
[ 0.036612] CPU: Processor Core ID: 0
[ 0.036618] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[ 0.036621] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[ 0.036627] mce: CPU supports 8 MCE banks
[ 0.036638] CPU0: Thermal monitoring enabled (TM1)
...
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave
Таким образом, я выяснил, что сразу в момент загрузки процессор включается в режим Perfomance и работает в нём до тех пор, пока не включится что-то внутри системы, что выставит ему нужный режим. А т.к. «CPU Frequency Scaling Monitor» моего рабочего стола, показывал после загрузки «Powersave» режим, то было понятно, что система всё же в конце-концов входит в этот режим каким-то самостоятельным образом.
В общем, запасаемся попкорном… В Ubuntu, и, соответственно, в Mint есть несколько подсистем, которые отвечают за Power Profile Management. К вашей радости я не могу вспомнить все те бесконечно нудные попытки выяснить что и в какой последовательности включается, поэтому просто перечислю их списком, как есть, без пояснений:
# service --status-all
...
[ ] cpufreqd
[ ] cpufrequtilsthermald
...
[ ] ondemand
...
[ ] thermald
...
UPD: В комментарих подсказывают, что этого может и не наблюдаться, в зависимости от «запущенности» системы и т.п., например у меня это может быть вызвано просто «переездами», а не установками системы с нуля.
Да, все они, все вместе управляли тем, какой же профиль выставить для моего бедного CPU. Причём делали они это абсолютно несогласовано. В то время как
пытался всё же сделать «powersave»,
на пару с ondemand сервисом пытались сделать «perfomance».
# cat etc/init.d/ondemand
...
GOVERNOR="interactive"
...
GOVERNOR="ondemand"
...
Просто потому, что если GOVERNOR стоит Не из доступных по
scaling_available_governors
, то будет взят Perfomance.
Сначала я пытался разобраться с настройками thermald. Просто потому, что в Windows среди установленных драйверов устройств видел нечто похожее. Но, конечно, это ни к чему не привело, там жуткая XML’ка, толковое описание которой не даёт никаких существенных подвижек и никак не проясняет ситуацию на предмет того, как же его настраивать то:
После чего я его просто выключил и потом удалил.
# update-rc.d -f thermald remove
# apt-get remove thermald
Как я и ожидал система осталась в режиме Perfomance сразу после перезагрузки, то есть и в «CPU Frequency Scaling Monitor» показался Perfomance профиль. После чего я выключил и оставшиеся ondemand, cpufreqd и cpufrequtils:
# update-rc.d -f ondemand remove
# update-rc.d -f cpufreqd remove
# update-rc.d -f cpufreutils remove
# apt-get remove cpufreqd
# apt-get remove cpufrequtils
И ничего, тоже ничего страшного не произошло, компьютер не взорвался, не сгорел. Как работал так и продолжил работать. Загружался через раз, но работал. «CPU Frequency Scaling Monitor» вполне позволял выставить power profile после загрузки. Теперь процессором вроде бы совсем уже ничего не управляло, но всё же он был вполне в кондиции работать дальше без проблем. Оставалось решить, что же делать с загрузкой системы.
Конечно же, как и все «нубы» я решил воспользоваться методом научного тыка. Для начала я выяснил, что есть P-State, и именно он отвечает за то, что мне нужно. К тому же я прочёл где-то, что этот самый P-State необходимо включить в параметрах ядра, то есть добавить в коммандную строку Grub для загрузки, примерно так советовали сделать:
# nano /etc/default/grub
найти строчку
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
добавить intel_pstate=enable, чтобы получилось
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=enable"
Это не решило пролему, но, зато теперь тут было написано то, что нужно:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
intel_pstate
Кстати, для того, чтобы intel_pstate нормально работал, необходимо установить intel-microcode, делается это приблизительно так (можно и через apt-get, конечно):
В итоге я, конечно, отправился сюда:
. Последовательно вчитываясь и перебирая комбинации я пришёл к следующим выводам:
GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=hwp_only epb=15 idle=nomwait cpu_init_udelay=5000000 pause_on_oops=5 noapic"
- intel_pstate=hwp_only Only load intel_pstate on systems which support hardware P state control (HWP) if available. То есть загрузить P-State драйвер только, если это возможно.
- epb=15 нашёл где-то ещё, вполне возможно, что оно выключено уже. Отвечает опять же за Power Profile на этапе загрузки. Значение 0 включает Perfomance, 15 включает Powersave, не работает, т.к. вывод dmesg у меня не изменился.
- idle=nomwait Disable mwait for CPU C-states.
- cpu_init_udelay=5000000 Delay for N microsec between assert and de-assert of APIC INIT to start processors. Задержка перед тем, как APIC инициализирует проц.
- pause_on_oops=5 — мне всё таки хотелось успевать прочесть каждый вывод ошибки, потому, что, когда я отключил quiet splash я стал видеть что происходит.
- noapic [SMP,APIC] Tells the kernel to not make use of any IOAPICs that may be present in the system. САМЫЙ ВАЖНЫЙ ПАРАМЕТР. Именно он выключил все мои ошибки SMP.
Итак, после того, как я
выключил
загрузка сразу пошла в штатном стабильном режиме. Никаких «вылетов» больше не было, ноутбук стал работать быстро и стабильно всегда, даже после чудовищного прогрева градусов до 98 при помощи
Но, как вы догадались, на этом эпопея не закончилась, т.к. он всё равно грелся. Хоть и загружался теперь стабильно, но греться продолжал.
И тут я наткнулся на TLP — Linux Advanced Power Management… который решил все проблемы: linrunner.de: TLP. Можно нагуглить и найти ещё другие источники, например этот, но мне дока с linrunner.de показалась наиболее исчерпывающей.
На большом фото видно, что SSD расположен совсем рядом с WiFi. Поэтому контроллировать температуру в той «зоне» я буду при помощи HDDTemp. Ранее всё это у меня уже стояло, но для тех, кто никогда не планировал это мониторить показываю.
# apt-get install lm-sensors hddtemp