-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode compiling #4
Comments
Hey @lincolnlemos , to compile you have to do the following step:
But you actually raised a really good point, I will make release for each version in the future so that you don't even need to download Xcode. Here's a precompiled |
Thanks man! Looks like it worked here. I have some extra questions:
Best! |
Q1: It's OK to not change anything, which by default do nothing |
Glad you find my how to and that it lead you here, great! If you have noticed any inconsistencies that I can correct, let me know. I wrote the How to from memory, so I hope I haven't forgot any steps. I've just done a v2 of PROCHOT that is pending integration into the main repo. |
Damn! didn't know we could put the Kext into /Library/Extensions, I've learn something again! Thanks! |
@christophe-duc In the meantime, I think can just use |
@christophe-duc as PR #5 I'm happy to review and should be merged soon. I think maybe I need to do a release per major change + add a script for easy install. What do you all think? |
Yes it should work, I unfortunately cannot boot in recovery without a battery as it takes forever to load if it even load... so I have mine set on disable for the moment |
@christophe-duc Maybe you can play around with SIPTune in the kext and welcome to add features that fit your needs (others must have the same requirement!) :) The SIPTune is basically providing an easy way to control the CSR. |
@lincolnlemos @christophe-duc feel free to test out the latest (v2.0.0) CPUTune which contains a fantastic feature to control the HWP request at runtime. I will post more detail about the HWP request later on today. |
Hi seems interesting, I found this to explain a little better what the HWP hex decimal value could be:
I think it would be good to explain a little bit more what those values should be in the doc but I am not an expert. Should we create a binary release of the kext, so it is easier for people to download? I am also researching on my side, why I cannot enable Turboboost when the battery is not present, with CPUTune if I try, I get a forced shutdown of the mac book. Maybe HWP will help, if someone knows let me know. |
@christophe-duc Yes, I will add a doc for the hwp request. As for binary, I think it's ready to upload one for 2.0.0. As for the turbo boost, maybe you need to restore IOPlatformPluginFamily.kext? One quick question, what's the advantage of disabling ProcHot? Can we not touch it by default? From the description: "Please note that this is NOT recommended and can seriously damage your mac." I'm actually not sure if user need to disable it or enable it. |
So yes by default it would be nice not to touch it, I just put a standard
disclaimer so people are careful when they use it. When a mac book pro has
its battery removed the SMC set ProcHot to force a slow down of the CPU.
Apple does not allow mac books to run without battery. That’s when you need
to disable ProcHot.
…On Sun, 24 May 2020 at 13:15 syscl ***@***.***> wrote:
@christophe-duc <https://github.com/christophe-duc> Yes, I will add
something similar to the hwp request.
As for binary, I think it's ready to upload one for 2.0.0.
One quick question, what's the advantage of disabling ProcHot? Can we not
touch it by default? From the description: "Please note that this is NOT
recommended and can seriously damage your mac." I'm actually not sure if
user need to disable it or enable it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4E7V7JJXOMLIHE3IAE3JDRTFBY5ANCNFSM4NGNNG3Q>
.
|
@christophe-duc By default we should enable ProcHot right (usually if they don't have battery remove)? We can also add detection for battery exist or not in CPUTune |
ProcHot is present I think only when the CPU is hot, I don't think it is activated during normal operations. But I cannot test this as I am running without battery for the moment. |
@christophe-duc Take a look at the log running from my MacBookPro with battery, no fan spining, it seems the ProcHot is enable if I understand correctly
|
Yes you are correct
…On Sun, 24 May 2020 at 17:32 syscl ***@***.***> wrote:
@christophe-duc <https://github.com/christophe-duc> Take a look at the
log running from my MacBookPro with battery, no fan spining, it seems the
ProcHot is enable if I understand correctly
CPUTune @ CPUInfo: cpu model: 0x9e
CPUTune @ cpu-tune-panic not existed in NVRAM property
CPUTune @ init: succeeded!
CPUTune @ disableTurboBoost: change 0x850089 to 0x4000850089 in MSR_IA32_MISC_ENABLE(0x1a0)
CPUTune @ disableProcHot: change 0x64005f to 0x64005e in MSR_IA32_POWERCTL(0x1fc)
CPUTune @ enableSpeedShift: 0x1 in MSR_IA32_PM_ENABLE(0x770) remains the same
CPUTune @ start: registerService
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ readConfigAtRuntime: change MSR_IA32_HWP_REQUEST(0x774): 0x800d3008 -> 0x80193008
CPUTune @ stop: restore MSR_IA32_POWER_CTK from 0x64005e to 0x64005f
CPUTune @ stop: restore MSR_IA32_MISC_ENABLE from 0x4000850089 to 0x850089
CPUTune @ stop: restore MSR_IA32_PM_ENABLE from 0x1 to 0x0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4E7V53SRNMBM3ODJF5WADRTF75PANCNFSM4NGNNG3Q>
.
|
I tried to restore but it seems that IOPlatformPluginFamily takes over the control of the CPU and even if I have CPUTune.kext running I am not able to change the MSR register (or if they changed then IOPlatformPluginFamily change them back to the original value). For this to work without a battery, it seems we do have to delete IOPlatformPluginFamily. |
@christophe-duc Do I understand it correctly: when IOPlatformPluginFamily is loaded, ProcHot cannot be overwritten in MSR? Because from what I've tried, I can change MSR for HWP, turbo boost ... So I'm curious about what's the problem we are seeing here. |
In the case there is no battery.
…On Sun, 24 May 2020 at 19:41 syscl ***@***.***> wrote:
@lincolnlemos <https://github.com/lincolnlemos> Do I understand it
correctly: when IOPlatformPluginFamily is loaded, ProcHot cannot be
overwritten in MSR? Because from what I've tried, I can change MSR for HWP,
turbo boost ... So I'm curious about what's the problem we are seeing here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4E7V4HJJ4LI7747RX4WVDRTGO77ANCNFSM4NGNNG3Q>
.
|
@syscl what's your original MSR_IA32_HWP_REQUEST setting? before modifying it. Without battery I have: it does not seem right... |
Hi ! I m stuck at 800mhz with my 2011 MBP with oem battery. Is it enought to copy your kext file into /Library/Extensions folder? Thanks in advance! |
It will start the kext automatically when loading the system. I would recommend to do a test first to see if it works and then after you have confirmed it is ok, you can put it permanently into the /Library/Extensions folder. Check also the base CPU speed (without turbo boost) that's what you should get. |
Thank you for your quick response. Do you mean to test with the xcode project? Sorry for the questions.. |
just download the pre-compiled kext if you don't want to recompile it. unzip it in your favorite directory, change the ownership to root:wheel, and load the kext. sudo chown -R root:wheel CPUTune.kext see the how to if you need. |
My original value was
@christophe-duc could you try to use the latest version (v2.0.2) and see? From the log you sent, it seems to be an old version. |
@nrdgnr Yes, but I would recommend you test it before putting into Here's a precompiled binary(v2.0.2). You can also try to enable turbo boost via |
Thank you for your answers. I will try tonight.. All the best ! |
Feel free to try the latest 2.0.7 which brings a new feature that can control the maximum frequency of each cores when turbo is enabled. :) |
Hi , thank you for your support. I’ve made a clean catalina install (dosdude1 method) to my 2011 mbp with defective gpu. I tried above but probably i missed something or i didn’t understad well because super noob here.. If we consider that i put the kext file into /users/shared folder , could you give me exact order for the terminal one more time please? Thanks |
@90111 you should remove CPUTune from safe/recovery mode. Then reboot. |
Actually , those methods are not worked for me . Even i could not boot os in safe mode so i needed to restore macos. I'm currently using nobatterynoproblem.kext and loading manually via terminal after reeboot and sleep mode all the time until a permanent solution will come up. |
@syscl |
https://www.youtube.com/watch?v=tGq8RlTYHwA remove in recovery mode. |
@nrdgnr |
@90111 |
@nrdgnr |
Nope. I couldn't load on boot.. |
I created a slack channel here, if you find easier to discuss there: https://join.slack.com/t/cputune/shared_invite/zt-f48vlclf-0JSwNRYMUNKwQnJtUSu7Jg |
When I try to load that kext, I have KP... Only v 1.9.0 can load without reboot instantly... Tks. LOG: panic(cpu 0 caller 0xffffff8008e4aa3a): Kernel trap at 0xffffff7f8c580e2c, type 13=general protection, registers: Backtrace (CPU 0), Frame : Return Address System uptime in nanoseconds: 275534710937 |
@yyrikz @nrdgnr @90111 I've just fixed a kernel panic on platform that does not support HWP/SpeedShift. The CPUTune (v1.9.9+) reads MSR_IA32_HWP_REQUEST on no HWP CPUs, which cause the issue. Feel free to give CPUTune v2.1.6 a try and let me know if it works. Thanks! |
@lincolnlemos @nrdgnr @christophe-duc @90111 @yyrikz root cause the KP at boot time. I will file a fix shortly, after that feel free to enjoy reboot with CPUTune.kext! |
Feel free to test the CPUTune(v2.1.7) which fixed the kernel panic at bootstrap! No more KP! |
WOW! Looks like a charm!! NO KP!!! Huge thanks!!! |
The project works on the new Big Sur OS? I was thinking of installing it when a stable version came out. |
Hey, I'm trying to use it on El Captain but everytime I load the kext the system crashes. Version 2.1.7 crashes the system and versions 2.1.5 noNVRAM can't load and I dont know why. I also tried to use NoBatteryNoProblem and it solves the problem, however the system keeps at maximum power and heats a lot. |
@rnt0 could you please open a new issue and describe your case speicifically? |
Hello everyone, I am also trying to run my macbook without a battery following the tutorial by @christophe-duc in the first post but after spending the whole day on it without any luck, I finally managed to do it on my last try before posting here and asking for a compiled version. I just want to share what helped me to spare other people some time. I was unable to compile it. I am on MacOS 10.14.6, I had xcode 11.0 that did not work, tried to install SDK for 10.14 as per a commenter on the tutorial post, did not work, installed xcode 10.3 tried again but did not work either (always changing deployment info to 10.14). In the end I after searching the errors I got, I found this answer on stackoverflow that opening .xcodeproj instead of .xcworkspace will cause some errors. I was trying to compile CPUTuneApp and CPUTuneCore separately, only managing to compile the latter with success. So the proper way to compile it is:
And again, thanks @syscl and @christophe-duc for fixing the problems apple creates. |
Hi @Nick-Z0 Thanks for the contribution, would you be ok if I include your instructions in the blogpost (giving you credit of course). Best regards, |
Sure, thats why I wrote it. Best regards, |
Thanks a lot @Nick-Z0 , I have already updated the blog post, let me know if you wish to make any changes. Cheers! |
@christophe-duc @syscl Hello again, I am having some issues making it stick. After a reboot the kext is loaded (I can see it in kextstat) but it is not working (CPU frequency limited). To make it work I need to: only then does it work again. Do you have any suggestions I can try? I also have some other less important questions:
Thanks in advance for your answer! |
Does anyone know if it cputune.kext works in Big Sur? |
Hey guys,
Found this repository at
https://portugnole.blogspot.com/2020/05/running-macbook-without-battery-lets-go.html
I'm trying to follow the instructions but I don't know how to compile the project at Xcode.
Can someone help me with clear instructions?
I never used XCode. I tried to google it but didn't have success.
The text was updated successfully, but these errors were encountered: