VoltageShift icon indicating copy to clipboard operation
VoltageShift copied to clipboard

Is injecting voltageshift kext with the bootloader a good idea?

Open antoniomcr96 opened this issue 4 years ago • 12 comments

Good morning, thanks for your work. This idea may concern those who use custom bootloader in Macs and who’s running an hackintosh. Following this post: https://www.reddit.com/r/hackintosh/comments/h84k1b/voltageshiftkext_in_efi/ it should be possible to load the kext from efi, editing that two functions. Is it a memory-friendly idea or it could impact on the system performance if the kext is injected from bootloader? Thanks in advance

antoniomcr96 avatar Nov 12 '20 13:11 antoniomcr96

This should almost zero system performance and very small memory require. As the kext will not work any job except launch and change setting by the command tools. However all kext require memory as this small kext should use less that few kb.

sicreative avatar Nov 15 '20 15:11 sicreative

Thanks for your reply. Do you consider editing the code so that if the kext is already loaded (from bootloader, L/E or manually) it won't result in an error?

antoniomcr96 avatar Nov 18 '20 16:11 antoniomcr96

Thanks for your reply. Do you consider editing the code so that if the kext is already loaded (from bootloader, L/E or manually) it won't result in an error?

The new version 1.25 is reflect on your need.

sicreative avatar Nov 20 '20 10:11 sicreative

What to say? thanks a lot. It works perfectly.

Just two things:

  1. image I think that there is one more zero than necessary here. -50 -> CPU; -50 -> GPU; 0 -> CPUC; 0 -> SA; 0 -> AIO; 0 -> DIO; 0 -> ????; 1 -> turbo

  2. I can't build launchd daemon without VoltageShift.kext on the same directory of voltageshift. Script tries to copy VoltageShift.kext in Application Support and fails. So I let the script copy the file and then I delete the kext from /Library/Application Support/Voltageshift. It works, as expected, because kext is already loaded. Maybe a prompt ("Voltageshift.kext already loaded. Do you want to copy VoltageShift.kext? (reply no if you load it with boot loader or from other folders on startup)") or just avoiding to block the launchd deamon creation could solve the problem.

Not a really a big problem for most users, though. Anyway your last version allows me (Hackintosh) to keep SIP totally enabled and load the kext with the boot loader. Thanks again 👍

antoniomcr96 avatar Nov 20 '20 13:11 antoniomcr96

What to say? thanks a lot. It works perfectly.

Just two things:

  1. image I think that there is one more zero than necessary here. -50 -> CPU; -50 -> GPU; 0 -> CPUC; 0 -> SA; 0 -> AIO; 0 -> DIO; 0 -> ????; 1 -> turbo
  2. I can't build launchd daemon without VoltageShift.kext on the same directory of voltageshift. Script tries to copy VoltageShift.kext in Application Support and fails. So I let the script copy the file and then I delete the kext from /Library/Application Support/Voltageshift. It works, as expected, because kext is already loaded. Maybe a prompt ("Voltageshift.kext already loaded. Do you want to copy VoltageShift.kext? (reply no if you load it with boot loader or from other folders on startup)") or just avoiding to block the launchd deamon creation could solve the problem.

Not a really a big problem for most users, though. Anyway your last version allows me (Hackintosh) to keep SIP totally enabled and load the kext with the boot loader. Thanks again 👍

  1. Yes, i corrected.
  2. Sorry I don't understand what you mean ? Do you mean the buildlaunchd not working on your system because the script no copy the kext ? Could you hesitate to proivde ls -l showed on you directory, and which shells you current you (zsh/bash?).

sicreative avatar Nov 20 '20 15:11 sicreative

  1. Sorry I don't understand what you mean ? Do you mean the buildlaunchd not working on your system because the script no copy the kext ? Could you hesitate to proivde ls -l showed on you directory, and which shells you current you (zsh/bash?).

He asked if there could be a way to buidlaunchd which doesn't require to copy VoltageShift.kext (because he already has it running, as he injected it with the bootloader). I would be interested too

marianopela avatar Nov 20 '20 15:11 marianopela

Sorry for my bad English. As @marianopela says, if I don't have also voltageshift.kext in the folder:

antonio@MacBook-Pro voltageshfit_1 % ls
voltageshift

If I try to buildlaunchd

antonio@MacBook-Pro voltageshfit_1 % sudo ./voltageshift buildlaunchd 0 0 0 0 0 0 0 0 0  
Build for LaunchDaemons of Auto Apply for VoltageShift
------------------------------------
Password:
....
cp: ./VoltageShift.kext: No such file or directory
chown: /Library/Application Support/VoltageShift/VoltageShift.kext: No such file or directory

antoniomcr96 avatar Nov 20 '20 15:11 antoniomcr96

Sorry for my bad English. As @marianopela says, if I don't have also voltageshift.kext in the folder:

antonio@MacBook-Pro voltageshfit_1 % ls
voltageshift

If I try to buildlaunchd

antonio@MacBook-Pro voltageshfit_1 % sudo ./voltageshift buildlaunchd 0 0 0 0 0 0 0 0 0  
Build for LaunchDaemons of Auto Apply for VoltageShift
------------------------------------
Password:
....
cp: ./VoltageShift.kext: No such file or directory
chown: /Library/Application Support/VoltageShift/VoltageShift.kext: No such file or directory

Yes, sure i will update it on next version..

sicreative avatar Nov 22 '20 03:11 sicreative

Hi, I really love VoltageShift by the way, I was able to up the OS's power limit on my Hackintosh 9900K build running Big Sur.

As far as I understand from this thread, instead of having this kext in S/L/E I can load it using OpenCore amongst my other kexts, correct?

Also, is there a configuration I can do in the config.plist instead of using launchd in order to change only the power limits?

Thank you in advance.

ispiropoulos avatar Nov 23 '20 10:11 ispiropoulos

As far as I understand from this thread, instead of having this kext in S/L/E I can load it using OpenCore amongst my other kexts, correct?

With last version (1.25) it is possible!

Also, is there a configuration I can do in the config.plist instead of using launchd in order to change only the power limits?

This could be a great idea. Maybe a boot-arg (for example offsetCPU=100 offsetGPU=100) that is read by the driver (VoltageShift.kext) to set the voltage. Anyway this application was designed to work primarily on native mac, so I am not sure if the author can be oriented to a solution of this type. Anyway it would be very functional.

antoniomcr96 avatar Nov 23 '20 11:11 antoniomcr96

Also, is there a configuration I can do in the config.plist instead of using launchd in order to change only the power limits?

This could be a great idea. Maybe a boot-arg (for example offsetCPU=100 offsetGPU=100) that is read by the driver (VoltageShift.kext) to set the voltage. Anyway this application was designed to work primarily on native mac, so I am not sure if the author can be oriented to a solution of this type. Anyway it would be very functional.

I very much second this, it's very fair to say that most of the users of this kext are Hackintosh users. This would tremendously improve things!

sebasinparis avatar Nov 23 '20 17:11 sebasinparis

Hi there! Great kext! I have an issue. The .plist loads on boot perfectly fine but I can't get it to autouodate after sleep. It goes back to 0 0 0.

I've been trying update '1' for one minute but it doesn't take. Any ideas? I'm on Monterey.

Edit* I THINK I got it working. Had to put the files in /Library/LaunchDaemons no clue why it wasn't working from the downloads folder but I think it's fine now. Works after sleep. Got -90 -90 -90 stable on my X260 ThinkPad.

outlandernwah avatar Dec 16 '22 21:12 outlandernwah