zearp / Nucintosh

Intel NUC Hackintosh Stuff
723 stars 85 forks source link

Voltageshift not building #25

Closed axel9546 closed 3 years ago

axel9546 commented 3 years ago

Hi! I am getting back this error, after launching the command "sudo ./voltageshift buildlaunchd -75 0 -75 0 0 0 1 30 50 0 120" my HW is a NUC8i5BEK, 16GB Ram, 512GB Nvme Drive

sudo ./voltageshift buildlaunchd -75 0 -75 0 0 0 1 30 50 0 120
Password:
Build for LaunchDaemons of Auto Apply for VoltageShift
------------------------------------
mkdir: /Library/Application Support/VoltageShift/: File exists
cp: ./VoltageShift.kext: No such file or directory
chown: /Library/Application Support/VoltageShift/VoltageShift.kext: No such file or directory
/Library/LaunchDaemons/com.sicreative.VoltageShift.plist
voltageshift

--------------------------------------------------------------------------
VoltageShift builddaemons Tool
--------------------------------------------------------------------------
    Can't build the launchd.  Can´t create the files, please use:

             sudo ./voltageshift buildlaunchd .... 

for Root privilege.
zearp commented 3 years ago

It will still work, it only failed some file actions it tried to apply to the kext, which makes sense because we load the kext in EFI so those commands will failI. You can ignore those messages. I says it failed but it has still made the launch deamon files needed to apply the setting on boot.

If you would shutdown and reboot you will see your settings have been appleid when running sudo ./voltageshift info. Removing the launch deamon command also works.

This is the file it creates: /Library/LaunchDaemons/com.sicreative.VoltageShift.plist voltageshift -- I'm certain it exists and your settings will be applied on boot. I've tested it extensively.

Don't forget that rebooting will not disable the undervolt settings. You need to shut down the computer (cold boot) to have stock voltages again.

I will look into removing the commands that trigger those messages since they're harmless and everything will work without running them: https://github.com/zearp/VoltageShift/blob/master/VoltageShiftAnVMSR/main.mm#L1655-L1658 -- seems like it just runs some shell commands and if one action fails it reports it as complete failure even though the launch deamon is still created.

zearp commented 3 years ago

Just did some experimenting with removing the commands that fail, but even if I remove them it will still say building the launch daemon script failed, even though it didn't. I might just remove the message since it always seems to exit with an error.

It does work though, I've double checked it on a clean install and also tested removing the launch deamon and adding it again. Everything works as it should, just somehow the util always exits thinking there was an error somewhere.

There are bunch of commands in there that aren't needed anymore. Might clean it all up and see how that goes or just remove the error message. Don't really want to spend a lot of time on it but I also like to sort it out so it doesn't seem as if it failed. Cuz thats pretty confusing.

The best way to check if it made the launch deamon is to check if it exits by running file /Library/LaunchDaemons/com.sicreative.VoltageShift.plist.

zearp@nuc ~ % file /Library/LaunchDaemons/com.sicreative.VoltageShift.plist
/Library/LaunchDaemons/com.sicreative.VoltageShift.plist: XML document text, ASCII text, with very long lines