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/files/Clover.Folder/CLOVER.SERIES.CHIPSET.zip   --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/files/Clover.Folder/CLOVER.LGA775.zip     --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 MaLd0n
      ---INSTALLATION TUTORIAL---
       
      ---Original Post---
      https://olarila.com/forum/viewtopic.php?f=45&t=9172
       
      ---USB---
      https://pikeralpha.wordpress.com/2016/07/13/simple-skylake-usb-fix-no-kexts-required/
       
      ---CLOVER FOLDER---
       
      CLOVER.zip
       
       
      --MOBO
      GigaByte Z390 M Gaming



      --PROCESSOR
      Intel Core i9-9900K


      --COOLER
      CoolerMaster MasterLiquid ML120R RGB


      --MEMORY
      Corsair Dominator Platinum 16GB (2 x 8GB)


      --GPU
      Sapphiretech Radeon RX 590 8 GB GDDR5


       
      --SSD
      Samsung 970 EVO NVMe M2 Flash Drive


      --POWER SUPPLY
      EVGA 750 N1, 750W


      --WIRELESS
      TP-Link Archer T9E


      --BLUETOOTH
      Orico BTA-403


      --CASE
      Thermaltake View 21 Tempered Glass Edition


      --DSDT Patches--
      -FIX ERRORS AND WARNINGS -FIX ACPI ERRORS -REMOVE UNUSED SCOPES / DEVICES -HIGH PRECISION EVENT TIMER -SATA SERIE 10 ID -DMAC -REMOVE 22K LINES, PROBLEMATIC and UNUSED -FIX K.P in REBOOT -NVRAM / REAL TIME CLOCK -SLPB -DARWIN / WINDOWS 2015 -XHCI -PLUGIN TYPE -HDAS to HDEF -HDEF -REAL TIME CLOCK -ARTC -IRQs -SBUS -MIKEY -BUS1 -MCHC -ALS0 -SHUTDOWN -UAR1 -LAN -FWHD -USBX -PMCR -PPMC -XSPI -GMM -IMEI -EC -PNLF -ARPT -GFX0 -NVME -DTGP -ACQUIRE MUT0 0XFFFF -OPERATION REGION GPIO -MUTEX MUT0 0x00 -EXTERNAL REFERENCES -UNKNOWNOBJ -HDMI / HDAU -FULL RENAMED DEVICES  
      --SCREENSHOTS--





























      --BruceX--
       
      --USB-C-- test with SanDisk Ultra USB-STICK 128gb


       
      -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, Sampath007, onemanosx, erroruser, Jenny David, Olarila Facebook Community, Hackintosh Facebook Community and many others!
      We're all here to have fun and learn from each other!
    • By AppleBytes
      Hello,
      I'm working on a re-install of OSX on a dell inspiron 9400. I was finally able to get a copy of SL on it. But it still needs MUCH work, as the graphics (NVIDIA Geforce Go 7800) isn't properly recognized -- either by model, or installed VRAM.
      It has 512Mb, but only initializes 256Mb VESA.
      Anyway, as a start, I thought it best to use a valid dsdt.dsl for compilation, and start there. I've managed to remove all the warnings, and errors save 2
      OUTPUT:
      # sudo iasl -ta ./dsdt.dslll Intel ACPI Component Architecture ASL Optimizing Compiler version 20110527-64 [May 27 2011] Copyright (c) 2000 - 2011 Intel Corporation ./dsdt.dslll   3519:                                 Return (0x00) Error    4080 -           Invalid object type for reserved name ^  (found INTEGER, requires Buffer) ./dsdt.dslll   3956:                     Return (Package (0x00) {}) Remark   5072 -         Effective AML package length is zero ^ ASL Input:  ./dsdt.dslll - 4997 lines, 158533 bytes, 1633 keywords Compilation complete. 1 Errors, 0 Warnings, 1 Remarks, 577 Optimizations I'm attaching a copy of the above output, and the dsdt.dsl file in a tarball to this post in hopes someone with the required knowledge can help me fix it.
      FWIW
      SMBIOS I'm using indicates this is a MBP 3,1
      cpu: cd2 (T7400 @2.16Ghz)
      graphics: NVIDIA Geforce Go 7800 ( G70M? )
      ram: 4Gb
      dell inspiron 9400 (Laptop)
       
      Thank you for all your time, and consideration!
       
      --Chris
       
      DSDT-DSL.tar
    • By penghubingzhou
      URL:https://github.com/penghubingzhou/VoodooI2C-DSDT
       
      VoodooI2C-DSDT is a repository that is aiming at collecting various successful DSDTs for Voodoo I2C.
      Purpose
      The purpose of this repository is to provide some useful code examples for people who haven't yet make Voodoo I2C work. Maybe It don't have your model of laptop, but code in this repository may have some help and references for you.
      Note that the code in this repository is ONLY FOR REFERENCES and it can‘t replace your own work!
      For Submission
      This repository welcomes everyone to submit DSDT code examples that have successfully made VoodooI2C work by PR. To submit your example, please put the DSDT file (or Hotpatch SSDT file), an ioreg without Voodoo I2C installed, and Info.txt in a folder named by your laptop model. Info.txt should include:
      Your CPU model (better for including CPU platform)
      Your touchpad Device ID
      The mode you use (GPIO interrupt or polling)
      Satellite Driver You Use
      Then, fork this repository and clone it, put your file in and commit it to your repository. After checking the conflicts, you can send your commit as a PR to me.
      An example for submitting can be found in Lenovo Xiaoxin Chao 7000-14.
      Credits
      @Alexandred for VoodooI2C @daggeryu for the idea in this repository @penghubingzhou and @williambj1 for maintaining
×