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
      ---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 Drovosek
      For my laptop Hp Pavilion 15-au028ur worked patch for HP 3165sf
      I also experimented with manual patching and assembled my own version:

      #Maintained by: RehabMan for: Laptop Patches #Battery_HP-DV6-1380ek.txt # created by RehabMan 2019-xx-xx # based on Battery_HP-DV6-1380ek.txt # additional patches for dv6-1380ek provided by chihab222, credit gsly # works for: #  HP Pavilion 15-au028ur, per Drovosek into method label B1B2 remove_entry; into definitionblock code_regex . insert begin Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }\n end; # 16-bit EC0 registers #                BADC,   16, #                BFCC,   16, #                MCUR,   16, #                MBRM,   16, #                MBCV,   16, into device label EC0 code_regex BADC,\s+16, replace_matched begin ADC0,8,ADC1,8, end; into device label EC0 code_regex BFCC,\s+16, replace_matched begin FCC0,8,FCC1,8, end; into device label EC0 code_regex MCUR,\s+16, replace_matched begin CUR0,8,CUR1,8, end; into device label EC0 code_regex MBRM,\s+16, replace_matched begin BRM0,8,BRM1,8, end; into device label EC0 code_regex MBCV,\s+16, replace_matched begin BCV0,8,BCV1,8, end; # 16-bit method access into method label CLRI code_regex (\^.*)MBRM replaceall_matched begin B1B2\(%1BRM0,%1BRM1\) end; into method label UPBS code_regex (\^.*)MBRM replaceall_matched begin B1B2\(%1BRM0,%1BRM1\) end; into method label UPBI code_regex (\^.*)BFCC replaceall_matched begin B1B2\(%1FCC0,%1FCC1\) end; into method label UPBS code_regex (\^.*)MCUR replaceall_matched begin B1B2\(%1CUR0,%1CUR1\) end; into method label UPBS code_regex (\^.*)MBCV replaceall_matched begin B1B2\(%1BCV0,%1BCV1\) end;
      The only problem - when it reaches 100% charge, it no longer falls until you reset the CMOS (15-30 seconds hold down the power button on the laptop). In the rehabman guide there is a patch for ASUS in this case, there is a patch method FBST. There is no such method in my DSDT.
      Can someone help?
      Here's a patched and clean DSDT: https://vk.com/doc183234383_509697931
    • By jamesxxx1997
      Hi everyone~
      Now using mojave 10.14.4 , I am patching my dsdt and ssdt but have four syntax error with my dsdt.dsl , and I don't know how to fix it.
       
      My specs:
      lenovo thinkpad x1 yoga 3rd
      CPU : i7-8550u
      graphics : uhd620
       
      The file of my dsdt and ssdt , ioreg , and my efi is in this link:https://drive.google.com/drive/folders/1T1nv1QgqDtczXrohdlQUJ_8O-kPpoSEf?usp=sharing
       
      thanks!
    • By bcuraboy3
      Good morning everyone. I have a HP Pavillion with the following specs
      I have managed to install MOjave on it, using Rehabman's config for Intel HD5500. 
      But I need some help with a DSDT for it.
      Would anyone be kind enough to have a look at the zip file, which contains the EFI folder, a IOREG, and some screenshots from DPCI Manager,
      and help me with a good DSDT patched and a correct config.plist for it?   
      Thank you very much.  Highly appreciated 
      I have also included a report from Aida64 in case anyone needs it 
       
      15-p200np
       
      Número do equipamento
      L5Z67EA
      Microprocessador
      Intel Core i7-5500U com placa gráfica Intel HD 5500 (2,4 GHz, 4 MB de cache, 2 núcleos);
      Memória
      SDRAM DDR3L de 4 GB a 1600 MHz (1 x 4 GB)
      Placa de vídeo
      NVIDIA GeForce 840M (DDR3 dedicada de 2 GB) >>  disabled already using the config.plist provided 
      Disco rígido
      SATA 1 TB 5400 rpm
      Unidade multimédia
      Gravador de DVD SuperMulti
      Visor
      HD BrightView com retroiluminação WLED de 39,6 cm (15,6 pol.) na diagonal (1366 x 768)
      Placa de rede
      Ethernet LAN Base-T 10/100 integrada
      Conectividade sem fio
      Combo 802.11b/g/n (1x1) e Bluetooth 4.0 (compatível com Miracast) >> It's not supported, but a DW1550 it's on it's way 
      Som
      BeatsAudio com 2 altifalantes >>  it's a ALC 290 
      Teclado
      Tamanho completo tipo ilha com teclado numérico
      Dispositivo
      HP Imagepad com suporte de gestos multi-toque
      Portas externas
      1 leitor de cartões multimédia SD multi-formato
      1 HDMI
      1 combinação auscultadores/microfone
      1 USB 2.0
      2 USB 3.0
      1 RJ-45
      Dimensões
      38,45 x 26,02 x 2,39 cm
      Peso
      2,27 kg
      Alimentação
      Transformador de alimentação CA de 65 W
      Polímero de iões de lítio 4 cél. 41 Wh
      Câmara
      Câmara Web HP TrueVision HD (frontal) com microfone digital de matriz dupla integrado
      Mac-Pro-Noi.zip
      Report.htm
    • 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!  
×