intel / dptf Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Intel (R) Dynamic Tuning for Chromium OS - 9.x Release README ------------------------------------------------------------------------------- This document describes how to build and integrate DPTF to Chromimum OS. Please note that DPTF is already fully integrated to most Intel based board overlays by default if you build from the upstream code from chromium.org. On overlays where DPTF is not enabled by default, you can use this guide and follow the necessary steps to build and enable it. This document assumes that the user has already set up the Chromium OS SDK on their development machine. Otherwise, please refer to Google's "Chromium OS Developer Guide" available at: http://www.chromium.org/chromium-os/developer-guide ------------------------------------------------------------------------------- MANUALLY ADD DPTF TO OVERLAYS IN CHROMIUM OS SDK ------------------------------------------------------------------------------- WARNING: if the underlying CoreBoot BIOS does not support DPTF ACPI objects, then these instructions will not help, because DPTF user space daemon relies on INT340X thermal drivers to perform its functions, and these drivers will not load if the underlying DPTF ACPI objects are missing. Chances are that if CoreBoot in your system supports DPTF, then DPTF should have already been enabled by default in Chromium OS SDK tree. Step 1 - Locate the board overlay make.conf file in Chromium OS SDK. You will need to know the board project name of your system. For example, for the "Cyan" board, this file is at src/overlays/overlay-cyan/make.conf. Step 2 - Add the following line to make.conf: USE="${USE} dptf" If "dptf" is already part of the USE flag, then it means that DPTF has already been enabled in your system, and you can skip this step and build the OS image directly. Step 3 - Follow the official Chromium OS Developer Guide to build and install the Chromium OS image for your board. https://www.chromium.org/chromium-os/developer-guide ------------------------------------------------------------------------------- VERIFY INSTALL/CONFIGURATION ------------------------------------------------------------------------------- Upon system boot, you should be able to observe the ipf_ufd process that has been launched by upstart. ------------------------------------------------------------------------------- SELECTIVELY LOAD DPTF CONFIGURATION FILES FROM FILE SYSTEM ------------------------------------------------------------------------------- DPTF relies on a predefined set of thermal tables and parameters to operate properly. Normally this set of data is derived from the thermal tuning process for each specific platform, and is stored in the platform BIOS (CoreBoot in the case of Chrome/Chromium OS). Starting with the 8.4.10100 build, system integrators now also have the option to point to the data file that is stored in the file system instead. To use this feature, modify the DPTF service init file /etc/init/ipf.conf, at the very last line, instead of just plainly invoking ipf_ufd, add the following command line argument: exec ipf_ufd -a <full path to the DPTF config data vault file> The tools to generate DPTF config data vault files are supplied to Chromebook OEMs separately and are not available to end users. ------------------------------------------------------------------------------- MANUALLY INSTALL DPTF ON UBUNTU LINUX ------------------------------------------------------------------------------- Even though DPTF is not yet officially supported on Linux, users who wish to try it on Linux can follow steps below. Please note that these steps apply to Ubuntu Linux only, and may vary if your Linux distro is different. Requirement: DPTF requires corresponding ACPI support in BIOS. Not all Intel based platforms support DPTF in BIOS. Please contact your BIOS vendor to see if DPTF is enabled in your system. DPTF requires pm-utils to support some of the dptf functionalities. The 9.x version of DPTF also requires 4.0-rc7 kernel or later in order to run properly. To compile the DPTF source code, you need GCC version 4.8 or later. Step 1 - Install CMake tool if you have not installed it on your Linux system: sudo apt-get install cmake Step 2 - Go to the Linux subdirectory of DPTF (<DPTF root>/DPTF/Linux/build) and run the command: cmake .. This command will invoke cmake and generate all the GNU make files for each sub-modules of DPTF user space libraries. By default this command will generate the make files for 64-bit release version. If you want to build a different flavor, please examine the <DPTF root>/DPTF/Linux/CMakeLists.txt to find out what environment variables that you may need to pass to cmake. Step 3 - Run make to build all DPTF shared libraries. make -j`nproc` The generated shared libraries will be located under <DPTF root>/DPTF/Linux/build/x64/release directory. Users can disregard the static .a libraries as these static libraries are only used to build the shared library. Here is the break down of the generated shared libraries that are needed to run DPTF on Linux: * Dptf.so * DptfPolicyActive.so * DptfPolicyCritical.so * DptfPolicyPassive.so Step 4 - Copy the above shared libraries and other DPTF configuration files to proper locations on your system (assuming that you are running on a 64-bit system, otherwise replace "64" below with "32" if you are building and running on 32-bit Linux). sudo mkdir -p /usr/share/dptf/ufx64 sudo cp Dptf*.so /usr/share/dptf/ufx64 sudo mkdir -p /etc/dptf sudo cp <DPTF root>/ESIF/Packages/DSP/dsp.dv /etc/dptf Step 5 - Run make under <DPTF root>/ESIF/Products/ESIF_UF/Linux to build the ipf_ufd executable and <DPTF root>/ESIF/Products/IPF/Linux to build the ipfhostd executable. These are the main components of DPTF service executables that load the DPTF policies that you have built in Step 3. After the build is complete, you will find the ipf_ufd and ipfhostd executable generated under the corresponding directories. Please note that the default make target is a 64-bit release version. If you want to build a different flavor, please examine the Makefile under this directory to find out what environment variable you want to pass to Gnu make. Please do not alter the default settings for OS, OPT_GMIN and OPT_DBUS environment variables - they are for Chromium OS builds only, and for Linux builds, please use the default values. After the ipf_ufd and ipfhostd builds are done, copy the executables to the proper location on your system (using /usr/bin as an example, but any system path should work): sudo cp <DPTF root>/ESIF/Products/ESIF_UF/Linux/ipf_ufd /usr/bin sudo cp <DPTF root>/ESIF/Products/IPF/Linux/ipfhostd /usr/bin Step 6 - Install other shared libraries Additional ESIF libraries will be required to work with the newer format of DPTF data vault files. Run make under the following directories: <DPTF root>/ESIF/Products/ESIF_CMP/Linux <DPTF root>/ESIF/Products/ESIF_WS/Linux Copy the generated library files to /usr/share/dptf/ufx64 cp <DPTF root>/ESIF/Products/ESIF_CMP/Linux/ipf_cmp.so \ /usr/share/dptf/ufx64 cp <DPTF root>/ESIF/Products/ESIF_WS/Linux/ipf_ws.so \ /usr/share/dptf/ufx64 cp <DPTF root>/ESIF/Products/IPF/Linux/ipfsrv.so \ /usr/share/dptf/ufx64 cp <DPTF root>/ESIF/Products/IPF/Linux/ipfipc.so \ /usr/share/dptf/ufx64 Step 7 - Start DPTF. Simply run: sudo /usr/bin/ipf_ufd This executable will run in daemon mode, and DPTF policies will automatically be loaded by this executable. You can check the status of the DPTF service by running this command: pgrep -l ipf_ufd This command will show the active DPTF process ID. ------------------------------------------------------------------------------- INSTALL DPTF SERVICE ------------------------------------------------------------------------------- For Ubuntu 15.04 and later: Starting with Ubuntu 15.04 the default init system has switched to systemd. If this is the system that you use, then to auto start DPTF service, copy the ipf.service script to /lib/systemd/system: sudo cp <DPTF root>/ESIF/Packages/Installers/linux/ipf.service \ /lib/systemd/system You will then need to enable the DPTF service to auto load upon startup: sudo systemctl enable ipf.service DPTF(ipf_ufd) service will automatically start the next time the system boots. You can also manually start and stop DPTF service anytime by doing: systemctl start ipf.service # To start the service systemctl stop ipf.service # To stop the service systemctl restart ipf.service # To restart the service To auto start the DTT service, copy the dtt.service script to /lib/systemd/system: sudo cp <DPTF root>/ESIF/Packages/Installers/linux/dtt.service \ /lib/systemd/system You will then need to enable the DTT service to auto load upon startup: sudo systemctl enable dtt.service DTT service will automatically start the next time the system boots. You can also manually start and stop DTT service anytime by doing: systemctl start dtt.service # To start the service systemctl stop dtt.service # To stop the service systemctl restart dtt.service # To restart the service ------------------------------------------------------------------------------- KNOWN ISSUES / LIMITATIONS -------------------------------------------------------------------------------
Step 5 of of the Linux build instructions, looks like <DPTF root>/ESIF/Products/IPF/Linux
should be <DPTF root>/IPF/Linux
the Products/DPTF/Linux/CMakeLists.txt file has this content:
if (CHROMIUM_BUILD MATCHES YES)
message("Building for Chromium OS...")
set(CMAKE_C_COMPILER "x86_64-cros-linux-gnu-gcc")
set(CMAKE_CXX_COMPILER "x86_64-cros-linux-gnu-g++")
please delete those two lines as they are not needed and will actually get in the way of building for CrOS
One of the actions the Critical policy can take is to put the system into S3/sleep when a trip point is crossed. The current implementation does not receive ACPI suspend/resume events when this occurs (either through Critical policy taking an action, or by putting the system to sleep through OS UI mechanisms). Because we are not receiving the events, waking a system that is still warm after Critical Policy has put it to sleep will not result in Critical Policy putting the system immediately back to sleep.
The expected behavior is that if DPTF puts a system to sleep and the thermal condition is not resolved when it is woken back up, that DPTF will put it back to sleep.
for some reason, main.c hardcodes /usr/local/var/log/dptf
for the LOG setting. dptf must not write to anywhere under /usr/local.
I am using Ubuntu Noble Numbat 24.04 with cmake v3.28.3-1build7 and make 4.3-4.1build2.
Build errors:
[ 50%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ArbitratorActiveControlCapabilities.cpp.o
In file included from /home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableBase.h:23,
from /home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/ThermalRelationshipTable.h:22,
from /home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/CallbackScheduler.h:22,
from /home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/CallbackScheduler.cpp:19:
/home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableEntryBase.h:58:22: error: ‘virtual Bool RelationshipTableEntryBase::operator==(const RelationshipTableEntryInterface&) const’ was hidden [-Werror=overloaded-virtual=]
58 | virtual Bool operator==(const RelationshipTableEntryInterface& baseEntry) const override;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/ThermalRelationshipTable.h:23:
/home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/ThermalRelationshipTableEntry.h:39:14: note: by ‘Bool ThermalRelationshipTableEntry::operator==(const ThermalRelationshipTableEntry&) const’
39 | Bool operator==(const ThermalRelationshipTableEntry& trtEntry) const;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableBase.h:23,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.h:22,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.cpp:19:
/home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableEntryBase.h:58:22: error: ‘virtual Bool RelationshipTableEntryBase::operator==(const RelationshipTableEntryInterface&) const’ was hidden [-Werror=overloaded-virtual=]
58 | virtual Bool operator==(const RelationshipTableEntryInterface& baseEntry) const override;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.h:23:
/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.h:40:14: note: by ‘Bool ActiveRelationshipTableEntry::operator==(const ActiveRelationshipTableEntry&) const’
40 | Bool operator==(const ActiveRelationshipTableEntry& artEntry) const;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.h:22,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.cpp:19:
/home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableEntryBase.h:58:22: error: ‘virtual Bool RelationshipTableEntryBase::operator==(const RelationshipTableEntryInterface&) const’ was hidden [-Werror=overloaded-virtual=]
58 | virtual Bool operator==(const RelationshipTableEntryInterface& baseEntry) const override;
| ^~~~~~~~
/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.h:40:14: note: by ‘Bool ActiveRelationshipTableEntry::operator==(const ActiveRelationshipTableEntry&) const’
40 | Bool operator==(const ActiveRelationshipTableEntry& artEntry) const;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableBase.h:23,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.h:22,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActivePolicy.h:24,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActivePolicy.cpp:19:
/home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableEntryBase.h:58:22: error: ‘virtual Bool RelationshipTableEntryBase::operator==(const RelationshipTableEntryInterface&) const’ was hidden [-Werror=overloaded-virtual=]
58 | virtual Bool operator==(const RelationshipTableEntryInterface& baseEntry) const override;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.h:23:
/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.h:40:14: note: by ‘Bool ActiveRelationshipTableEntry::operator==(const ActiveRelationshipTableEntry&) const’
40 | Bool operator==(const ActiveRelationshipTableEntry& artEntry) const;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableBase.h:23,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.h:22,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActivePolicy.h:24,
from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActivePolicyInterface.cpp:19:
/home/danny/github/dptf/DPTF/Linux/Policies/../../Sources/SharedLib/DptfObjectsLib/RelationshipTableEntryBase.h:58:22: error: ‘virtual Bool RelationshipTableEntryBase::operator==(const RelationshipTableEntryInterface&) const’ was hidden [-Werror=overloaded-virtual=]
58 | virtual Bool operator==(const RelationshipTableEntryInterface& baseEntry) const override;
| ^~~~~~~~
In file included from /home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.h:23:
/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.h:40:14: note: by ‘Bool ActiveRelationshipTableEntry::operator==(const ActiveRelationshipTableEntry&) const’
40 | Bool operator==(const ActiveRelationshipTableEntry& artEntry) const;
| ^~~~~~~~
[ 50%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ArbitratorFanSpeed.cpp.o
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/build.make:90: Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActivePolicyInterface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 51%] Building CXX object Policies/PassivePolicy/CMakeFiles/DptfPolicyPassive.dir/home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/ControlStatus.cpp.o
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/build.make:118: Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTableEntry.cpp.o] Error 1
[ 51%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ArbitratorPlatformPowerControl.cpp.o
[ 51%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ArbitratorProcessorControl.cpp.o
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [Policies/PassivePolicy/CMakeFiles/DptfPolicyPassive.dir/build.make:76: Policies/PassivePolicy/CMakeFiles/DptfPolicyPassive.dir/home/danny/github/dptf/DPTF/Sources/Policies/PassivePolicy/CallbackScheduler.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 51%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ArbitratorTemperatureThresholds.cpp.o
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/build.make:104: Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActiveRelationshipTable.cpp.o] Error 1
[ 51%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ControlBase.cpp.o
[ 52%] Linking CXX shared module ../../x64/release/DptfPolicyCritical.so
[ 53%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/ControlFactoryList.cpp.o
make[1]: *** [CMakeFiles/Makefile2:969: Policies/PassivePolicy/CMakeFiles/DptfPolicyPassive.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 53%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/DomainActiveControlBase.cpp.o
[ 53%] Built target DptfPolicyCritical
[ 53%] Building CXX object UnifiedParticipant/CMakeFiles/DptfParticipant.dir/home/danny/github/dptf/DPTF/Sources/UnifiedParticipant/DomainActiveControlFactory.cpp.o
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/build.make:76: Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/home/danny/github/dptf/DPTF/Sources/Policies/ActivePolicy/ActivePolicy.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:897: Policies/ActivePolicy/CMakeFiles/DptfPolicyActive.dir/all] Error 2
I will try removing all references to -Wno-unqualified-std-cast-call
from all make files under DPTF folder and adding -Wno-error=overloaded-virtual
to CMAKE_CXX_FLAGS IN DPTF/Linux/CMakeLists.txt
looking at the Chrome Makefiles, the only difference they have now (other than -m32) is the ESIF_ATTR_64BIT define
when i look at the source, it seems to largely be unused:
once those last two issues are sorted, the define is pretty meaningless on Linux systems, so might be nice to drop references to it in the Linux Makefiles ?
I had to install libedit-dev
and also installed libboost-all-dev
. (I'm using Ubuntu Noble Numbat 24.04)
I have a new laptop with Core i7 7th Gen, and since no Windows other than 10 work on 7th Gen Intel, I decided to switch completely to Linux.
I was going through all drivers for Windows that was given in the CD that came with Laptop, and there is one driver called "DPTF", which far as I read is not implemented in Linux Kernel.
Google took me to https://github.com/01org/dptf , where there's detailed instruction on how to compile the code, with minor glitches.
In light of that,
(Step 5) /DPTF/Sources/combined.xsl doesn't exist. Should I worry about it?
Run make under /ESIF/Products/ESIF_UF/Linux to build
the esif_ufd executable.
running make with that directory in focus gives a series of errors,
++++ ++++ ESIF_UF x64 Release Linux GMIN=1 ++++ gcc -c -Wno-multichar -Werror -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fstack-protector-strong -m64 -I../../ESIF_UF/Sources -I../../ESIF_CM/Sources -I../../ESIF_WS/Sources -I../../ESIF_LIB/Sources -I../../../../Common -DESIF_ATTR_USER -DESIF_ATTR_DAEMON -DESIF_ATTR_OS_LINUX -DESIF_ATTR_OS_LINUX_HAVE_READLINE -DESIF_FEAT_OPT_ACTION_SYSFS -o ../../ESIF_UF/Sources/lin/main.o ../../ESIF_UF/Sources/lin/main.c In file included from ../../../../Common/esif_ccb_sort.h:29:0, from ../../../../Common/esif_ccb_file_lin_user.h:100, from ../../../../Common/esif_ccb_file.h:28, from ../../ESIF_CM/Sources/esif.h:198, from ../../ESIF_UF/Sources/esif_uf.h:22, from ../../ESIF_UF/Sources/lin/main.c:27: ../../../../Common/esif_ccb_file_lin_user.h: In function ‘esif_ccb_file_enum_first’: ../../../../Common/esif_ccb_sort_lin_user.h:60:48: error: implicit declaration of function ‘qsort_r’ [-Werror=implicit-function-declaration] #define esif_ccb_qsort(bas, num, siz, fn, ctx) qsort_r(bas, num, siz, fn, ctx) ^ ../../../../Common/esif_ccb_file_lin_user.h:169:3: note: in expansion of macro ‘esif_ccb_qsort’ esif_ccb_qsort(find_handle->files, find_handle->matches, sizeof(char *), esif ^ cc1: all warnings being treated as errors Makefile:180: recipe for target '../../ESIF_UF/Sources/lin/main.o' failed make: *** [../../ESIF_UF/Sources/lin/main.o] Error 1
How to fix this?
I tried installation Step6,but esif_ufd is not build
Could you give me some advice?
make++++
++++ ESIF_UF x64 Release Linux GMIN=1
++++
gcc -c -Wno-multichar -Werror -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -m64 -I../../ESIF_UF/Sources -I../../ESIF_CM/Sources -I../../ESIF_LIB/Sources -I../../../../Common -DESIF_ATTR_USER -DESIF_ATTR_DAEMON -DESIF_FEAT_OPT_COMPRESS -DESIF_ATTR_OS_LINUX -DESIF_ATTR_OS_LINUX_HAVE_READLINE -std=gnu99 -DESIF_FEAT_OPT_ACTION_SYSFS -o ../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.o ../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.c
In file included from ../../../../Common/esif_ccb_string.h:72:0,
from ../../../../Common/esif_ccb_library_lin_user.h:28,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:194,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.c:21:
../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.c: In function ‘EsifSensorMgr_RegisterSensors’:
../../../../Common/esif_ccb_string_lin_user.h:83:48: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 239 [-Werror=format-truncation=]
#define esif_ccb_sprintf(siz, str, fmt, ...) esif_ccb_sprintf_len(siz, snprintf(str, siz, fmt, ##VA_ARGS))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.c:223:2: note: in expansion of macro ‘esif_ccb_sprintf’
esif_ccb_sprintf(MAX_PATH, fullPath, "%s/%s", gSensorBasePath, devName);
^~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from ../../../../Common/esif_ccb.h:90,
from ../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.c:20:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 22 and 277 bytes into a destination of size 260
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:190: recipe for target '../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.o' failed
make: *** [../../ESIF_UF/Sources/lin/esif_uf_sensor_manager_os_lin.o] Error 1
I am trying to get these drivers running on Ubuntu 14.10 with vanilla Kernel 3.19. The stuff compiles fine with a few Kernel related tweaks. When insmod i see the following errors:
[13271.868788] esif_lf: probe of INT3400:00 failed with error -22
[13303.822229] dptf_acpi: probe of INT3400:00 failed with error -22
Platform is a Lenovo Yoga 3 Pro booting in EFI mode with DPTF enabled in BIOS.
In the UF shell, i see no participants.
esif(0)-> about
ESIF - Eco-System Independent Framework
(c) 2012-2014 Intel Corporation. All Rights Reserved.
esif_uf - ESIF Upper Framework (UF) R3
Version: 8.0.10001.10
OS: Linux x64 Release
ESIF Framework Modules:
ID Module Description Version
1 esif_shell ESIF Command Interface 8.0.10001.10
2 etf ESIF Test Framework 8.0.10001.10
esif_lf - ESIF Lower Framework (LF) R0
ESIF Kernel Driver Information:
Version: NA
esif(0)-> participants
ALL PARTICIPANTS: Count: 0
Not sure if it is supposed to work on the Core M in the Yoga 3 Pro. Would be great though to get driver support on the same level as on Windows though.
Ran make under the ESIF/Products/ESIF_UF/Linux folder and encountered following errors. kernel 5.13.2, gcc 11.1.1
gcc -c -Wno-multichar -Werror -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -m64 -I../../ESIF_UF/Sources -I../../ESIF_CM/Sources -I../../ESIF_LIB/Sources -I../../../../Common -DESIF_ATTR_USER -DESIF_ATTR_DAEMON -DESIF_FEAT_OPT_COMPRESS -DESIF_ATTR_OS_LINUX -DESIF_ATTR_OS_LINUX_HAVE_READLINE -std=gnu99 -DESIF_FEAT_OPT_ACTION_SYSFS -o ../../ESIF_UF/Sources/esif_uf_app.o ../../ESIF_UF/Sources/esif_uf_app.c
In file included from ../../../../Common/esif_ccb_string.h:72,
from ../../../../Common/esif_ccb_file_lin_user.h:26,
from ../../../../Common/esif_ccb_file.h:28,
from ../../../../Common/esif_ccb_library_lin_user.h:27,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:198,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/esif_uf_app.c:21:
In function ‘esif_ccb_strlen’,
inlined from ‘CreateDomainData’ at ../../ESIF_UF/Sources/esif_uf_app.c:579:41,
inlined from ‘EsifApp_CreateDomain’ at ../../ESIF_UF/Sources/esif_uf_app.c:619:20,
inlined from ‘EsifApp_CreateDomains’ at ../../ESIF_UF/Sources/esif_uf_app.c:700:9,
inlined from ‘EsifApp_CreateParticipant’ at ../../ESIF_UF/Sources/esif_uf_app.c:846:7:
../../../../Common/esif_ccb_string_lin_user.h:75:23: error: ‘strnlen’ specified bound 64 exceeds source size 32 [-Werror=stringop-overread]
75 | return (str ? strnlen(str, siz) : 0);
| ^~~~~~~~~~~~~~~~~
In file included from ../../ESIF_CM/Sources/esif_dsp.h:232,
from ../../ESIF_CM/Sources/esif_participant.h:60,
from ../../ESIF_UF/Sources/esif_uf_app.h:24,
from ../../ESIF_UF/Sources/esif_uf_app.c:22:
../../../../Common/esif_ccb_string_lin_user.h: In function ‘EsifApp_CreateParticipant’:
../../ESIF_UF/Sources/esif_uf_fpc.h:120:15: note: source object declared here
120 | char name[MAX_NAME_STRING_LENGTH];
| ^~~~
In file included from ../../../../Common/esif_ccb_string.h:72,
from ../../../../Common/esif_ccb_file_lin_user.h:26,
from ../../../../Common/esif_ccb_file.h:28,
from ../../../../Common/esif_ccb_library_lin_user.h:27,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:198,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/esif_uf_app.c:21:
In function ‘esif_ccb_strcpy’,
inlined from ‘esif_ccb_strcpy’ at ../../../../Common/esif_ccb_string_lin_user.h:33:26,
inlined from ‘EsifApp_Load’ at ../../ESIF_UF/Sources/esif_uf_app.c:1083:2,
inlined from ‘EsifApp_Start’ at ../../ESIF_UF/Sources/esif_uf_app.c:1009:7:
../../../../Common/esif_ccb_string_lin_user.h:40:30: error: ‘strnlen’ specified bound 260 exceeds source size 128 [-Werror=stringop-overread]
40 | size_t len = strnlen(src, siz);
| ^~~~~~~~~~~~~~~~~
../../../../Common/esif_ccb_string_lin_user.h: In function ‘EsifApp_Start’:
../../ESIF_UF/Sources/esif_uf_app.c:1045:14: note: source object declared here
1045 | char loadDir[ESIF_LIBPATH_LEN] = { 0 };
| ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:192: ../../ESIF_UF/Sources/esif_uf_app.o] Error 1
gcc -c -Wno-multichar -Werror -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -m64 -I../../ESIF_UF/Sources -I../../ESIF_CM/Sources -I../../ESIF_LIB/Sources -I../../../../Common -DESIF_ATTR_USER -DESIF_ATTR_DAEMON -DESIF_FEAT_OPT_COMPRESS -DESIF_ATTR_OS_LINUX -DESIF_ATTR_OS_LINUX_HAVE_READLINE -std=gnu99 -DESIF_FEAT_OPT_ACTION_SYSFS -o ../../ESIF_UF/Sources/esif_uf_app.o ../../ESIF_UF/Sources/esif_uf_app.c
In file included from ../../../../Common/esif_ccb_string.h:72,
from ../../../../Common/esif_ccb_file_lin_user.h:26,
from ../../../../Common/esif_ccb_file.h:28,
from ../../../../Common/esif_ccb_library_lin_user.h:27,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:198,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/esif_uf_app.c:21:
In function ‘esif_ccb_strlen’,
inlined from ‘CreateDomainData’ at ../../ESIF_UF/Sources/esif_uf_app.c:579:41,
inlined from ‘EsifApp_CreateDomain’ at ../../ESIF_UF/Sources/esif_uf_app.c:619:20,
inlined from ‘EsifApp_CreateDomains’ at ../../ESIF_UF/Sources/esif_uf_app.c:700:9,
inlined from ‘EsifApp_CreateParticipant’ at ../../ESIF_UF/Sources/esif_uf_app.c:846:7:
../../../../Common/esif_ccb_string_lin_user.h:75:23: error: ‘strnlen’ specified bound 64 exceeds source size 32 [-Werror=stringop-overread]
75 | return (str ? strnlen(str, siz) : 0);
| ^~~~~~~~~~~~~~~~~
In file included from ../../ESIF_CM/Sources/esif_dsp.h:232,
from ../../ESIF_CM/Sources/esif_participant.h:60,
from ../../ESIF_UF/Sources/esif_uf_app.h:24,
from ../../ESIF_UF/Sources/esif_uf_app.c:22:
../../../../Common/esif_ccb_string_lin_user.h: In function ‘EsifApp_CreateParticipant’:
../../ESIF_UF/Sources/esif_uf_fpc.h:120:15: note: source object declared here
120 | char name[MAX_NAME_STRING_LENGTH];
| ^~~~
In file included from ../../../../Common/esif_ccb_string.h:72,
from ../../../../Common/esif_ccb_file_lin_user.h:26,
from ../../../../Common/esif_ccb_file.h:28,
from ../../../../Common/esif_ccb_library_lin_user.h:27,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:198,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/esif_uf_app.c:21:
In function ‘esif_ccb_strcpy’,
inlined from ‘esif_ccb_strcpy’ at ../../../../Common/esif_ccb_string_lin_user.h:33:26,
inlined from ‘EsifApp_Load’ at ../../ESIF_UF/Sources/esif_uf_app.c:1083:2,
inlined from ‘EsifApp_Start’ at ../../ESIF_UF/Sources/esif_uf_app.c:1009:7:
../../../../Common/esif_ccb_string_lin_user.h:40:30: error: ‘strnlen’ specified bound 260 exceeds source size 128 [-Werror=stringop-overread]
40 | size_t len = strnlen(src, siz);
| ^~~~~~~~~~~~~~~~~
../../../../Common/esif_ccb_string_lin_user.h: In function ‘EsifApp_Start’:
../../ESIF_UF/Sources/esif_uf_app.c:1045:14: note: source object declared here
1045 | char loadDir[ESIF_LIBPATH_LEN] = { 0 };
| ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:192: ../../ESIF_UF/Sources/esif_uf_app.o] Error 1
Hello. I compiled dptf on a 4.14 kernel linux and when I try to run the daemon my computer automatically shuts down:
Jul 05 16:05:47 cammy DPTF[31225]: ERROR:[<DPTF>]<1530817547107 ms>: DPTF Build Version: 8.4.10401.9999 DPTF Build Date: Jul 5 2018 18:58:30 Source File: /home/coredump/dev/dptf_pkg/src/dptf/DPTF/Sources/Policies/PolicyLib/PolicyBase.cpp @ line 1065 Executing Function: takeControlOfOsc Message: Critical Policy: Failed to acquire OSC: Platform supports _OSC but unable to process _OSC request. Policy: Critical Policy [0]
Jul 05 16:05:47 cammy DPTF[31225]: INFO:[<ACTION>ActionSystemSet@esif_uf_action_system.c#156]<1530817547110 ms>: SYSTEM_HIBERNATE command received - system hibernate...
Jul 05 16:05:47 cammy DPTF[31225]: INFO:[<ACTION>ActionSystemSet@esif_uf_action_system.c#138]<1530817547120 ms>: SYSTEM_SHUTDOWN command received - temperature = 3182, trip point = 2732
My suspicion is that I am missing something that is preventing the OSC request, and that makes the daemon go straight to Critical and shutdown/hybernate the machine.
I have a Dell XPS 15 (9560) and it uses DPTF on Windows without issues, so I think it may be something related to kernel config or similar.
If any information could be provided I would be glad. Thanks!
I see the directory DPTF/Androidx86/jni. Can it work now for android? And how to enable dptf for android on Intel platform?
gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
cd ESIF/Products/ESIF_UF/Linux
make
++++
++++ ESIF_UF x64 Release Linux GMIN=1
++++
gcc -c -Wno-multichar -Werror -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fstack-protector -m64 -I../../ESIF_UF/Sources -I../../ESIF_CM/Sources -I../../ESIF_LIB/Sources -I../../../../Common -DESIF_ATTR_USER -DESIF_ATTR_DAEMON -DESIF_FEAT_OPT_COMPRESS -DESIF_ATTR_OS_LINUX -DESIF_ATTR_OS_LINUX_HAVE_READLINE -std=gnu89 -DESIF_FEAT_OPT_ACTION_SYSFS -o ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.o ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c
In file included from ../../../../Common/esif_ccb_string.h:72:0,
from ../../../../Common/esif_ccb_library_lin_user.h:28,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:207,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:23:
../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c: In function ‘ResetThermalZonePolicy’:
../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:2103:52: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 237 [-Werror=format-truncation=]
esif_ccb_sprintf(MAX_SYSFS_PATH, cur_node_name, "%s/%s", SYSFS_THERMAL,namelist[n]->d_name);
^
../../../../Common/esif_ccb_string_lin_user.h:67:65: note: in definition of macro ‘esif_ccb_sprintf’
#define esif_ccb_sprintf(siz, str, fmt, ...) snprintf(str, siz, fmt, ##VA_ARGS)
^~~
In file included from /usr/include/stdio.h:862:0,
from ../../../../Common/esif_ccb.h:58,
from ../../../../Common/esif_sdk.h:56,
from ../../ESIF_CM/Sources/esif.h:56,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:23:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 20 and 275 bytes into a destination of size 256
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../../Common/esif_ccb_string.h:72:0,
from ../../../../Common/esif_ccb_library_lin_user.h:28,
from ../../../../Common/esif_ccb_library.h:28,
from ../../ESIF_CM/Sources/esif.h:207,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:23:
../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c: In function ‘SetThermalZonePolicy’:
../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:2057:52: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 237 [-Werror=format-truncation=]
esif_ccb_sprintf(MAX_SYSFS_PATH, cur_node_name, "%s/%s", SYSFS_THERMAL,namelist[n]->d_name);
^
../../../../Common/esif_ccb_string_lin_user.h:67:65: note: in definition of macro ‘esif_ccb_sprintf’
#define esif_ccb_sprintf(siz, str, fmt, ...) snprintf(str, siz, fmt, ##VA_ARGS)
^~~
In file included from /usr/include/stdio.h:862:0,
from ../../../../Common/esif_ccb.h:58,
from ../../../../Common/esif_sdk.h:56,
from ../../ESIF_CM/Sources/esif.h:56,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:23:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 20 and 275 bytes into a destination of size 256
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:181: ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.o] Error 1
hi, I am using ubuntu desktop on my ultra book, I have checked my kernel has been support for 'INT3400_THERMAL_PASSIVE_2' uuid '9E04115A-AE87-4D1C-9500-0F3E340BFE75', do you have a road map to support this policy? thx.
Attempting to build dptf (revision 00b9ac1) with recent libc++ fails with errors like the following:
In file included from /tmp/dptf/DPTF/Sources/Libraries/ConfigurationFileContent/ConfigurationFileContent.cpp:21:
/tmp/dptf/DPTF/Linux/Libraries/../../Sources/ThirdParty/nlohmann_json/json.hpp:6221:19: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
6221 | typename std::char_traits<char_type>::int_type get_character()
| ^
/tmp/dptf/DPTF/Linux/Libraries/../../Sources/ThirdParty/nlohmann_json/json.hpp:23789:19: note: in instantiation of template class 'nlohmann::detail::iterator_input_adapter<std::__wrap_iter<const unsigned char *>>' requested here
23789 | auto ia = detail::input_adapter(std::forward<InputType>(i));
| ^
/tmp/dptf/DPTF/Sources/Libraries/ConfigurationFileContent/ConfigurationFileContent.cpp:137:21: note: in instantiation of function template specialization 'nlohmann::basic_json<>::from_bson<const std::vector<unsigned char> &>' requested here
137 | auto data = json::from_bson(segment);
| ^
/usr/bin/../include/c++/v1/__fwd/string.h:23:29: note: template is declared here
23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
| ^
A specialization of char_traits
for char
is required to exist, but not for unsigned char
. Previously, libc++ had a default implementation of char_traits
for arbitrary types, but this has been deprecated for some time and was removed in https://reviews.llvm.org/D157058. As a result, char_traits<unsigned char>
now fails to compile.
the current Makefiles (Products/ESIF_UF/Chrome86/Release/ and such) have issues (these aren't specific to Chromium OS ... these apply to all the Makefiles):
ifneq ($(filter default undefined,$(origin CC)),)
CC := gcc
endif
# These are the defaults.
CFLAGS ?= -o9 -m32 -pipe ...
# These are the ones we want to always use.
CFLAGS += -Wno-multichar
CPPFLAGS += -I...all the inc paths...
CPPFLAGS += -D...all the defines...
...
%.o: %.c $(DEPS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
esif_ufd: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
On step 6, I got the following error:
In file included from /usr/include/stdio.h:867,
from ../../../../Common/esif_ccb.h:90,
from ../../../../Common/esif_sdk.h:56,
from ../../ESIF_CM/Sources/esif.h:56,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/esif_uf_shell.c:25:
In function ‘fprintf’,
inlined from ‘esif_shell_cmd_config’ at ../../ESIF_UF/Sources/esif_uf_shell.c:9454:7:
/usr/include/bits/stdio2.h:100:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
../../ESIF_UF/Sources/esif_uf_shell.c: In function ‘esif_shell_cmd_config’:
../../ESIF_UF/Sources/esif_uf_shell.c:9455:12: note: format string is defined here
9455 | "%s,%s,%u,%s\n",
| ^~
In file included from /usr/include/stdio.h:867,
from ../../../../Common/esif_ccb.h:90,
from ../../../../Common/esif_sdk.h:56,
from ../../ESIF_CM/Sources/esif.h:56,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/esif_uf_shell.c:25:
In function ‘fprintf’,
inlined from ‘esif_shell_cmd_config’ at ../../ESIF_UF/Sources/esif_uf_shell.c:9454:7:
/usr/include/bits/stdio2.h:100:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
100 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
../../ESIF_UF/Sources/esif_uf_shell.c: In function ‘esif_shell_cmd_config’:
../../ESIF_UF/Sources/esif_uf_shell.c:9455:12: note: format string is defined here
9455 | "%s,%s,%u,%s\n",
| ^~
cc1: all warnings being treated as errors
make: *** [Makefile:190: ../../ESIF_UF/Sources/esif_uf_shell.o] Error 1
How to check the log in Ubuntu
In file included from /usr/include/string.h:495,
from ../../ESIF_CM/Sources/esif.h:192,
from ../../ESIF_UF/Sources/esif_uf.h:22,
from ../../ESIF_UF/Sources/lin/esif_uf_sysfs_enumerate_os_lin.c:20:
In function ‘memmove’,
inlined from ‘newParticipantCreate.constprop’ at ../../../../Common/esif_ccb_string_lin_user.h:43:3:
/usr/include/bits/string_fortified.h:40:10: error: ‘__builtin_memcpy’ reading 63 bytes from a region of size 4 [-Werror=stringop-overflow=]
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘memmove’,
inlined from ‘SysfsRegisterParticipants’ at ../../../../Common/esif_ccb_string_lin_user.h:43:3:
/usr/include/bits/string_fortified.h:40:10: error: ‘__builtin_memcpy’ reading 63 bytes from a region of size 8 [-Werror=stringop-overflow=]
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘memmove’,
inlined from ‘SysfsRegisterParticipants’ at ../../../../Common/esif_ccb_string_lin_user.h:43:3:
/usr/include/bits/string_fortified.h:40:10: error: ‘__builtin_memcpy’ reading 63 bytes from a region of size 3 [-Werror=stringop-overflow=]
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘memmove’,
inlined from ‘SysfsRegisterParticipants’ at ../../../../Common/esif_ccb_string_lin_user.h:43:3:
/usr/include/bits/string_fortified.h:40:10: error: ‘__builtin_memcpy’ reading 63 bytes from a region of size 11 [-Werror=stringop-overflow=]
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘memmove’,
inlined from ‘SysfsRegisterParticipants’ at ../../../../Common/esif_ccb_string_lin_user.h:43:3:
/usr/include/bits/string_fortified.h:40:10: error: ‘__builtin_memcpy’ reading 63 bytes from a region of size 10 [-Werror=stringop-overflow=]
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:190: ../../ESIF_UF/Sources/lin/esif_uf_sysfs_enumerate_os_lin.o] Error 1
building the project for CrOS yields this warning:
* /build/x86-alex/tmp/portage/sys-power/dptf-8.0.5-r1/work/dptf-8.0.5/Products/DPTF/Sources/Manager/Manager/EsifApplicationInterface.cpp:86:65:
warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
indeed the line in question is broken:
UInt32 getUInt32FromEsifDataGuidEvent(const esif::EsifDataPtr esifDataPtr) {
...
UInt32 value = *((UInt32*)(esifDataGuidEvent->event_context));
probably want to use a union to avoid the issue
cmake works fine
% cmake .. ~/software/dptf/DPTF/Linux/build master
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CXX Flags (initial) :
Building for Linux...
Building 64-bit release...
GCC version : 8.2.0
CXX Flags (final) : -std=c++11 -Wall -Werror -Wno-unused-value -fPIC -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -m64
CXX Debug Flags : -g -O0
CXX Release Flags : -Os
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/leonard/software/dptf/DPTF/Linux/build
But actual compilation fails
% make ~/software/dptf/DPTF/Linux/build master
[ 1%] Building CXX object SharedLib/CMakeFiles/DptfSharedLib.dir/home/leonard/software/dptf/DPTF/Sources/SharedLib/BasicTypesLib/AppVersion.cpp.o
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make[2]: *** [SharedLib/CMakeFiles/DptfSharedLib.dir/build.make:63: SharedLib/CMakeFiles/DptfSharedLib.dir/home/leonard/software/dptf/DPTF/Sources/SharedLib/BasicTypesLib/AppVersion.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:112: SharedLib/CMakeFiles/DptfSharedLib.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I've just installed this program on my system (Arch Linux, XPS 9360) and I see logs like this every few seconds in the journal:
INFO:[<ACTION>ActionSystemSet@esif_uf_action_system.c#165]<1586383697211 ms>: SYSTEM_HIBERNATE command received - system hibernate...
INFO:[<ACTION>ActionSystemSet@esif_uf_action_system.c#165]<1586383712217 ms>: SYSTEM_HIBERNATE command received - system hibernate...
Apparently my system is not hibernating every few seconds. Is this supposed to be correct? Is there any other way to see if it is actually working or not?
this file is not in the directory /dptf/source/
I'm trying to compile ESIF_UF on Ubuntu 19.10 treated at Step 6 but I'm getting this error.
++++ ++++ ESIF_UF x64 Release Linux GMIN=1 ++++ gcc -c -Wno-multichar -Werror -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -fstack-protector-strong -m64 -I../../ESIF_UF/Sources -I../../ESIF_CM/Sources -I../../ESIF_LIB/Sources -I../../../../Common -DESIF_ATTR_USER -DESIF_ATTR_DAEMON -DESIF_FEAT_OPT_COMPRESS -DESIF_ATTR_OS_LINUX -DESIF_ATTR_OS_LINUX_HAVE_READLINE -std=gnu99 -DESIF_FEAT_OPT_ACTION_SYSFS -o ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.o ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c In file included from ../../../../Common/esif_ccb_string.h:72, from ../../../../Common/esif_ccb_library_lin_user.h:28, from ../../../../Common/esif_ccb_library.h:28, from ../../ESIF_CM/Sources/esif.h:194, from ../../ESIF_UF/Sources/esif_uf.h:22, from ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:23: ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c: In function ‘ActionSysfsGet’: ../../../../Common/esif_ccb_string_lin_user.h:83:48: error: ‘%s’ directive output may be truncated writing up to 537 bytes into a region of size between 0 and 537 [-Werror=format-truncation=] 83 | #define esif_ccb_sprintf(siz, str, fmt, ...) esif_ccb_sprintf_len(siz, snprintf(str, siz, fmt, ##__VA_ARGS__)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:1340:2: note: in expansion of macro ‘esif_ccb_sprintf’ 1340 | esif_ccb_sprintf(MAX_SYSFS_PATH, cur_path, "%s/%s/power_limits", path, node); | ^~~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:867, from ../../../../Common/esif_ccb.h:90, from ../../../../Common/esif_sdk.h:56, from ../../ESIF_CM/Sources/esif.h:56, from ../../ESIF_UF/Sources/esif_uf.h:22, from ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.c:23: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 15 and 1089 bytes into a destination of size 538 67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 | __bos (__s), __fmt, __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:190: ../../ESIF_UF/Sources/lin/esif_uf_action_sysfs_os_lin.o] Error 1
Searching into this repo I found that this error was fixed for Ubuntu 18.04 in f6983da but I'm still getting it on Ubuntu 19.10
The Passive Policy currently has an issue with throttling and unthrottling sources when there are 2 sources that can be limited by the same target. The policy is handling this condition correctly. This issue is currently under investigation.
Hi,
any reason somehow there is no branch for 8.3 version?
I can see this being awailable to download on dell site, but can't see sources available.
Thanks
Everything went OK in terms of compiling, running the program and adding the system service.
When I check the service with systemctl status dptf.service however, I get this:
Is it normal, does it actually work with these errors? It might be placebo but I think the CPU ramping & fans behave a little different than before.
My system is:
building the code w/fortification fails:
In file included from /usr/i686-pc-linux-gnu/usr/include/fcntl.h:302:0,
from ../../../ESIF_CM/Sources/esif.h:195,
from ../../../ESIF_UF/Sources/esif_uf.h:22,
from ../../../ESIF_UF/Sources/lin/main.c:19:
In function ‘open’,
inlined from ‘main’ at ../../../ESIF_UF/Sources/lin/main.c:147:8:
/usr/i686-pc-linux-gnu/usr/include/bits/fcntl2.h:50:24: error: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument needs 3 arguments
Makefile:96: recipe for target '../../../ESIF_UF/Sources/lin/main.o' failed
Hello,
I'm using Pop_OS! w/ GNOME latest version.
Install went well, but the startup script fail.
Here is what systemctl status dptf.service
gives me:
● dptf.service
Loaded: loaded (/lib/systemd/system/dptf.service; disabled; vendor preset:>
Active: failed (Result: exit-code) since Mon 2020-08-24 18:32:56 CEST; 18s>
Process: 4204 ExecStart=/usr/bin/esif_ufd (code=exited, status=1/FAILURE)
aoû 24 18:32:56 pop-os systemd[1]: dptf.service: Scheduled restart job, restart>
aoû 24 18:32:56 pop-os systemd[1]: Stopped dptf.service.
aoû 24 18:32:56 pop-os systemd[1]: dptf.service: Start request repeated too qui>
aoû 24 18:32:56 pop-os systemd[1]: dptf.service: Failed with result 'exit-code'.
aoû 24 18:32:56 pop-os systemd[1]: Failed to start dptf.service.
lines 1-10/10 (END)
Any idea how to make it work?
Many thanks.
Regards,
Due to an issue with the way ESIF concatenates strings with sprintf, compiling with any level of optimization currently breaks the code. DPTF will not load in this case. The temporary workaround is to disable optimization (with -O0) when compiling.
This is present in every release up to 8.0.7. This will be fixed in the next release (8.0.8).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.