Jump to content
  1. ammoune78

    ammoune78

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By dgsga
      Can I propose a new subforum be created for the new OpenCorePkg OpenCore front end being created by vit9696 and others, it is a fantastic piece of work:
      https://github.com/acidanthera/OpenCorePkg
      Even at version 0.1 it runs my Mojave 10.14.4 setup very nearly flawlessly. It consists of a 10KB bootstrap BootX64.efi and a 200KB OpenCore.efi OS loader. All configuration is done using a very well documented config.plist 
       
       
    • By nijhawank
      Hi friends,
       
      Recently I had been looking for ways to control the battery charging on my hackintosh which is a Thinkpad T460 with dual batteries. On Windows there's a program Lenovo Vantage that lets you set the Battery Charging Start and Stop Thresholds. These thresholds continue to apply even when the laptop is turned off as these thresholds are managed by the embedded controller, so from that perspective its a set once and forget.
       
      But there was one more thing that was frustrating me. By default Lenovo uses the external battery first and once its almost drained (less than 5%), it switches to the internal battery.
      Although the Charging Start and Stop Limits are a good way to increase the life span of Lithium batteries (by lowering the max charge limit), the complete drainage of the external battery prior to switching to internal is not a good idea.
      Fortunately Lenovo EC provide options to force drain (use) a battery (even with the ac adapter connected) thereby allowing to manually switch to the internal one, however these are manual controls. In Linux, there's a program tpacpi-bat that runs as a daemon and performs an efficient management of the dual batteries such as switching to internal battery when the external one reaches a configurable lower limit. However, this is Linux only and uses the ACPI interface.
       
      I did some research to understand my options in macOS. I found RehabMan's ACPIDebug.kext and its ability (using another RehabMan's tool ioio) to call a function defined in the DSDT. With information collected tpacpi-bat and ACPIDebug.kext, I have created a dirty version. 
       
      So this is how you use it...
      1. Use the attached SSDT-RMDT. As this was just a rough work to validate my understanding, I just did a hard coding for the first battery. 
      2. Install ACPIDebug.kext
      3. After the reboot, you can trigger the following battery operations...
      a. Set Battery Charge Start Threshold
      ioio -s org_rehabman_ACPIDebug dbg1 <start-percent>
      a. Set Battery Charge Stop Threshold
      ioio -s org_rehabman_ACPIDebug dbg2 <stop-percent>
      a. Force Discharge
      ioio -s org_rehabman_ACPIDebug dbg3 <0|1> //0 to disable, 1 to enable
      a. Inhibit battery charging for specified number of minutes
      ioio -s org_rehabman_ACPIDebug dbg4 <minutes> //0 to disable
      a. View Battery Info
      ioio -s org_rehabman_ACPIDebug dbg5 <anything> //pass anything, its ignored
      a. View Battery Charge Start/Stop Thresholds
      ioio -s org_rehabman_ACPIDebug dbg0 <anything> //pass anything, its ignored
       
      You can see the output using the Log Viewer Console (filter on ACPIDebug). You'd see something like this...
      default    19:34:35.175265 -0800    kernel    ACPIDebug: "View Thresholds"
      default    19:34:35.176349 -0800    kernel    ACPIDebug: { "Charge Start Threshold=", 0x28, }
      default    19:34:35.176489 -0800    kernel    ACPIDebug: { "Charge Stop  Threshold=", 0x3c, }
      default    21:07:36.023627 -0800    kernel    ACPIDebug: "Battery Info"
      default    21:07:36.032040 -0800    kernel    ACPIDebug: { "Conversion (mW[h] -> mA[h]) Required?=", 0x0, }
      default    21:07:36.032323 -0800    kernel    ACPIDebug: { "Design Voltage=", 0x2a30, }
      default    21:07:36.032519 -0800    kernel    ACPIDebug: { "Design Capacity=", 0xdb60, }
      default    21:07:36.032772 -0800    kernel    ACPIDebug: { "Last Full Capacity=", 0x6a9a, }
      default    21:07:36.033783 -0800    kernel    ACPIDebug: { "Remaining Capacity=", 0x2e7c, }
      default    21:07:36.033968 -0800    kernel    ACPIDebug: { "Remaining Percent=", 0x2b, }
      default    21:11:19.319090 -0800    kernel    ACPIDebug: { "Charge Stop Threshold=", 0x5a, }
      default    21:11:30.722450 -0800    kernel    ACPIDebug: { "Charge Start Threshold=", 0x50, }
      default    23:34:39.071335 -0800    kernel    ACPIDebug: "Force Discharge=Enabled"
      default    23:34:59.427494 -0800    kernel    ACPIDebug: "Force Discharge=Disabled"
      default    23:35:08.475281 -0800    kernel    ACPIDebug: { "Inhibit Charge Enabled (in Minutes)=", 0xf, }
      default    23:35:12.971671 -0800    kernel    ACPIDebug: "Inhibit Charge=Disabled"
       
      At this time, I just hard-coded for the BAT0 to quickly validate my understanding and its working well. 
       
      What's next? As I understand (and please correct me if I'm wrong), I can't return values with ACPIDebug.kext along with ioio, plus this is also all very hacky.
      To be able to create a program that reads the current remaining capacity (percent) and switches control to internal batter, I need a way to return this info. Currently I'm just outputting it to the logs.
       
      My thinking is to modify ACPIDebug.kext or one of these other kexts (ACPISensors.kext) to add code for above and then create a program to optimally manage the operation of my two batteries.
      However, I'm very new to all of this and will take some time.
       
      In the meanwhile, here is it for your playing pleasures. Please be aware that my SSDT-RMDT is currently hard-coded for BAT0 and doesn't have all the validations. 
      Credits to RehabMan, tpacpi-bat, and other resources on internet.
       
      Thanks all.
       
       
      SSDT-RMDT.dsl
    • By Slice
      This thread devoted to share information about different SMC keys found or investigated anywhere.
       
      What are they?
      SMC keys is a somehow language to speak between macOS and hardware microcontroller presented in real Mac and absent in Hackintosh.
      They inform macOS about Hardware ID and current status. Moreover macOS can write something through SMC protocol to control hardware.
      FakeSMC ( ©Netkas) is the driver to emulate this microcontroller on PC having no such device which is necessary to boot macOS here.
      But FakeSMC contain only ~20 keys while real Mac answers ~200 keys.
      Some keys we added by HWSensors project reporting temperatures, FAN speeds, voltages etc.
      Some keys are model dependent was added by Clover to be sure if user changed model in GUI then corresponding keys will be changed automatically.
      Clover sets
      LogDataHub(&gEfiMiscSubClassGuid, L"RPlt", &gSettings.RPlt, 8);
      LogDataHub(&gEfiMiscSubClassGuid, L"RBr", &gSettings.RBr, 8);
      LogDataHub(&gEfiMiscSubClassGuid, L"EPCI", &gSettings.EPCI, 4);
      LogDataHub(&gEfiMiscSubClassGuid, L"REV", &gSettings.REV, 6);
      LogDataHub(&gEfiMiscSubClassGuid, L"BEMB", &gSettings.Mobile, 1);
      BEMB - is a mobility sign. =0 -desktop, =1 - mobile.
      REV - SMC hardware revision, changes sometimes with Apple updates.
      RPlt, RBr and EPCI is hardware capabilities, noticed used in Intel HD drivers.
       
      Structure.
      All SMC keys consists of name 4 ascii chars as 32bit integer, type and value.
      Types:
       "flag", len 1
       "ui8 ", len 1
       "ui16", len 2
       "sp78", len 2
       "ui32", len 4
      "fp2e", len 2
      "fpe2", len 2
      "{rev", and others...
       
      List of known keys
      SMC_list.plist.zip
      More keys will be discussed in the thread
       
       
      Feel free to share you knowledge and ask about noticed keys.
    • By cvad
      View File Bootdisk Utility
      Make bootable USB Flash Disk for MAC OS X with Latest Clover bootloader revision fast and easy by one click! under OS Windows.
      Special utility from cvad & russian MAC community for new hackintosh users.
       
      Enjoy...
       
      For more information and complete instructions please see this topic.
       
       
       
       
      Feel free to "Rate File"
      Submitter cvad Submitted 04/28/2013 Category Bootloaders  
    • By kylon
      ACPI and Clover config for Acer Aspire v5-571PG
       
      Tested on Catalina 10.15.1 and Clover EFI 5098 (Should work on MacOS 10.9.x - 10.15.x)
       
      Not Working:
      - sd card reader
      - Atheros AR9462 (use a compatible USB wireless adapter, see below)
      - Touchscreen (MacOS 10.15 only)
       
       
      Notes:
      Disable Secure Boot and enable Legacy Boot. Legacy Mode is recommended.  
      **To reset your BIOS, power on the pc and hold the power button for about 30-40 seconds or you can short G2101 (RAM SLOT 1)**
       
       
      About the Atheros card:
      You can install ATH9KFixup (you will also need additional patches on 10.14+ to restore Atheros support) to enable this card, however,
      it will break sleep on MacOS 10.14+, it can freeze your OS at any time and it can freeze your network settings.
      Because of its instability it is highly recommended to buy a USB wireless adapter.
       
      You can find a list of working adapters, and the drivers, here.
       
       
      Additional things you will need:
      Latest Clover config (AcerAspireV5-571pg - CCE Bank) from here CloverEFI (download) or OpenCore (download - Untested) WhateverGreen (download) VoodooPS2 (download) VirtualSMC + SMCBatteryManager (download) AppleALC (download) Lilu (download) Mieze Realtek RTL8111 (download)  
      CloverEFI drivers you will need:
      ApfsDriverLoader EmuVariableUefi FSInject DataHubDxe VBoxHfs (if you have hfs partitions)  
      Remember to install BIOS drivers if you enable Legaby Boot.
       
       
       
      Feel free to ask for help.
      Please send me a PM if you have fixes or improvements, thanks.
×