Closed ghost closed 6 years ago
Ramark about SSDT-XCPM - it's disabled in config.plist by rehabman because it's generating via PluginType=True anyway.
Thanks for your reporting again! I agree with you that SSDT-Plugintype1 is a mistake and is not needed if Plugintype is checked in config. I have already deleted this file in my own github.
I have worked on HWP for a while and I am interested with your method. What I have done is here: https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-25#post-1732891. The author in the thread said XCPM and HWP cannot be both opened on Kabylake, which I confirmed. So the daliansky's EFI only opens XCPM not HWP technically. Could you send your CLOVER file to me. I am curious about
(pure setup, almost no kext and the only patched SSDT is SSDT-XCPM)
Maybe you generate a patched SSDT-XCPM and change the frequencyvector to enable HWP? That's what I want to do but it requires time and effort. If the Power Gadget shows the appropriate frequency shifting graph, then I will submit your changes to daliansky who is quite busy right now.
I did nothing special, just generated valid and accurate SMBIOS and used clean info from tonymacx86 and RehabMan GitHub repo, I want to do all as clean as possible so I don't touch dialinsky sources at all. Maybe it'll require more time to investigate things dialinsky already solved but it's a challenge and adventure for me 😄 . As I said there is nothing interesting in my Clover as for now it's Rehabman's base, but here it is. experiemental.zip
After seeing your CLOVER, I think I tried to remove CPUFriend* before, which is a little bit similar to your situation. The result I get is not efficient CPU Power management. Could you try to use the following software and post your graph? I install all my kexts in /L/E, so it's a bit hard for me to stimulate the same environment as yours. Intel® Power Gadget-2.dmg.zip (Maybe it's in Chinese, but it should function in the same way as an English version)
Oh, I'm using it already. Okay, for now I don't have access to my laptop, but I'll post it as fast as I can.
My graph: I used youtube + 4 Safari tabs + Mail Client + Telegram.
I tired to stimulate the same condition as you. My graph: I used youtube + 4 Safari tabs(includes youtube webpage) + Mail Client + QQ(you can say Chinese Telegram). I modified the lowest frequency(from default 1300mhz to 400mhz) by using CPUFirendDataProvider, and the battery performance may be better.
Seems really good, but I deleted CPUFriend from my setup. I guess it's can be done via HWP field in Clover. I got i7 version if that matters. UPD: Steve, sorry about writing it here, but I can't open an issue in your repository. I installed your version as it's newer and more optimized, but seems like USBInjectAll doesn't work right. Ports HS05 and HS08 (which is Intel Bluetooth and ELAN Fingerprint sensor) aren't injected in SSDT-UIAC but still there according to IORegistryExplorer.
Mine is i7 too. The Clover's HWP is not prefect I think. Reference:https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-8
Thanks for Rehabman remind, I only focus power saving result and forget about sleep / wake up issue. HWP disabled after wake up issue only affect Clover method, dummy injector method have no problem, tested with NV GT630, since my IGPU has common sleep / wake up issue, it is not a problem for me.
For Q2, I just tested it and I don't find any problem. HS05 is injected and HS08 is not, which matches the result in IORegistryExplorer.
The Clover's HWP is not prefect I think. Reference:https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-8
This post is one-year old, AFAIK Clover team fixed that bug. Can you please post report from AppleIntelInfo with your version (CPUFriend)? (chown\chmod it and run for 5 minutes and only after it get logs, because it doesn't determine all PStates immediately)
I just tested it and I don't find any problem. HS05 is injected and HS08 is not
My fault. BTW did you got working Intel Bluetooth without Ubuntu/Windows being booted? Mine just eating battery and don't work.
Sorry for delay. I am very busy right now. Since I am using HWPEnabler.kext, I have to replace it with CPUFriend.kext and send the report to you. Maybe a few days later I will do it.
Any updates on native HWP?
It seems like HWPEnabler.kext
won't work after sleep, so do HWPEnable
in Clover. My solution is using a sleepwatcher to reload HWPEnabler.kext
after every sleep, but this solution has to be done in system partition.
Eh, doesn't feel like something solid and clean. What's about current setup? It uses XCPM? After all, did you tried without kexts at all? I'm using MBP14,2 SMBIOS and it looked like HWP is worked. Also you can try to inject HWP value without enabling HWP in Clover if you don't like power consumption.
Hello and thank you for all your effort and for this great repository. I don't have the knowledge yet to contribute but im always testing stuff to find out if i can help. I'm a computer engineering so i'm trying to understand some stuff about black80211 for example in order to make wifi work, but i have limited time so testing some stuff only on weekends.
Anyway, I have a Xiaomi Notebook Pro the i5 version, and i'm using stevezhengshiqi repository and everything works great. I have triple boot on my laptop, Windows, Linus (Elementary), Mac OS and on all this operating systems i like to monitor cpu temperature and usage. I noticed that Linux has the best power management, with temp always around 40 with no fans on, battery lasting at least 6-7 hours. Then Windows is working close to Linux but the fans are working more that Linux but again if enable battery saver i can get around 7-8 hours. On Windows i also monitor power consumption and i noticed that if i have my laptop idling the consumption can dropped at 3mW and on average is 8mW.
The problem is that on Mac OS the fans are always working, and i have to keep my laptop idling for around 5 minutes in order have the fans stopped and then if i open a new tab the fans start again. Also the temp is around 40 but with the fans on. Regarding power consumption i tested it with the same conditions as on Windows, and i noticed that the lowest power consumption that we can achieve is 6mW and on average is above 10mW.
Do you know what is the cause for that? I am searching some stuff but if you can help me understand what might be the problem i will appreciate that. I'm using BatteryBar on windows and coconutBattery on Mac OS to find the power consumption.
Thank you guys for reply. I am really happy that you both have provided detailed feedback. Well, I recently will have a summer school in US for about 4 weeks; and maybe I don't have time to work on PM during the time. Hope someone can make our device have a more efficient PM.
I can explain the theory of PM in my repository, which is one of the best ideas I can think of.
First, it's a good idea to use native SMBIOS settings(MacBookPro 14,1), but I don't think it's efficient enough. We can look at the frequency vector in X86PlatformPlugin.kext
(/System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources/Mac-B4831CEBD52A0C4C.plist). It shows that the minimum frequency is 1300mhz, a bit high.
0d means 13 in denary number. I changed value here to 04, which means 400mhz. The reason I choose 400mhz is that the script from https://github.com/Piker-Alpha/freqVectorsEdit.sh recommends this value.
After dealing with minimum frequency, we can also modify PM mode to "power-saving mode". According to post #67 at (https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/page-7), I find and replace "65707000 00000000 00000000 00000000 00000000 80000000" to "65707000 00000000 00000000 00000000 00000000 C0000000". "C0" represents a more power saving mode.
Then we can get a patched Mac-B4831CEBD52A0C4C.plist
. In order to keep system partition clean, we have to use kexts to inject our new PM plist. So CPUFriend
from PMHeart is probably a good idea. By using ResourceConvertor.sh
, we get a CPUFriendDataProvider.kext
. With CPUFriend
and CPUFriendDataProvider
, the new PM plist will override the origin one.
The power behavior can be seen at #8 at this page. The minimum frequency surely dropped, from 1300mhz to about 790mhz. Also, the average Power and Frequency is lower than @PavelLJ 's picture when we have almost the same Utilization. Actually, the average Utilization of my device is a bit higher though my average power is lower, suggesting a more efficient PM I guess?
The problem I meet: By using CPUFriend*.kext
, the PM uses XCPM. I am trying to open HWP, but the thread (https://www.tonymacx86.com/threads/skylake-hwp-enable.214915/) says XCPM and HWP can't be opened both at KabyLake.
It seems like origin SMBIOS settings with no CPUFriend*.kext
can let HWP work, but I don't think this way is efficient since the high minfrequency and power-saving mode. What's more, it's really time-consuming to test PM by using AppleIntelInfo.kext
. If someone can provide a better idea, that will be really nice.
Please post your PM test screenshot with youtube + 4 Safari tabs + Mail Client + Telegram if you have a better PM.
Okay, this is my idea: as Clover provides HWP value (which is actually a configuration of how speedshifting should work), as I checked earlier HWP works with origin SMBIOS, so I can just leave "HWPEnable" of Clover and not kill power management after sleep. I can choose the config value which will be power efficent enough (there is a grade with about 90 values) and inject it through Clover. Test will be there soon, now I just don't have enough time to play around my laptop.
Thank you for your answer, i don't have a better PM because i'm using everything that you have at this time. I notice a few months ago that indeed the frequency was not as low as on windows so i used freqVectorsEdit.sh and managed to drop it to 790mhz.
I also noticed something that its worth mention it. While using Chrome i notice that the temp and the cpu usage while watching youtube its higher than Safari. I mean that if i open a chrome tab or a youtube tap the fans kick off and the temp is 46C for a few minutes. Last night i was watching youtube with Safari and the fans didn't even started in some cases!!!
Also i would like to share a tip with you. I purchased Turbo Boost Switcher Pro two months ago, which gives you the option to disable turbo boost and i'm really using it while i'm on battery(There is an autoswitcher when you use battery). This does not let the fans kick off so quickly and the temperature does not have these spikes while using the laptop for browsing etc. Even now i used my laptop for 1 hour, and the CoconutBattery says that i have 6 hours remaining time with power consumption 8-9mW on average. I hope that helps.
@PavelLJ Thank you, I will try this way later.
@gplast Thanks for reply. The reason I don't recommend to use freqVectorsEdit.sh
directly is that it modifies Mac-B4831CEBD52A0C4C.plist
in system partition, which I personally dislike. So, an external injector is needed. The PM now I think it's efficient enough; and I give my screenshot to prove that. Since different people have different ways to use the device, the battery life results are not identical. Also, bad-written softwares may also cause low battery life. The PM using now it's quite native: Clover can read CpuPm tables from our device if PluginType
is checked in config.plist
.
The Turbo Boost Switcher idea is great, but it can't be moved into EFI folder. Some users may need turbo boost for battery life as well. I can't deny that it's a good software for those people who care for battery life more. It seems like you have found a solution for your problem, good for you.
Yes of course, i also think that PM is really efficient at this time i just had to let you know about the differences between the performance on different operating systems.
I am using hackintosh for the past 4 year (also installed on my Dell Latitude E6520 ) and the temperature was always better on Mac OS compared to Windows so i think that i might do a fresh install on my machine since i can see some stuff that it might be my fault.
Thank you for everything again and have a nice time on the summer school :)
By the way, continuing talks about HWP: As i mentioned before i played around BIOS, and with latest one (today I upgraded to 0603 BIOS), there is interesting setting like Intel SpeedShift (aka native HWP even on Windows) and DVMT (which needs a fix now but it's can be abandoned if we change BIOS value to right one). I already did this and i should say it's almost safe (changes in NVRAM may be reverted by plugging off the battery from the computer). Also there is native 0xE2 problem fix (CFG LOCK option in BIOS). I think it's intriguing enough to make you google something about it. Here is variables from 603 BIOS IFR.txt UPD: As a proof of my decisions i need to attach a AIDA64 screenshot with stock values of 0603 BIOS.
I'm on bios 502, I left laptop in sleep mode for a night (fully charged), in the morning I see the charge dropped to %43. No good
@Neolo The quick drop is your own problem. Please check your settings and try to find the reason by yourself.
If you keep on questioning the EFI folder, instead of trying to find the reason or giving constructive suggestions, I will just ignore you.
Huh. I report the issue, it's clean install with YOUR efi folder. You should appreciate when someone tests your work, instead of being rude. I'm pretty sure you haven't done any of a real life tests. 5 clicks, 2 min youtube video playback it's all you do, and getting mad.
@Neolo Dude, don't be rude to the guy who developed the folder and maintaining it for free, it's awful. By the way try to turn off BIOS USB charger at all, it helped me. Sleep is 80% not straight depends on OS. Also try to find hibernate - disable it as it wouldn't work and will wake your laptop after 5hrs. Also, disable PowerNap if it's enabled.
@Neolo, Steve is really doing good job and helping us by maintaining the codebase. Sometimes we don't install property hence some of the bugs.
I'm rude? I wrote a single sentence that battery died in sleep, he responded "it's your problem". Who the heck is rude here?? Gihub is in general free, if you are getting insulted so easily by comments, wipe it down and start paid project. Jesus Christ! Crazy! BYE
FYI: Folder is a scrap of other's work, by the way.
@Neolo Thanks for reply. It's welcome for everyone to post issue. What I am not happy with is that you are not trying to find the reason behind the issue by yourself except just reporting. It's not helpful for development because no constructive suggestions are given. You are the only person who can debug your EFI folder since the battery issue happens on YOUR device. What I can do as an EFI contributor is to share my work on PM to public. If no better suggestions are given, the issue will never be solved, resulting endless argues.
As you said "5 clicks, 2 min youtube video playback" can't prove anything, your one night battery drop can't prove anything either.
Also I don't quite agree with your saying "Github is in general free". I think we should respect Github as a public place where wise programmers from all over the world share their valuable thoughts and codes, instead of a place for free chat.
@stevezhengshiqi can you provide me your origin folder, the newest one you have now. I need to patch dsdt for voodooi2c
@masterbater Sure, if you mean CLOVER/ACPI/origin . origin.zip I think Xiaomi NoteBook Pro's trackpad don't need to be patched for VoodooI2C according to what https://voodooi2c.github.io/#GPIO%20Pinning/GPIO%20Pinning says:
If you do not have IOInterruptSpecifiers listed as above then you are good to go and can skip straight to the section Installing the kext.
Thanks @stevezhengshiqi apparently i've got a lenovo 320-15ikb which has the same major specification for xiaomi mi pro i7 8550u intel uhd 620, I am using your repo, working great very happy with it i feel like its much faster and more updated than daliansky's version, only trackpad is not working no prefpane and gestures since i have an elan, elan0611. I hope you could take a look with the screenshot and see if you could shed me some information what i need to do but nonetheless very happy for your support around here.
@masterbater Happy to hear that even other model can work well with the EFI folder. For VoodooI2C installation, you can read guide: https://voodooi2c.github.io/#Installation/Installation .
Or you can send me your CLOVER folder(press F4/Fn+F4 in Clover boot interface) and ioreg file. I can help if I am free. (I amn't 100% sure to make your trackpad work, and I will do my best.)
I updated to the newest version of voodoi2c, cursor wont stop moving, and no gestures and prefpane Here is ioreg and efi which is the latest release on your repo.
Lenovo 320-15ikb i78500u ioregElan0611.zip
@masterbater I need your origin DSDT, please press F4/Fn+F4 in Clover boot interface and send CLOVER/ACPI/origin .
@masterbater Test 1.zip Hope it can work. And if not work, could you open another issue, since it's out of topic.
Thanks, will try it, ill open an issue once its not working. Thanks for the effort @stevezhengshiqi
@masterbater You can send trouble shooting files(https://voodooi2c.github.io/#Troubleshooting/Troubleshooting) to https://gitter.im/alexandred/VoodooI2C for professional aid. It's better to review the whole installation process (https://voodooi2c.github.io/#Installation/Installation)
@stevezhengshiqi Really need help. I followed your instructions to upgrade to Mojave latest beta, ran hdpi to fix graphics and ran ktext utility and now the system boots but before login screen appears. I tried using USB to boot into installation but no luck. Thank you so much for your help in advance
@PavelLJ Hi, I think I finally find a great solution. I grab MBP15,2's PM file from Mojave(Mac-827FB448E656EC26.plist), which is able to let High Sierra work in both XCPM mode and HWP mode.
@kampav I am using Mojave beta4; and I heard that VoodooI2C could cause KP in pb3. So I recommend to update 10.14(18a336e). Later I will submit new EFI for Mojave which you can test.
One more thing you can do is trying to uninstall hidpi, see the interaction here: Recovery
@stevezhengshiqi Quite interesting, but as I already said HWP is not working fully and properly because Xiaomi disabled such feature, so it should co-exist with XCPM. I'm trying to resolve this problem now and as soon as I will get some results i will write here.
@PavelLJ Hope you can make progress! Enable the native HWP function in BIOS is undoubtedly the best solution. I didn't find a clear way on about how to enable it. (It seems like most laptop manufactor disable HWP function in BIOS)Wait for your good news.
@stevezhengshiqi, well, here it is. Big thanks to Cyb from 4PDA, he helped me much. exps3.zip It's H2OUVE patch that apply SpeedShift enable by changing UEFI variables. Actually it works a bit worse than stock on Windows, but that's because it's got unconfigured EPP profile and other stuff is not implemented right in Windows, so i guess we should experiement with HWP now. What I need to do is just to delete CPUFriend and disable Plugin-type, right? P.S As far as I know to fully get rid of XCPM bugs we also need to unlock 0xE2 on our BIOS, i will dig a bit into it.
@stevezhengshiqi update: also we manageded to disable 0xE2, again, big thanks to Cyb from 4pda. I actually didn't tested that but i would now and i will write UPD when i'll be ready. exps4.zip
@PavelLJ I tested with CFG unlock patch and voltage unlock patch. They are super great. I don't need 0xE2 Clover patch anymore. Speedshift test still needs more time. So, we should completely close XCPM and HWP in macOS and let CPU to run its own XCPM and HWP method?
I think so. XCPM is an OS Power Management, which is mandatory anyway, but it works well with HWP, just switching HWP profiles and describing load situation. Now it should work natively, but with one huge "but" - it should have proper SMBIOS, so I guess it's time to move to Mojave and use MBP15,2 SMBIOS.
OK, thanks for explaining. Just personal opinion, Mojave is not that good compared to High Sierra for now(for example trackpad gestures). Also, my newest release's CPUFriendDataProvider has used MBP15,2 's X86Plugin PM file, so I think it's not necessary to move to Mojave and change SMBIOS.
@PavelLJ Hi, I may ask too much, but could you write another script to lock the TDP? Sometimes TDP setting is reset to default though I changed it.
@stevezhengshiqi are you sure TDP changes is bios-related? I mean it can be done via BIOS but XTU-like utilities do it another way. I have a bit offtop question - my wifi card from Taobao doesn't work under Windows, i tried bootcamp drivers and a lot of other stuff, but it gives me code 10. I use Windows really rarely but sometimes i need connection on it. Does your card works under Windows?
Hello again! I'm enthusiast so I don't know much about Native Power Management, but I found some faulty things in our setup: At first, SSDT-XCPM (or PluginType if you wish) configured wrong, as KabyLake+ DSDT (and our too), got the _PR0.PR00 tree, not _PR0.CPU0 as it was configured by rehabman by default (he made notes about KabyLake+ systems). I checked in MaciASL and yeah - our DSDT is using PR00 so I guess this should be fixed. Also I don't think CPUFriend is needed with this fix, as of my AppleIntelInfo report all is okay with HWP (pure setup, almost no kext and the only patched SSDT is SSDT-XCPM) AppleIntelInfo Report: