GoodbyeBigSlow.kext
GoodbyeBigSlow.kext copied to clipboard
Support for MacOS Monterey
Thanks for this project!
Need prebuilt dist which supports MacOS Monterey
After installing I ran pmset -g thermlog
and it shows CPU_Speed_Limit = 50
when my mac is idle, which means that the CPU is being throttled (I have removed my battery). Is this normal or should I expect installing GoodbyeBigSlow.kext
to keep this value at 100 when idle??
Hi, here are some commands for you to diagnose the issue:
# $ <command>
# ---
# [example command output]
# ---
# see if the kext is successfully loaded
$ kextstat -a -b jakwings.kext.GoodbyeBigSlow
---
Index Refs Address Size Wired Architecture Name (Version) UUID <Linked Against>
154 0 0xffffff7f9cd60000 0x1000 0x1000 x86_64 jakwings.kext.GoodbyeBigSlow (2022.3.20) F47EE514-72F5-382F-AB54-7FE2A3003277 <8 5 3>
---
# use this SMC tool to check if PROCHOT was ever asserted by the SMC
$ curl -LO 'https://github.com/acidanthera/VirtualSMC/releases/download/1.2.9/VirtualSMC-1.2.9-RELEASE.zip'
$ unzip VirtualSMC-1.2.9-RELEASE.zip Tools/smc
# https://github.com/acidanthera/VirtualSMC/blob/master/Docs/SMCKeysMacPro.html
# Current state of all Prochots and whether the SMC itself is asserting each one.
#
# Bits 0-7: Prochot state for CPUs 0-7, respectively (1 bit per CPU).
# 1 = Prochot asserted. 0 = Prochot deasserted.
# Bits 8-15: The SMC itself is asserting Prochot for CPUs 0-7,
# respectively (1 bit per CPU; bit 8 corresponds to CPU 0,
# bit 15 corresponds to CPU 7).
# 1 = SMC is asserting Prochot to that CPU.
# 0 = SMC is NOT asserting Prochot to that CPU.
$ ./Tools/smc -r SPHT
---
SPHT [ui16] 257 (bytes 01 01)
---
# CPU_Speed_Limit = (hard_max / soft_max * 100) %
$ sysctl -a | grep plimit
---
machdep.xcpm.hard_plimit_max_100mhz_ratio: 8
machdep.xcpm.hard_plimit_min_100mhz_ratio: 8
machdep.xcpm.tuib_plimit_max_100mhz_ratio: 30
machdep.xcpm.tuib_plimit_min_100mhz_ratio: 8
machdep.xcpm.soft_plimit_max_100mhz_ratio: 30
machdep.xcpm.soft_plimit_min_100mhz_ratio: 8
---
If SMC asserted PROCHOT and GoodbyeBigSlow.kext successfully de-asserted PROCHOT, but CPU is still throttled (possibly caused by /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext
telling SMC to set Plimits), you may have to try https://github.com/calasanmarko/TurboMac which keeps the CPU running at a fixed frequency:
mkdir -p /Library/Extensions
cp -R TurboMac.kext /Library/Extensions
kextload /Library/Extensions/TurboMac.kext
don't use the installer script provided for TurboMac.kext unless it doesn't work without modifying /System/Library/Extensions/IOPlatformPluginFamily.kext
.
Thanks for looking into the issue so soon
kextstat -a -b jakwings.kext.GoodbyeBigSlow I get:
Executing: /usr/bin/kmutil showloaded --arch-info --bundle-identifier jakwings.kext.GoodbyeBigSlow No variant specified, falling back to release Index Refs Address Size Wired Architecture Name (Version) UUID <Linked Against> 185 0 0xffffff7f9a33c000 0x1000 0x1000 x86_64 jakwings.kext.GoodbyeBigSlow (2022.3.20) 88BCF108-21F1-3E14-B565-2B0B22A529BB <9 6 3>
./Tools/smc -r SPHT gives me:
SPHT [ui16] 0 (bytes 00 00)
sysctl -a | grep plimit gives me:
machdep.xcpm.hard_plimit_max_100mhz_ratio: 17 machdep.xcpm.hard_plimit_min_100mhz_ratio: 8 machdep.xcpm.soft_plimit_max_100mhz_ratio: 34 machdep.xcpm.soft_plimit_min_100mhz_ratio: 8 machdep.xcpm.tuib_plimit_max_100mhz_ratio: 34 machdep.xcpm.tuib_plimit_min_100mhz_ratio: 8 machdep.xcpm.lpm_plimit_max_100mhz_ratio: 0
Running on: Model Name: MacBook Pro Model Identifier: MacBookPro11,4 => MacBook Pro 15" 2015 Processor Name: Quad-Core Intel Core i7 Processor Speed: 2.2 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 6 MB
If smc -r SPH0
is also 0 (CPU Prochot event count since last boot) then GoodbyeBigSlow.kext is of no use for now.
I haven't figured out the way to gain privilege (like AppleSMC.kext) to tell SMC to modify Plimits (w/o reboot) or disable Plimits yet but it seems possible by using Lilu.kext which VirtualSMC.kext depends on.
https://github.com/calasanmarko/TurboMac
if it's a permissioning issue, TurboMac.kext specifies this additional stem for BigSur +
OS X 11 (Big Sur) and higher: Also disable Authenticated Root by running csrutil authenticated-root disable from Recovery mode.
is it relevant?
csrutil authenticated-root disable
is for turning off Signed System Volume Security, don't know if it affect SMC modification. The TurboMac installer is doing something like this article does but I don't know which one is better.
Anyway /System/Library/Extensions/IOPlatformPluginFamily.kext is still intact on my system. My CPU does not support HWP (MSR IA32_HWP_REQUEST
) but alternatively writing the wanted CPU frequency to the universal MSR IA32_PERF_CTL
works pretty good when I don't want to reboot and reset SMC. CPU_Speed_Limit
would be still below 100% but the CPU unthrottled.
Before giving up on GoodbyeBigSlow.kext and uninstalling it, try again to reset SMC (can't tell whether it is actually reset). It might work this time, for a few days maybe (before Plimits kick in) if PROCHOT is ever asserted by SMC after reboot. When the hard plimit is set, PROCHOT won't be asserted by SMC, therefore I need to reset SMC to make GoodbyeBigSlow.kext works.
A late note: to show the log messages from the kext, run:
$ log show --predicate '(sender == "GoodbyeBigSlow")' --style syslog --info --debug --source --timezone UTC
...
Timestamp (process)[PID]
... (NOTE: after loading the kext) ...
2022-03-25 08:53:07.539982+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::init(OSDictionary*) (GoodbyeBigSlow.cpp:106)> [GoodbyeBigSlow] Initializing ...
2022-03-25 08:53:07.539988+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::init(OSDictionary*) (GoodbyeBigSlow.cpp:120)> [GoodbyeBigSlow] Initializing ... Success
2022-03-25 08:53:07.539993+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::probe(IOService*, int*) (GoodbyeBigSlow.cpp:132)> [GoodbyeBigSlow] Probing ...
2022-03-25 08:53:07.539996+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::probe(IOService*, int*) (GoodbyeBigSlow.cpp:139)> [GoodbyeBigSlow] Probing ... Success
2022-03-25 08:53:07.540148+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::start(IOService*) (GoodbyeBigSlow.cpp:145)> [GoodbyeBigSlow] Starting ...
2022-03-25 08:53:07.540151+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::start(IOService*) (GoodbyeBigSlow.cpp:150)> [GoodbyeBigSlow] De-asserting Processor Hot ...
2022-03-25 08:53:07.540160+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::start(IOService*) (GoodbyeBigSlow.cpp:0)> [GoodbyeBigSlow] De-asserting Processor Hot ... Done
2022-03-25 08:53:07.540163+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::start(IOService*) (GoodbyeBigSlow.cpp:174)> [GoodbyeBigSlow] Starting ... Success
... (NOTE: when unloading the kext) ...
2022-03-25 08:55:04.507579+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::stop(IOService*) (GoodbyeBigSlow.cpp:180)> [GoodbyeBigSlow] Stopping ...
2022-03-25 08:55:04.507611+0000 localhost kernel[0]: (GoodbyeBigSlow) <GoodbyeBigSlow`GoodbyeBigSlow::free() (GoodbyeBigSlow.cpp:125)> [GoodbyeBigSlow] Freeing ...
...
# to view more verbose logs
$ log show --predicate '(eventMessage CONTAINS "GoodbyeBigSlow")' --style syslog --info --debug --source --timezone UTC
...
[omitted here]
...
The messages are not always logged when I run kextload
or kextunload
, just weird.
only get this:
Filtering the log data using "sender == "GoodbyeBigSlow"" Timestamp (process)[PID]
Try manual reloading then read the log again?
sudo kextunload -b jakwings.kext.GoodbyeBigSlow
sudo kextload -b jakwings.kext.GoodbyeBigSlow
and anything weird about --predicate '(eventMessage CONTAINS "GoodbyeBigSlow")'
?
Same issue on my macbook pro 2017, Moterey 12.1
$ kextstat -a -b jakwings.kext.GoodbyeBigSlow
Executing: /usr/bin/kmutil showloaded --arch-info --bundle-identifier jakwings.kext.GoodbyeBigSlow
No variant specified, falling back to release
Index Refs Address Size Wired Architecture Name (Version) UUID <Linked Against>
112 0 0xffffff7f9a34e000 0x1000 0x1000 x86_64 jakwings.kext.GoodbyeBigSlow (2022.5.31) EC585AD4-CF3C-3337-A577-BCE572BFAFAC <9 6 3>
$ ./Tools/smc -r SPHT
SPHT [ui16] 0 (bytes 00 00)
$ ./Tools/smc -r SPH0
SPH0 [ui16] 0 (bytes 00 00)
I can't reset SMC depends on https://support.apple.com/en-us/HT201295 Reset the SMC on other computers -Notebook computers with a nonremovable battery 4.Keep holding all four keys for 10 seconds. 5.Release all keys, then press the power button to turn on your Mac.
step5 can't success, I can't turn on my mac if i do not replug the power
@FMLS
step5 can't success, I can't turn on my mac if i do not replug the power
That's unfortunate, but there is no good way to tell whether SMC is actually reset.
The next version of my kext will log whether RPOCHOT is asserted by reading the specific MSR.
@iology Thanks for the prompt reply, looking forward to the new version
@FMLS The latest release v2022.8.10 counts the PROCHOT assertions. After installation and restart, check output of command log show --predicate '(sender == "GoodbyeBigSlow")' --style syslog --info --debug --source
for the recent logs.