Jump to content

syscl

Coders
  • Content Count

    290
  • Joined

  • Last visited

  • Days Won

    9

Reputation Activity

  1. Like
    syscl got a reaction from PMheart in Clover General discussion   
    Thank you I will implement this function as well(homework, exams these days T_T).
     
     
    I have implemented plugin management function as well in r4024. Thank you for the advice. 
     
    syscl
  2. Like
    syscl got a reaction from PMheart in Clover General discussion   
    Thank you I will implement this function as well(homework, exams these days T_T).
     
     
    I have implemented plugin management function as well in r4024. Thank you for the advice. 
     
    syscl
  3. Like
    syscl reacted to ricoc90 in Clover General discussion   
    Does Clover recognize if you're booting the actual OS, or the Recovery HD / Install (or update) media?
    If so, would it also be possible to block the injection of certain kexts based on that condition?
     
    For example:
    Lilu+NightShiftUnlocker.kext always gives me a kernel panic when booting from Recovery HD or the macOS (update) installer.
    I just tested r4202 and of course I can just block the kext injection for NightShiftUnlocker now, but it would be great if I could put it in my config.plist with a condition saying that the injection shouldn't take place when booting from the Recovery HD or install (or update) media
  4. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  5. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  6. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  7. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  8. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  9. Like
    syscl got a reaction from gujiangjiang in Clover General discussion   
    Thank you for your information, I will add debug log as of disabling kext(s). But it's 4:00 AM in my time zone, need sleep 
     
    syscl
  10. Like
    syscl got a reaction from gujiangjiang in Clover General discussion   
    Thank you for your information, I will add debug log as of disabling kext(s). But it's 4:00 AM in my time zone, need sleep 
     
    syscl
  11. Like
    syscl reacted to gujiangjiang in Clover General discussion   
    Test it just now and work well with disable one or more kexts injection.
     
    Thanks for your work.
     
    PS:It is better to add some DBG message with this disable process.
     
     
    从我的 iPhone 发送,使用 Tapatalk
  12. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  13. Like
    syscl got a reaction from vandroiy2012 in Clover General discussion   
    As @gujiangjiang and @Slice think about Custom Kext Injection, I added a new function with sub menu section name "Kext Inject Management" under Options menu for users to choose what kext(s) they want to inject(for easy debugging). 

     
    Here's a prebuilt r4205(updated) and please let me know if there has bug and I will polish it. Enjoy
    r4205.zip
     
    Thank you in advance,
    syscl
  14. Like
    syscl reacted to Dr. Hurt in Clover General discussion   
    Updated to Clover 4200, all working perfectly. Full backlight range, save/restore across reboots -- working natively with stock Apple kexts
     
    Thanks Slice, syscl, and everyone else.
  15. Like
    syscl reacted to Slice in Clover General discussion   
    Corrected in 4199
  16. Like
    syscl reacted to TheRacerMaster in Clover General discussion   
    case CPU_MODEL_SANDY_BRIDGE: LevelMaxW = 0x07100000; case CPU_MODEL_IVY_BRIDGE: break; This case is broken, no?
  17. Like
    syscl reacted to Slice in Clover General discussion   
    I think you can commit this.
  18. Like
    syscl got a reaction from Slice in Clover General discussion   
    Index: rEFIt_UEFI/Platform/Settings.c =================================================================== --- rEFIt_UEFI/Platform/Settings.c (revision 4197) +++ rEFIt_UEFI/Platform/Settings.c (working copy) @@ -6606,7 +6606,36 @@ (Pci.Hdr.ClassCode[1] == PCI_CLASS_DISPLAY_OTHER))) { UINT32 LevelW = 0xC0000000; - UINT32 LevelMaxW = 0x07100000; + // syscl: set PWMMax base on platform + // 10: Sandy/Ivy 0x710 + // 11: Haswell/Broadwell 0xad9 + // 12: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008) + // 99: Other + UINT32 LevelMaxW = 0; + + switch (gCPUStructure.Model) { + case CPU_MODEL_SANDY_BRIDGE: + LevelMaxW = 0x07100000; + case CPU_MODEL_IVY_BRIDGE: + break; + + case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_ULT: + case CPU_MODEL_HASWELL_U5: + case CPU_MODEL_CRYSTALWELL: + case CPU_MODEL_BROADWELL_HQ: + LevelMaxW = gSettings.IgPlatform != (UINT32)0x0a2e0008 ? 0xad900000 : 0x56c00000; + break; + + case CPU_MODEL_SKYLAKE_U: + case CPU_MODEL_KABYLAKE1: + case CPU_MODEL_KABYLAKE2: + LevelMaxW = 0x56c00000; + break; + + default: + break; + } UINT32 IntelDisable = 0x03; // gGraphics.DeviceID = Pci.Hdr.DeviceId; Now the fix will add one more check on ig-platform-id == 0x0a2e0008.
     
    syscl
  19. Like
    syscl got a reaction from Slice in Clover General discussion   
    Index: rEFIt_UEFI/Platform/Settings.c =================================================================== --- rEFIt_UEFI/Platform/Settings.c (revision 4197) +++ rEFIt_UEFI/Platform/Settings.c (working copy) @@ -6606,7 +6606,36 @@ (Pci.Hdr.ClassCode[1] == PCI_CLASS_DISPLAY_OTHER))) { UINT32 LevelW = 0xC0000000; - UINT32 LevelMaxW = 0x07100000; + // syscl: set PWMMax base on platform + // 10: Sandy/Ivy 0x710 + // 11: Haswell/Broadwell 0xad9 + // 12: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008) + // 99: Other + UINT32 LevelMaxW = 0; + + switch (gCPUStructure.Model) { + case CPU_MODEL_SANDY_BRIDGE: + LevelMaxW = 0x07100000; + case CPU_MODEL_IVY_BRIDGE: + break; + + case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_ULT: + case CPU_MODEL_HASWELL_U5: + case CPU_MODEL_CRYSTALWELL: + case CPU_MODEL_BROADWELL_HQ: + LevelMaxW = gSettings.IgPlatform != (UINT32)0x0a2e0008 ? 0xad900000 : 0x56c00000; + break; + + case CPU_MODEL_SKYLAKE_U: + case CPU_MODEL_KABYLAKE1: + case CPU_MODEL_KABYLAKE2: + LevelMaxW = 0x56c00000; + break; + + default: + break; + } UINT32 IntelDisable = 0x03; // gGraphics.DeviceID = Pci.Hdr.DeviceId; Now the fix will add one more check on ig-platform-id == 0x0a2e0008.
     
    syscl
  20. Like
    syscl got a reaction from Dr. Hurt in Clover General discussion   
    CPU Model is still not enough because some Haswell(ig-platform-id) still need 0x56c00000(same as Skylake/Kabylake). I will post another fix.
     
    syscl
  21. Like
    syscl got a reaction from Dr. Hurt in Clover General discussion   
    Thank you for this information. The problem is when a user set this boolean key without paying attention just like me setting this boolean value on XPS 13..
     
    IMHO, it's better to initialized LevelMaxW correctly, otherwise let users to set LevelMaxW.
     
    syscl
  22. Like
    syscl got a reaction from Dr. Hurt in Clover General discussion   
    @Slice 
     
    SetIntelMaxBacklight=True indeed turn my screen into darkvoid on XPS 13 9350(Skylake Iris Model). Thus better to set LevelMaxW depends on the platform, here's the code I change such that XPS 13 9350 won't have a black screen with SetIntelMaxBacklight
    --- rEFIt_UEFI/Platform/Settings.c (revision 4195) +++ rEFIt_UEFI/Platform/Settings.c (working copy) @@ -6603,7 +6603,35 @@ (Pci.Hdr.ClassCode[1] == PCI_CLASS_DISPLAY_OTHER))) { UINT32 LevelW = 0xC0000000; - UINT32 LevelMaxW = 0x07100000; + // syscl: set PWMMax base on platform + // 10: Sandy/Ivy 0x710 + // 11: Haswell/Broadwell 0xad9 + // 12: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008) + // 99: Other + UINT32 LevelMaxW = 0; + switch (gCPUStructure.Model) { + case CPU_MODEL_SANDY_BRIDGE: + LevelMaxW = 0x07100000; + break; + + case CPU_MODEL_IVY_BRIDGE: + LevelMaxW = 0xad900000; + break; + + case CPU_MODEL_HASWELL: + case CPU_MODEL_HASWELL_ULT: + case CPU_MODEL_HASWELL_U5: + case CPU_MODEL_CRYSTALWELL: + case CPU_MODEL_BROADWELL_HQ: + case CPU_MODEL_SKYLAKE_U: + case CPU_MODEL_KABYLAKE1: + case CPU_MODEL_KABYLAKE2: + LevelMaxW = 0x56c00000; + break; + + default: + break; + } UINT32 IntelDisable = 0x03; // gGraphics.DeviceID = Pci.Hdr.DeviceId; Could you test if it works on your laptop as well? Thank you in advance.
     
    syscl
  23. Like
    syscl reacted to tluck in Clover General discussion   
    FYI ... 3 data points on Brightness from 3 systems
     
    So for some reason (IIRC to get same brightness after sleep/wake) on my HD 3000 system
    - I modify the SNB Framebuffer values to change brightness from 0x0710 (1808) to 0x1312 (4882).
    - my brightness then ranges from 0x8c to 0x1312 (140 to 4882) as defined by AppleBacklightInjector
     
    i set each to 50% (1/2 way on slider) brightness - note useable-linear-brightness - which is key to the range.
     
    $ ioreg -l|grep Panel|grep -v Kit
    ioreg -l|grep -i max|grep -i bright|grep -v Profile
        | |   | | |   "FeatureControl" = {"Watermarks"=1,"RenderStandby"=1,"GPUInterruptHandling"=1,"DPM"=1,"MaximumSelfRefreshLevel"=3,"Gamma"=1,"PowerStates"=1,"IgnorePanelTimings"=0,"UseInterruptFilter"=1,"SpreadON"=1,"CachedEDIDDisable"=0,"FastDisplayDetectDisable"=0,"FBC"=0,"SetRC6Voltage"=0}
        | | |   "ApplePanelRawBrightness" = 999
        | | +-o AppleIntelPanelA  <class AppleIntelPanelA, id 0x10000032d, !registered, !matched, active, busy 0, retain 5>
        | |       "IOClass" = "AppleIntelPanelA"
        | |       "ApplePanel" = {"F10T02e2"=<00110000008c00d80136018f01fe02a3034503e704c70535075a091c0b130d9b10591312>}

    $  ioreg -l|grep -i max|grep -i bright|grep -v Profile
        | |   | | |       "IODisplayParameters" = {"commit"={"reg"=0},"fade-time2"={"min"=0,"max"=10000,"value"=4000},"linear-brightness-probe"={"min"=0,"max"=4882,"value"=999},"ggsc"={"min"=0,"max"=65536,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=0},"vblm"={"min"=0,"max"=196608,"value"=65536},"dsyp"={"min"=0,"max"=2,"value"=2},"rgsc"={"min"=0,"max"=65536,"value"=65536},"fade-style"={"min"=0,"max"=10,"value"=0},"fade-time1"={"min"=0,"max"=10000,"value"=500},"bgsc"={"min"=0,"max"=65536,"value"=65536},"brightness-probe"={"min"=0,"max"=1024,"value"=512},"fade-time3"={"min"=0,"max"=10000,"value"=500},"bklt"={"min"=0,"max"=4882,"value"=140},"linear-brightness"={"min"=0,"max"=4882,"value"=999},"brightness"={"max"=1024,"min"=0,"value"=512},"brightness-fade"={"min"=0,"max"=1023,"value"=0},"usable-linear-brightness"={"min"=140,"max"=4882,"value"=999}}
        | | |   "AppleMaxBrightness" = 4882
        | |       "IODisplayParameters" = {"brightness"={"max"=255,"min"=40},"commit"={"reg"=0}}
     
    On my HD 4600 (Haswell) system, the maxBrightness seems to be 0xAD8 (2776) versus AD9?
     
     $ ioreg -l|grep Panel|grep -v Kit
        | | |   "ApplePanelRawBrightness" = 568
        | | +-o AppleIntelPanelA  <class AppleIntelPanelA, id 0x10000036f, !registered, !matched, active, busy 0, retain 5>
        | |       "IOClass" = "AppleIntelPanelA"
        | |       "ApplePanel" = {"F10T11ed"=<00110000004f007a00b000e30122017f01db023802b7035a042e052e064c07bc094b0ad8>}

    $ ioreg -l|grep -i max|grep -i bright|grep -v Profile
        | |   | | |       "IODisplayParameters" = {"commit"={"reg"=0},"fade-time2"={"min"=0,"max"=10000,"value"=4000},"linear-brightness-probe"={"min"=0,"max"=2776,"value"=568},"ggsc"={"min"=0,"max"=65536,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"vblm"={"min"=0,"max"=196608,"value"=65536},"dsyp"={"min"=0,"max"=2,"value"=2},"rgsc"={"min"=0,"max"=65536,"value"=65536},"fade-style"={"min"=0,"max"=10,"value"=0},"fade-time1"={"min"=0,"max"=10000,"value"=500},"bgsc"={"min"=0,"max"=65536,"value"=65536},"brightness-probe"={"min"=0,"max"=1024,"value"=512},"fade-time3"={"min"=0,"max"=10000,"value"=500},"bklt"={"min"=0,"max"=2777,"value"=79},"linear-brightness"={"min"=0,"max"=2776,"value"=568},"brightness"={"max"=1024,"min"=0,"value"=512},"brightness-fade"={"min"=0,"max"=1023,"value"=0},"usable-linear-brightness"={"min"=79,"max"=2776,"value"=568}}
        | | |   "AppleMaxBrightness" = 2776
        | |       "IODisplayParameters" = {"brightness"={"max"=255,"min"=40},"commit"={"reg"=0}}
     
    On my MacBookPro (KabyLake) i7-7567U (with Iris 650 gfx) system, the maxBrightness seems to be 0x50F (1295) 
     
    $ ioreg -l|grep Panel|grep -v Kit
    ...
        | | |   "ApplePanelRawBrightness" = 1295
        | | +-o AppleIntelPanelA  <class AppleIntelPanelA, id 0x10000046c, !registered, !matched, active, busy 0, retain 5>
        | |       "IOClass" = "AppleIntelPanelA"
        | |       "ApplePanel" = {"F17Ta033"=<00110000000d00120016001e0028003600490063008700b800fd015d01e3029c039f050f>}

    $ ioreg -l|grep -i max|grep -i bright|grep -v Profile
        | |   | |         "IODisplayParameters" = {"commit"={"reg"=0},"fade-time2"={"min"=0,"max"=10000,"value"=4000},"linear-brightness-probe"={"min"=0,"max"=1295,"value"=99},"ggsc"={"min"=0,"max"=65536,"value"=65536},"gsc "={"min"=0,"max"=65536,"value"=65536},"vblm"={"min"=0,"max"=196608,"value"=65536},"dsyp"={"min"=0,"max"=2,"value"=2},"rgsc"={"min"=0,"max"=65536,"value"=65536},"fade-style"={"min"=0,"max"=10,"value"=0},"fade-time1"={"min"=0,"max"=10000,"value"=500},"bgsc"={"min"=0,"max"=65536,"value"=65536},"brightness-probe"={"min"=0,"max"=1024,"value"=512},"fade-time3"={"min"=0,"max"=10000,"value"=500},"bklt"={"min"=0,"max"=1388,"value"=13},"linear-brightness"={"min"=0,"max"=1295,"value"=99},"brightness"={"max"=1024,"min"=0,"value"=513},"brightness-fade"={"min"=0,"max"=1023,"value"=0},"usable-linear-brightness"={"min"=13,"max"=1295,"value"=99}}
        | | |   "AppleMaxBrightness" = 1295
        | |       "IODisplayParameters" = {"brightness"={"max"=255,"min"=40},"commit"={"reg"=0}}
  24. Like
    syscl reacted to TheRacerMaster in Clover Problems and Solutions   
    The platform-feature changes in Clover are the cause of the memory tab disappearing. In your NoName dump, you were running r4173, which didn't inject a platform-feature value into SMBIOS table type 133. In your NoRAM dump, you were running r4182, which does inject a model-specific platform-feature value into SMBIOS table type 133 (this was enabled in r4175 by Sherlocks). MacBookPro13,3/14,3 use 0x1A (26) as the platform-feature value, which is responsible for the disappearance of the memory tab (which makes sense, as those models have soldered RAM).
     
    I did some reversing of AppleSystemInfo.framework & SPMemoryReporter to confirm this. SPMemoryReporter (/System/Library/System Profiler/SPMemoryReporter.spreporter) is responsible for updating the memory section in System Information. In updateDictionary, it sets Upgradeable Memory (in System Information/Memory) to either Yes or No depending on a few factors.
    //----- (0000000000001059) ---------------------------------------------------- // SPMemoryReporter - (id)updateDictionary:(id) id __cdecl -[SPMemoryReporter updateDictionary:](struct SPMemoryReporter *self, SEL a2, id a3) { ... // Get the SMBIOS product name CFStringRef v4 = ASI_CopyComputerModelName(true); CFStringRef v5 = v4; // Check if begins with "MacBookAir" or "MacBookPro10" bool v6 = CFStringHasPrefix(v4, CFSTR("MacBookAir")); bool v7 = CFStringHasPrefix(v5, CFSTR("MacBookPro10,1")); CFRelease(v5); // True if platform feature 2 is disabled bool v221 = ASI_IsPlatformFeatureEnabled(2) == 0; // True if the SMBIOS product name doesn't begin with MacBookAir or MacBookPro10,1 bool v196 = (v6 | v7) == 0; ... bool v197 = v221 && v196; ... LABEL_149: v168 = v20(classRef_NSMutableDictionary, selRef_alloc); v169 = v20(v168, selRef_init); v20(v169, selRef_setObject_forKey_, v204, &cfstr__items); v20(v204, selRef_release); // Set "Upgradeable Memory" in System Information/Memory to "No" v170 = CFSTR("No"); if ( v197 ) // Set "Upgradeable Memory" in System Information/Memory to "Yes" v170 = CFSTR("Yes"); v20(v169, selRef_setObject_forKey_, v170); ... } For reference, ASI_CopyComputerModelName(false) returns a CFStringRef of "MacBook Pro" (using localizations). ASI_CopyComputerModelName(true) returns a CFStringRef of the SMBIOS product name (in this case, "MacBookPro14,3").
     
    As for ASI_IsPlatformFeatureEnabled, you can see a somewhat complete (excluding the platform override debug case) implementation here (partially reproduced below).
    bool ASI_IsPlatformFeatureEnabled(int feature) { int v2 = false; int v3 = 0; bool v4 = false; CFStringRef v5 = NULL; CFStringRef v6 = NULL; bool v7 = false; bool v8 = false; bool v9 = false; bool v10 = false; v3 = (unsigned int) feature & (unsigned int) GetIOPlatformFeature(); v2 = (v3 == feature); v4 = (v3 != (unsigned int) feature); if (feature == 2 && v4) { v5 = ASI_CopyComputerModelName(true); v6 = v5; if (v5) { v7 = CFStringHasPrefix(v5, CFSTR("MacBookAir")); v8 = CFStringHasPrefix(v6, CFSTR("MacBookPro10")); CFRelease(v6); v9 = v7 != 0; v10 = v8 != 0; } else { v9 = false; v10 = false; } if (v9 || v10) { v2 = true; } } return v2; }   For some feature values (such as feature 2), this is simple a bitwise AND (feature_num AND GetIOPlatformFeature()), with some exceptions (e.g. MacBookPro10,x/MacBookAirX,X). If ASI_IsPlatformFeatureEnabled(2) returns true, the system has soldered RAM (which isn't upgradeable by the user). Setting platform-feature to 0x18 (24, setting the second bit to 0) instead of 0x1A (26) should disable platform feature 2, restoring the memory tab in About This Mac. You could also not inject a platform feature value at all by setting config.plist/SMBIOS/PlatformFeature to 0xFFFF.
     
    Edit: Some more info + RE'd implementations can be found in this repo: https://github.com/al3xtjames/AppleSystemInfo
  25. Like
    syscl got a reaction from PMheart in Clover Problems and Solutions   
    Thank you for the patches, committed to r4186.
     
    @gujiangjiang @TheRacerMaster Actually no memory tab in "About This Mac" is not a bug on newer platforms, I checked Memory tab disappear on my MacBookPro(2017, Kabylake) and Dell Precision M3800(Haswell), they both miss the tab Memory on "About This Mac"

     
    syscl
×