cankiulascmnfye Posted November 18, 2023 Share Posted November 18, 2023 (edited) In October 2023, Intel discontinued Intel Power Gadget. A simple but super useful tool which allowed monitoring the CPU's behavior in a really elegant manner. It displayed all the relevant data inside a neatly desgined GUI (on macOS at least). But the app is no longer compatible with macOS and newer Intel CPUs (11th Gen+). In macOS 14.2 beta 3, Intel Power Gadget causes the CPU to freak out and run at 100% on all cores. So it's highly recommended to uninstal it via the incuded uninstaller, so the EnergyDriver.kext it uses is uninstalled as well. As a replacement, Intel introduced the Performance Counter Monitor (PCM). This "glorious" new tool has no macOS app that you can simply download, install and run. Instead, you have to jump through hoops to get it working. And on top of that: it runs in Terminal and doesn't really help you much with monitoring CPU frequencies since everything mostly consists of charts with stats – no graphs. Anyway, below you will find the instructions, to download, compile, install and run Intel PCM. It took me some time and help from others to figure this out, so I hope it helps you. Prerequistes: Uninstall Intel Power Gadget (use the Uninstaller.pkg located in Application/Intel Power Gadget so that it also uninstalls the EnergyDriver.kext from Library/Extensions as well) Minimum OS: macOS Monterey+ Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Install Cmake. brew install cmake Building PCM Tools: Clone the Intel PC Repo: git clone --recursive https://github.com/opcm/pcm.git Navigate to the pcm folder: cd ~/pcm Build the PCM binaries (this can take a few minutes): mkdir build cd build cmake .. cmake --build . Install the tools and required PcmMsrDriver.kext: sudo make install NOTE: macOS will notfiy you about a new extension. You need to allow it (Gatekeeper) Reboot Running PCM Tools: In Terminal, enter: sudo ~/pcm/build/bin/pcm -r Edited November 18, 2023 by cankiulascmnfye Updated Instructions 5 Link to comment Share on other sites More sharing options...
seyd46 Posted November 18, 2023 Share Posted November 18, 2023 good job, thank Link to comment Share on other sites More sharing options...
seyd46 Posted November 18, 2023 Share Posted November 18, 2023 (edited) Adlerlake Problem Regrettably, at the moment, incorporating Alder Lake support for MacOS is beyond our current focus. Nevertheless, we warmly welcome pull requests adding the support. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread. {23-11-18 22:07}Pluton-V:~ seyd% sudo ~/pcm/build/bin/pcm -r ^[[3~Password: Sorry, try again. Password: Intel(r) Performance Counter Monitor ($Format:%ci ID=%h$) ===== Processor information ===== Hybrid processor : yes IBRS and IBPB supported : yes STIBP supported : yes Spec arch caps supported : yes Max CPUID level : 32 CPU model number : 151 PCM Error: Hybrid processors are not supported for your OS Resetting PMU configuration Zeroed PMU registers WARNING: Core 1 IA32_PERFEVTSEL0_ADDR is not zeroed 18446744073709551615 Access to Intel(r) Performance Counter Monitor has denied (Performance Monitoring Unit is occupied by other application). Try to stop the application that uses PMU. Alternatively you can try running PCM with option -r to reset PMU. Cleaning up Zeroed PMU registers Zeroed uncore PMU registers Edited November 28, 2023 by seyd46 Link to comment Share on other sites More sharing options...
cankiulascmnfye Posted November 18, 2023 Author Share Posted November 18, 2023 Well, PCM installed and running. Look for support on the pcm github page for fixing this issue: "Performance Monitoring Unit is occupied by other application" My guess is: another monitoring tool is currently running. Like iStat menu or Intel Power Gadget (EnergyDriver.kext) Link to comment Share on other sites More sharing options...
seyd46 Posted November 18, 2023 Share Posted November 18, 2023 I remove Intel Power Gadget (EnergyDriver.kext) Same problem I searched and submitted the error in github thank man I searched and submitted the error I searched and submitted the error I searched and submitted the error I searched and submitted the error 1 Link to comment Share on other sites More sharing options...
seyd46 Posted November 19, 2023 Share Posted November 19, 2023 The pcm team sent me an email about this problem. I gave them feedback, to be continued Link to comment Share on other sites More sharing options...
user232 Posted November 26, 2023 Share Posted November 26, 2023 (edited) Thanks, works on my CoffeeLake. Is there a GUI planed in future? pcm.command Problem: I think CPU-Temp 64 is not correct. iStat schows 33 Edited November 26, 2023 by user232 1 Link to comment Share on other sites More sharing options...
cankiulascmnfye Posted November 26, 2023 Author Share Posted November 26, 2023 @user232 The data can be visualized with grafana. But I haven't looked into the instructions yet Link to comment Share on other sites More sharing options...
Slice Posted November 27, 2023 Share Posted November 27, 2023 13 hours ago, user232 said: Thanks, works on my CoffeeLake. Is there a GUI planed in future? Problem: I think CPU-Temp 64 is not correct. iStat shows 33 I am not sure if iStat is more correct. Link to comment Share on other sites More sharing options...
user232 Posted November 27, 2023 Share Posted November 27, 2023 (edited) iStats is correct, pcm with 65 is incorrect. The CPU works in idle Edited November 27, 2023 by user232 Link to comment Share on other sites More sharing options...
cankiulascmnfye Posted November 27, 2023 Author Share Posted November 27, 2023 14 hours ago, user232 said: iStats is correct, pcm with 65 is incorrect. The CPU works in idle 65 sounds way too high for Idle on a desktop. Weird. Maybe it's using the wrong sensor. 1 Link to comment Share on other sites More sharing options...
cankiulascmnfye Posted November 28, 2023 Author Share Posted November 28, 2023 Good news: Intel Power Gadget works normally again in macOS 14.2 beta 4!! 2 Link to comment Share on other sites More sharing options...
user232 Posted November 29, 2023 Share Posted November 29, 2023 (edited) How can I remove PCM completely? I think I must manually clean my System? /usr/local/sbin/pcm /usr/local/sbin/pcm-numa /usr/local/sbin/pcm-latency /usr/local/sbin/pcm-power /usr/local/sbin/pcm-msr /usr/local/sbin/pcm-memory /usr/local/sbin/pcm-tsx /usr/local/sbin/pcm-pcie /usr/local/sbin/pcm-core /usr/local/sbin/pcm-iio /usr/local/sbin/pcm-lspci /usr/local/sbin/pcm-pcicfg /usr/local/sbin/pcm-mmio /usr/local/sbin/pcm-tpmi /usr/local/sbin/pcm-raw /usr/local/sbin/pcm-accel /usr/local/sbin/pcm-sensor /usr/local/sbin/pcm-bw-histogram /usr/local/share/pcm/opCode-106.txt /usr/local/share/pcm/opCode-134.txt /usr/local/share/pcm/opCode-143-accel.txt /usr/local/share/pcm/opCode-143.txt /usr/local/share/pcm/opCode-85.txt /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-55-B.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-4F-1.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-55-4.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-8F-8.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-86-5.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-8F-6.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-55-7.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-8E-C.json /usr/local/share/pcm/PMURegisterDeclarations/GenuineIntel-6-6A-6.json /usr/local/share/licenses/pcm/LICENSE /usr/local/share/doc/PCM/README.md /usr/local/share/doc/PCM/CUSTOM-COMPILE-OPTIONS.md /usr/local/share/doc/PCM/CXL_README.md /usr/local/share/doc/PCM/DOCKER_README.md /usr/local/share/doc/PCM/ENVVAR_README.md /usr/local/share/doc/PCM/FAQ.md /usr/local/share/doc/PCM/FREEBSD_HOWTO.txt /usr/local/share/doc/PCM/LINUX_HOWTO.txt /usr/local/share/doc/PCM/MAC_HOWTO.txt /usr/local/share/doc/PCM/PCM-EXPORTER.md /usr/local/share/doc/PCM/PCM-SENSOR-SERVER-README.md /usr/local/share/doc/PCM/PCM_ACCEL_README.md /usr/local/share/doc/PCM/PCM_RAW_README.md /usr/local/share/doc/PCM/STARS.md /usr/local/share/doc/PCM/WINDOWS_HOWTO.md /usr/local/share/doc/PCM/generate_summary_readme.md /usr/local/share/doc/PCM/license.txt /usr/local/lib/libPcmMsr.dylib /Library/Extensions/PcmMsrDriver.kext/Contents/MacOS/PcmMsrDriver /Library/Extensions/PcmMsrDriver.kext/Contents/Info.plist Edited November 29, 2023 by user232 Link to comment Share on other sites More sharing options...
cankiulascmnfye Posted November 29, 2023 Author Share Posted November 29, 2023 I think oyu only have to delete the pcm folder and unintsll the kext. But the FAQ has more info (Q 10): https://github.com/intel/pcm/blob/master/doc/FAQ.md Link to comment Share on other sites More sharing options...
user232 Posted November 29, 2023 Share Posted November 29, 2023 (edited) I know, but dont work, so I delete first PcmMsrDriver.kext and do this. Quote user232@iMac pcm % pwd /Users/user232/pcm user232@iMac pcm % sudo ~/pcm/build/bin/pcm --uninstallDriver Password: Intel(r) Performance Counter Monitor ($Format:%ci ID=%h$) ===== Processor information ===== Hybrid processor : no IBRS and IBPB supported : yes STIBP supported : yes Spec arch caps supported : yes Max CPUID level : 22 CPU model number : 158 IOServiceOpen returned 0x10000003 Unable to build CPU topology WARNING: unknown command-line option: "-". Ignoring it. Usage: /Users/user232/pcm/build/bin/pcm --help | [delay] [options] [-- external_program [external_program_options]] <delay> => time interval to sample performance counters. If not specified, or 0, with external program given will read counters only after external program finishes Supported <options> are: -h | --help | /h => print this help and exit -silent => silence information output and print only measurements --version => print application version -pid PID | /pid PID => collect core metrics only for specified process ID -r | --reset | /reset => reset PMU configuration (at your own risk) -nc | --nocores | /nc => hide core related output -yc | --yescores | /yc => enable specific cores to output -ns | --nosockets | /ns => hide socket related output -nsys | --nosystem | /nsys => hide system related output -csv[=file.csv] | /csv[=file.csv] => output compact CSV format to screen or to a file, in case filename is provided the format used is documented here: https://www.intel.com/content/www/us/en/developer/articles/technical/intel-pcm-column-names-decoder-ring.html -i[=number] | /i[=number] => allow to determine number of iterations -f | /f => enforce flushing output Examples: /Users/user232/pcm/build/bin/pcm 1 -nc -ns => print counters every second without core and socket output /Users/user232/pcm/build/bin/pcm 1 -i=10 => print counters every second 10 times and exit /Users/user232/pcm/build/bin/pcm 0.5 -csv=test.log => twice a second save counter values to test.log in CSV format /Users/user232/pcm/build/bin/pcm /csv 5 2>/dev/null => one sample every 5 seconds, and discard all diagnostic output Cleaning up Zeroed PMU registers Zeroed uncore PMU registers user232@iMac pcm % Now I cleanup manually. Quote user232@iMac pcm % rm /usr/local/sbin/* zsh: sure you want to delete all 18 files in /usr/local/sbin [yn]? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-accel? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-bw-histogram? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-core? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-iio? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-latency? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-lspci? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-memory? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-mmio? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-msr? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-numa? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-pcicfg? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-pcie? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-power? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-raw? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-sensor? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-tpmi? y override rwxr-xr-x root/admin for /usr/local/sbin/pcm-tsx? y Quote user232@iMac share % sudo rm /usr/local/lib/libPcmMsr.dylib Edited November 29, 2023 by user232 1 Link to comment Share on other sites More sharing options...
ArcaneRhapsody Posted December 4, 2023 Share Posted December 4, 2023 Thanks for the detailed guide on installing Intel PCM on macOS. I was wondering, since PCM is more Terminal-based and lacks the user-friendly GUI of Intel Power Gadget, do you have any tips or recommendations for users who are not as familiar with Terminal commands? Also, are there any third-party tools or scripts that you would recommend to make monitoring with PCM a bit more intuitive or visually accessible for those who might miss the graphical interface of the old Power Gadget? Thanks again for your valuable insights! Link to comment Share on other sites More sharing options...
cankiulascmnfye Posted December 4, 2023 Author Share Posted December 4, 2023 @ArcaneRhapsody If you have macOS 14.2 beta 4 (23C5055b) installed. you can use Intel power Gadget again for 2nd to 10the Gen Intel Core. 1 Link to comment Share on other sites More sharing options...
Slice Posted December 4, 2023 Share Posted December 4, 2023 On 11/26/2023 at 9:34 PM, user232 said: Thanks, works on my CoffeeLake. Is there a GUI planed in future? pcm.command 155 B · 7 downloads Problem: I think CPU-Temp 64 is not correct. iStat schows 33 Agree TEMP is wrong for me too. Link to comment Share on other sites More sharing options...
Slice Posted December 4, 2023 Share Posted December 4, 2023 But TEMP = Tjmax - Treal So, if you see 65 and Tjmax = 110 then Treal = 35 2 Link to comment Share on other sites More sharing options...
Recommended Posts