Jump to content

fryysyd

Just Joined
  • Content Count

    42
  • Joined

  • Last visited


Reputation Activity

  1. Like
    fryysyd reacted to vector sigma in HWSensors3   
    Hi guys, today I've created the "development" branch where I'll put new code from now on. What's on the new branch?
    The Fan control from HWMonitorSMC2 for all kexts that support writing SMC keys, Apple or not.
     
    W836x.kext (Nuvoton and Windbond chips) is highly modified and uses the NVRAM to store settings across reboots, and this is how it works:
    Install the FakeSMC.kext and W836x.kext from the dmg attached. Will not work with old FakeSMC.kext. To enable the Fan control you have to add the new kernel flag -fanCtrl and reboot. Use the new HWMonitorSMC2.app, always from the attached dmg. Go to the preferences and enable "Fan Control", restart the app for the changes to take effect. If you want to show min and max values you have to enable "Show Min/Max speed" as well.
     
     
    How W836x.kext knows the min and max rpms can do a fan?
    Simply by calibrating them during the first attempt ever made, by slow down at minimum your fans... so it will know the minimum rpms, and so the same for the max values. Values will be saved to the NVRAM, so next times this will not happen again.
    You can recalibrate fans by setting the following nvram variable to the max:
    sudo nvram HW_fanControl=%ff ..and you will hear your fans slow down firstly, and then go at max for some seconds. The third stage is to restore the motherboard defaults, so that you can decide if enable the fan control for a specific fan.... directly in HWMonitorSMC2.app:

    pay attention that you have to enable the PWM checkbox otherwise you will not be able to edit its value.
    (By disabling the PWM checkbox... the fan will be in auto mode, or to be more precise how is set in the BIOS)
     
     
    Warning: as you can see my CPU Fan is controllable while "Fan 0" isn't and have equal min and max values. Why? This fan is not a PWM one because only have a 3 pin connector. In Fact to be controllable fans must have 4 pins:

     
    Legacy and new SMC keys
     
    In 2018 Apple introduced new SMC keys that sobstitute the old "FS! ", and in new models keys are in the format of "F1Md". This latest is the default method, but you can switch back in using the old one by adding the kernel flag "-legacyFan"
     
    Why the nvram to store settings?
    Is persistent across reboots for all the users. You don't have to save a file somewhere or install scripts and daemons. nvram saving will only be used if HW_fanControl variable is already present in nvram... in this case published by W836x.kext. If this var is not present the app will try to write smc keys directly, but it is not persistent without a daemon that save/read somewhere smc keys involved at power off and/or power on time. Also that means that in real Mac, or with other plugins, nvram will be not touched. How other projects should be able to use the nvram variables saved by HWMonitorSMC2.app and use the same method?
    The driver must post the nvram variable HW_fanControl with a value in byte >= 0 (but less then 0xff). This way HWMonitorSMC2.app knows that we want to use nvram method. being able to read and parse the HW_fanControlData variable in nvram composed by 44 bytes:  // example with only one fan, Fan at index 1, and with PWM turned on UInt8 nvFanControls[44] = { 0x02, 0x00, /* 16 bits, bit at index 1 enabled for fan at index 1. Value for 'FS! ' or 'F1Md'*/ 0x00, 0x00, /* UInt16 value, fan at index 0 target speed */ 0x05, 0xdc, /* UInt16 value, fan at index 1 target speed, in this case 0x05dc i.e. 1500 rpm */ 0x00, 0x00, /* UInt16 value, fan at index 2 target speed */ 0x00, 0x00, /* UInt16 value, fan at index 3 target speed */ 0x00, 0x00, /* UInt16 value, fan at index 4 target speed */ 0x00, 0x00, /* UInt16 value, fan at index 5 target speed */ 0x00, 0x00, /* UInt16 value, fan at index 6 target speed */ 0x00, 0x00, /* UInt16 value, fan at index 0 min speed */ 0x03, 0xE8, /* UInt16 value, fan at index 1 min speed in this case 0x03e8 i.e. 1000 rpm */ 0x00, 0x00, /* UInt16 value, fan at index 2 min speed */ 0x00, 0x00, /* UInt16 value, fan at index 3 min speed */ 0x00, 0x00, /* UInt16 value, fan at index 4 min speed */ 0x00, 0x00, /* UInt16 value, fan at index 5 min speed */ 0x00, 0x00, /* UInt16 value, fan at index 6 min speed */ 0x00, 0x00, /* UInt16 value, fan at index 0 max speed */ 0x07, 0xd0, /* UInt16 value, fan at index 1 max speed in this case 0x07d0 i.e. 2000 rpm */ 0x00, 0x00, /* UInt16 value, fan at index 2 max speed */ 0x00, 0x00, /* UInt16 value, fan at index 3 max speed */ 0x00, 0x00, /* UInt16 value, fan at index 4 max speed */ 0x00, 0x00, /* UInt16 value, fan at index 5 max speed */ 0x00, 0x00 /* UInt16 value, fan at index 6 max speed */ }; // max 7 fans supported.  
    Tested only with nuvoton chips as I don't own other mobos.
     
    HWSensors-3_r199.dmg.zip
     
    @Slice, tell me if is ok for you.
  2. Thanks
    fryysyd reacted to nmano in [pre-release] macOS Mojave   
    All GF100 Graphics card
     
    1-GeForce.kext info.plist patch add manually
    Under IOPropertyMatch change
    GK100 to GF100
     
    2-Add clover patched for NVDAStartup
    Comment  GK100 to GL100 NVArch DisableGK for NVDAStartup By N.Mano Name        com.apple.nvidia.NVDAStartup Find          474B3130 30 Replace     474C3130 30  
    3-Replace CoreDisplay from 10.13.4
    ⁨System⁩ ▸ ⁨Library⁩ ▸ ⁨Frameworks⁩ ▸ ⁨CoreDisplay.framework⁩ ▸ ⁨Versions⁩ ▸ ⁨A⁩
     
    Finally All GeForce and NV kexts are Loaded.
    CoreDisplay.zip
    Info.plist.zip




  3. Like
    fryysyd got a reaction from chris1111 in [pre-release] macOS Mojave   
    Awesome!
    @MaLd0n
    Moderator, there is a problem: the latest version of lilu's changelog has one more command: "Added lilucpu=N boot-arg to assume CPU generation", what does this mean? What is this N to fill? Can you give an example? Thank you!
  4. Thanks
    fryysyd reacted to MaLd0n in [pre-release] macOS Mojave   
    ThemeEngine.app.zip
  5. Like
×