Jump to content
Mieze

Pulsing Power LED while sleeping

13 posts in this topic

Recommended Posts

I was wondering for a long time if it is possible to have the power LED pulsing on a hackintosh in the same as a real Mac but never really found the time for an in-depth research. Reading through the datasheet of my board's SuperIO, a Nuvoton NCT6776D, I found the following table which confirms that the hardware supports this feature too. 

post-983225-0-31243800-1485988169_thumb.png

As sleep/wake is controlled by the DSDT, I had the idea that it might be possible to get the pulsing power LED just with a small DSDT patch and, to my great surprise, its much simpler than expected. But see for yourself. In the DSDT of my board, an Asrock B85 Killer, I found method SLED controlling the switch between on in S0 and blinking mode in S3 (sleep):

Method (SLED, 1, NotSerialized)
{
    ENFG (0x0B)
    If (Arg0)
    {
        If (LEqual (OPT7, 0x87))
        {
            Store (0x45, OPT7)
        }
    }
    Else
    {
        If (LNotEqual (OPT7, Zero))
        {
            Store (0x87, OPT7)
        }
    }

    EXFG ()
}

Replacing the line "Store (0x45, OPT7)" with "Store (0x4A, OPT7)" gave me a slowly pulsing power LED while the machine sleeps. That's really trivial. Ok, it's not as pretty as on a real Mac, but very close to the original. This patch should work for most of Asrock's series 8 and 9 ATX/µATX boards as far as I can see. The mini-ITX boards may be different, at least my Asrock B85M-ITX is, but it should be possible to get this feature working with them too.

 

Many of Asrock's 100 series board also come with the same SuperIO chip but the DSDT looks different. Here is an example from  an Asrock Z170M-Pro4S which woks in the same way. The following code snippet was found in method SIOS, which is called in order to prepare the SuperIO for sleep mode:

If (LEqual (Arg0, 0x03))
{
    Store (0x0A, LDN)
    Or (OPT0, 0x20, OPT0)
    Or (RGE4, 0x10, RGE4)
    Store (0x0B, LDN)
    If (LEqual (OPT7, 0x87))
    {
        Store (0x45, OPT7)
    }
}

Changing 0x45 to 0x4A should give you the pulsing power LED on this board too.

 

As far as I know, Nuvoton SuperIOs can be also found on many ASUS and MSI boards. The NCT5577D supports this feature too. Other chips might support it as well but you need to have a datasheet to verify it and learn how to control the LED.

 

Mieze

Share this post


Link to post
Share on other sites
Advertisement

Mieze. On the IT8728F chip, do you have it too?

Unfortunately, I don't  have Gigabyte boards but in case you manage to get a datasheet of this chip and send me your DSDT, I may be able to help you, provided the ITE8728F has this feature too.

 

Mieze

Share this post


Link to post
Share on other sites

Ok, thanks, I will check the datasheet and your DSDT tomorrow and report back. It's already 1 o'clock here in Germany and I need some sleep.  :cat:

 

Mieze


@JorgeMax: I'm unable to open your DSDT as MaciASL gives me an error message.

post-983225-0-62022300-1485995245_thumb.png

 

Mieze

Share this post


Link to post
Share on other sites

Ok, thanks, I will check the datasheet and your DSDT tomorrow and report back. It's already 1 o'clock here in Germany and I need some sleep.  :cat:

 

Mieze

@JorgeMax: I'm unable to open your DSDT as MaciASL gives me an error message.

attachicon.gifBildschirmfoto 2017-02-02 um 01.34.03.png

 

Mieze

Mieze, use this: RehabMan-MaciASL-2017-0117.zip

Share this post


Link to post
Share on other sites

@JorgeMax: I checked your datasheet and it seems that the ITE8728F doesn't support the fading mode but just plain old blicking with differnt frequencies. Here is the documentation of the LED control register from page 75 of the datasheet:

post-983225-0-30567200-1486068053_thumb.png

 

Mieze

Share this post


Link to post
Share on other sites

@JorgeMax: I checked your datasheet and it seems that the ITE8728F doesn't support the fading mode but just plain old blicking with differnt frequencies. Here is the documentation of the LED control register from page 75 of the datasheet:

attachicon.gifBildschirmfoto 2017-02-02 um 21.45.43.png

 

Mieze

 

Thank you, friend, for checking me out. I took a look at how the LED behaves during "sleep" on Windows, and it does not blink, only going off.

Share this post


Link to post
Share on other sites

Since my last BIOS update my PWR led start blinking more frequently during sleep, so I stareted to look for solution and I ended up here.

 

Here is code from my DSDT:

If (LEqual (Arg0, 0x03)) {
    Store (0x0A, LDN)
    Or (OPT0, 0x20, OPT0)
    Or (RGE4, 0x10, RGE4)
    Store (0x0B, LDN)
    If (LEqual (OPT7, 0x87))
    {
   		 Store (0x45, OPT7)
    }
}

Unfortunately, changing OPT7 value from 0x45 changes nothing.

 

Here are _PTS and _WAK methods:

 

    Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        If (Arg0)
        {
            LEDS (Arg0)
            \_SB.TPM.TPTS (Arg0)
            \_SB.PCI0.LPCB.SIO1.SIOS (Arg0)
            \_SB.PCI0.LPCB.SPTS (Arg0)
            \_SB.PCI0.NPTS (Arg0)
            RPTS (Arg0)
        }
    }

    Method (_WAK, 1, NotSerialized)  // _WAK: Wake
    {
        RWAK (Arg0)
        \_SB.PCI0.NWAK (Arg0)
        \_SB.PCI0.LPCB.SWAK (Arg0)
        \_SB.PCI0.LPCB.SIO1.SIOW (Arg0)
        LEDW (Arg0)
        Return (WAKP)
    }

LEDW is called when wake and LEDS during sleep, let's look at this methods. LEDS is empty..

 

    Method (LEDS, 1, NotSerialized)
    {
        If (LEqual (OBDP, 0x02))
        {
            DBGL (One)
            Store (Arg0, P80B)
        }
    }

    Method (LEDW, 1, NotSerialized)
    {
        If (LEqual (OBDP, 0x02))
        {
            DBGL (Zero)
            ShiftLeft (Arg0, 0x04, P80B)
        }

        If (LEqual (GNLD, 0x02))
        {
            SYSL (Zero)
        }

        If (LEqual (GNLD, One))
        {
            \_SB.PCI0.LPCB.SIO1.ENFG (0x0B)
            And (\_SB.PCI0.LPCB.SIO1.OPT7, Zero, \_SB.PCI0.LPCB.SIO1.OPT7)
            \_SB.PCI0.LPCB.SIO1.EXFG ()
        }
    }

 Store (0x45, OPT7) is called in SIOS as Mieze mentioned when Arg0 == 3 (sleep state) but it doesn't seems to make any effect.

 

Led is blinking more frequently on Windows and Mac.

 

If there is possibilty to take control over this, compering DSDT from older bios might reveal something but I doubt it.

 

My boards is Z370 asrock extreme 4

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By MaLd0n
      Now have a Olarila app, just download app and clover folder for your Chipset! https://olarila.com/forum/viewtopic.php?f=81&t=6771   Nehalem, SandyBridge, IvyBridge, Haswell, Broadwell     Skylake, Kabylake and Coffeelake is here http://www.insanelymac.com/forum/topic/321872-guide-sierra-on-gigabyte-mobos-serie-200-kabylake-dsdt/   Install MacOS with Olarila Image, Step by Step, Install and Post Install
       
      https://olarila.com/forum/viewtopic.php?f=50&t=8685
        Mojave Full DSDT patch   http://olarila.com/forum/viewtopic.php?f=59&t=6428   First...   ***Update bios to last available version!***   If you need a full patched DSDT...  -Extract tables with F4 key in Clover boot screen! -Run it and send me files! RunMe.app   Installation   --Create a bootable copy of macOS Sierra / High Sierra / Mojave   https://github.com/chris1111/Create-Install-Media/releases   --Install Clover in USB stick   https://sourceforge.net/projects/cloverefiboot/files/Installer/   --Replace with my Clover folder https://olarila.com/files/Clover.Folder/CLOVER.SERIES.CHIPSET.zip   --Install Sierra/High Sierra and boot into system!   Post Installation --Install Clover and replace with my folder   https://olarila.com/forum/viewtopic.php?f=28&t=8222   --Reboot and activate video!   Bingo!   Now you need a fine tune! DSDT time!   --DSDT   Patches -FIX ERRORS AND WARNINGS -HPET -SATA -DMAC -SLPB -DARWIN -LPC -XHCI -PLUGIN TYPE -XXXX to HDEF -HDEF -RTC -IRQs -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -LAN -USBX -PMCR -EC -PNLF -HDMI
       
      --Power Management
      - 1 Generation Intel Processors, use Generate P and C States in config.plist
      - 2 and 3 Generations Intel Processors, Generate SSDT with Piker script and drop CpuPm and Cpu0Ist SSDTs
      ssdtPRGen.command.zip
      Credits-https://github.com/Piker-Alpha/ssdtPRGen.sh
      - 4 Generation+ Intel Processors, use PluginType=1 in DSDT, SSDT or Clover config.plist
       
      for check Power, Frequency, Temperature and Utilization, use it
       
      Install Intel Power Gadget.pkg.zip
       
      --Brightness
      Install .app, select the required permission and reboot. Work in F1 / F2 keys!
      NativeDisplayBrightness.app.zip


      https://github.com/Bensge/NativeDisplayBrightness/releases
      *in some cases .app don't work, check patches in config.plist inside Clover folder Post Install
       
      --Clover
       
      https://sourceforge.net/projects/cloverefiboot/files/Installer/
       
      --AUDIO
       
      Use DSDT + AppleAlc
       
      --install Lan driver by Mieze
        -Atheros   http://www.insanelymac.com/forum/files/file/313-atherose2200ethernet/   -Intel   http://www.insanelymac.com/forum/files/file/396-intelmausiethernet/   -Realtek   http://www.insanelymac.com/forum/files/file/88-realtekrtl8111-binary/   --Links   -FakeSMC   https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek   -Audio   https://github.com/vit9696/AppleALC http://www.insanelymac.com/forum/topic/314406-voodoohda-289/   -USB   https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads   It's time to Rock   -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!   Apple, Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad and many, many, many others!   We're all here to have fun and learn from each other!  
    • By MaLd0n
      Now have a Olarila app, just download app and clover folder for your Chipset! https://olarila.com/forum/viewtopic.php?f=81&t=6771   Install MacOS with Olarila Image, Step by Step, Install and Post Install
       
      https://olarila.com/forum/viewtopic.php?f=50&t=8685
        First... If you need DSDT edits... -Extract tables with F4 key in Clover boot screen! -Run it and send me files! RunMe.app   Installation --Create a bootable copy of El Capitan /  Sierra / High Sierra / Mojave   https://github.com/chris1111/Create-Install-Media/releases   --Install Clover in USB stick https://sourceforge.net/projects/cloverefiboot/files/Installer/   --Replace with my Clover folder   https://olarila.com/files/Clover.Folder/CLOVER.LGA775.zip   --Install EL Capitan / Sierra / High Sierra and boot into system!     Post Installation   --Install Clover and replace with my folder   https://olarila.com/forum/viewtopic.php?f=28&t=8222     --Reboot and activate video!   Bingo! Now you need a fine tune! DSDT Time!   My DSDT GA P35-DS3   DSDT.MaLd0n.zip     Patches -FIX ERRORS AND WARNINGS -HPET -SATA -SLPB -DARWIN -LPC -HDEF -RTC -EHCI -UHCI -IRQs -SBUS -BUS1 -MCHC -ALS0 -SHUTDOWN -LAN -EC -PNLF --Native Power Management
       
      Use Clover, check Generate P and C States
       
      --Brightness
      Install .app, select the required permission and reboot. Work in F1 / F2 keys!
      NativeDisplayBrightness.app.zip


      https://github.com/Bensge/NativeDisplayBrightness/releases
      *in some cases .app don't work, check patches in config.plist inside Clover folder Post Install
       
      --AUDIO
       
      Device HDEF + AppleAlc + Lilu
       
      --install Lan driver by Mieze
        -Atheros   http://www.insanelymac.com/forum/files/file/313-atherose2200ethernet/   -Intel   http://www.insanelymac.com/forum/files/file/396-intelmausiethernet/   -Realtek   http://www.insanelymac.com/forum/files/file/88-realtekrtl8111-binary/   --Links   -FakeSMC   https://bitbucket.org/RehabMan/os-x-fakesmc-kozlek   -Audio   https://github.com/vit9696/AppleALC http://www.insanelymac.com/forum/topic/293863-applehda-patch-requests/   -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!   Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad and many, many, many others!   We're all here to have fun and learn from each other!   ENJOY!  
    • By Hugo_bee
      Here I am back again, with a little work for a noob colleague with a mission
       
      Asrock H270M is an ITX mobo (we really appreciate them) that is coming to become an IMAC.
      To let this, we have to do the basic Mojave USB setup installation (create install dir procedure) by erasing a normal 16gb USB3 pen
       
      After that, apply a Clover UEFI+ESP setup with latest Clover
       
      Mount EFI folder of the USB Mojave install disk
       
      Replace ENTIRELY the content of EFI partition with the one here.
       
      For the BIOS configuration I've applied this one:
       
      Advanced \ CPU Configuration → Intel Virtualization Technology : Enabled
      Advanced \ Chipset Configuration → Primary Graphics Adapter : PCI Express
      Advanced \ Chipset Configuration → Vt-d : Disabled
      Advanced \ Chipset Configuration → IGPU Multi-Monitor : Disabled
      Advanced \ USB Configuration → Legacy USB Support : Enabled
      Advanced \ USB Configuration → PS/2 Simulator : Disabled
      Advanced \ USB Configuration → XHCI Hand-off : Enabled
      Security  → Secure Boot: Disabled
      Boot  → Fast Boot: Disabled
      Boot  → Boot From Onboard LAN: Disabled
       
      Then: SETUP Mojave
      Reboot, mount EFI of DESTINATION DISK and REPLACE its EFI content as done before.
       
      you will have:
      1 lan 1gigabit (the 1st one to the left, by standing in front of ports)
      2 HDMI audio and video with QE/CI
      3 all the 15+ USB and XHCI ports enabled
      4 SATA and M2 up & running
      5 NO WIFI but you can replace with a broadcome native one easily.
      6 NO sleep wake
       
       
      H270M-Asrock.zip
    • 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.
    • By artaa5474
      Hello,
      hello I have a problem with mw laptop
      I installed Mojave 10.14.6
      on clover I use fix HPET on ACPI, but make my SSDT for processor multiplier didn't work
      If I Uncheck Fix HPET my audio can't work

      Spec:
      Acer E5-471
      intel core i3 4005U
      ram 6GB
      Intel HD 4400
      Send me SanKyuus-iMac.zip
×