Jump to content
About Just Joined group Read more... ×
VirusX

Wake reason: RTC (Alarm) - how to deactivate?

215 posts in this topic

Recommended Posts

This looks like a good idea.  The only thing I would try differently is to use launchctl stop and start instead of load and unload. 

 

EDIT: It now works. I changed the configuration in the original post to reflect this.

 

To check that it is working:

pmset -g log | grep DarkWake

Edited by tseug

Share this post


Link to post
Share on other sites
Advertisement

EDIT: It now works. I changed the configuration in the original post to reflect this.

 

To check that it is working:

pmset -g log | grep DarkWake

 

That's exactly the way I set up sleepwatcher too.  Works for me as well.

Share this post


Link to post
Share on other sites

EDIT: It now works. I changed the configuration in the original post to reflect this.

 

 

 

Are you really sure that "-s /etc/rc.wakeup" and "-w /etc/rc.sleep" should be right ?

-s is for sleep command , therefore it should be rc.sleep ?

Maybe you must alter your original post , again ;-) ?

 

Regards,

 

Markus

Share this post


Link to post
Share on other sites

@tseug, great idea, I used to use SleepWatcher with an older Bluetooth dongle to allow sleep.

 

 

These are the commands I had...

 

-s /Library/SleepWatcher/rc.Sleep

-w /Library/SleepWatcher/rc.WakeUp

Share this post


Link to post
Share on other sites

Are you really sure that "-s /etc/rc.wakeup" and "-w /etc/rc.sleep" should be right ?

-s is for sleep command , therefore it should be rc.sleep ?

Maybe you must alter your original post , again ;-) ?

 

Regards,

 

Markus

You're absolutely right. Yet another edit. Thanks :)

 

By the way, wake on LAN does not need to be disabled for this configuration to work.

Share this post


Link to post
Share on other sites

Go with the sleepwatcher method.  There has to be a reason mdnsresponder was replaced with discoveryd.  Right now discoveryd and mdnsresponder appear to do the same thing; maybe one that that will change?

Share this post


Link to post
Share on other sites

Sounds reasonable... Any chance you may provide a reverse manual to reverse the changes made with mdnsresponder and a guide to install sleep watcher properly? Would really appreciate this :)

Share this post


Link to post
Share on other sites

Other than checking the log for wake events is there a way to check discoveryd was disabled and re-enabled?

 

Well, you obviously can't check if discoveryd is unloaded during sleep directly, but you can check that it is loaded (the sudo is very important here so make sure to remember it):

 

sudo launchctl list | grep com.apple.networking.discoveryd

 

This should return something. Otherwise discoveryd is not loaded.

 

Another thing you can try before adding /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist is to check and see if your rc scripts work. I.e

 

/usr/local/sbin/sleepwatcher -V -s /etc/rc.sleep in a terminal and then try to sleep or

/usr/local/sbin/sleepwatcher -V -s /etc/rc.sleep -w /etc/rc.wakeup and then try to sleep

 

In both these cases the terminal window will not report anything until you actually wake up from sleep again, and you have to initiate sleep manually (or wait until automatic sleep). Enter CTRL+C to stop SleepWatcher  after testing.

 

Refer to the SleepWatcher documentation for more details.

Share this post


Link to post
Share on other sites

Can anyone pretty this up for basic users?

Im a bit overwhelmed with how to install this with the scripts. I currently have a working system with the 'old' method' and a bit scared to bugger things up.

Share this post


Link to post
Share on other sites

I just switched back to msdnsresponder.  The sleepwatcher method sometimes works and sometimes doesn't.  For 2 mornings in a row my computer has been turned on instead of sleeping. The first night it did work as it should.

Share this post


Link to post
Share on other sites

So, anyone brave enough to try 10.10.1 and see if the mDNSResponder mod still works? Will i have to go through the steps mentioned in the instruction above again or will those files presumably stay the way they are right now?

Share this post


Link to post
Share on other sites

Actually the method above is not just fixing the sleep issue.. It also disables the RTC Alarm Clock for when you have "Wake on Lan" enabled. This is superb as from now on all macs can sleep until someone sends a magic packet to wake them up. Hopefully someone capable will write an instruction on how to disable the RTC Alarm Clock even if 10.10.1 fixes the sleep issue. I gave up on the Wake on Lan Function since the release of Snow Leopard (which introduced this damn RTC Alarm/Bonjour Sleep Proxy {censored}). Having found this method a couple of weeks ago filled me with pure joy as it once again made my setup from a few years ago working flawlessly. I don't want do miss the luxury of sleeping macs while having wake on lan enabled.. 

Share this post


Link to post
Share on other sites

Anyone here who tried to install 10.10.1?

I installed 10.10.1 last night.  I'm using mdnsresponder instead of discoveryd and things still work fine.  I doubt anything has changed with discoveryd

Share this post


Link to post
Share on other sites

Cool, were you using the instructions above after 10.10.1 or were those files edited prior to the update? Were you using the Combo Updater or the usual SoftwareUpdate? :)

Share this post


Link to post
Share on other sites

I had mdnsresponder working and discoveryd disabled before I installed 10.10.1.  I used software update.

same here. Still sound sleep. :D

Share this post


Link to post
Share on other sites

My laptop was waking up every two hours like everyone else's here so I used the mdnsresponder files and launch daemons that I downloaded from this thread (post 33), unloaded and then reloaded the mdnsresponder and discoveryd files and it worked well. I got my internet back on and no longer have the laptop waking up on its own. Thanks mcdougal33.

 

However, I was unable to upgrade to Yosemite so I downloaded the full 5 GB installer and installed the final version of 10.10 and, with a few quirks in the installation process, it installed correctly.  But I had no internet.  I couldn't remember where the mdnsresponder files go (usr/sbin) and I couldn't remember the terminal commands for unloading and reloading the mdnsresponder and discoveryd files. (Fortunately, I had done it fairly recently so I could use my up arrow in terminal to find them and rerun them.)  But it occurred to me that there should be instructions with the files to explain how to install them so that someone who needs that information and finds that they can't access the internet can get it.  I took the liberty to put one together and add it to the mdnsresponder files that mcdougal33 uploaded in post 33 of this thread.

 

attachicon.gifmDNSResponder with Instructions.zip

 

EDIT - The instructions have been modified to conform to the comments regarding the original instructions below.

Is this fix safe to use on a hackintosh running Yosemite?

I have the sleep/reboot problem. Is this a fix for that?

Just being cautious....don't want to mess anything up since the comp is running fine except for the sleep/reboot issue.

 

Thanks

Len

Share this post


Link to post
Share on other sites

Is this fix safe to use on a hackintosh running Yosemite?

I have the sleep/reboot problem. Is this a fix for that?

Just being cautious....don't want to mess anything up since the comp is running fine except for the sleep/reboot issue.

 

Thanks

Len

If your hack would wake itself up every two hours, this is the right cure for that problem. :D

Share this post


Link to post
Share on other sites

If your hack would wake itself up every two hours, this is the right cure for that problem. :D

 

How do I copy the helper files to usr/sbin?   Sorry.....new to this but can follow directions :)

 

Thanks!

Len

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

Announcements

  • Similar Content

    • By miliuco
      (Basado en el texto publicado por los autores de OpenCore titulado Fixing System Clocks dentro de la sección Getting Started With ACPI del cual en gran parte es una traducción).
       
      Real-time clock (RTC)
       
      Un reloj en tiempo real (RTC) es un reloj que funciona con pila o batería y que se incluye en un microchip en la placa base de un ordenador. Suele estar separado del microprocesador y se denomina «CMOS» (Complementary Metal Oxide Semiconductor). Su función es mantener una corriente cuando la placa base se apaga y/o es desconectada de la corriente eléctrica y, de esta forma, evitar que la BIOS se desconfigure cada vez que se apaga el ordenador.
      Una pequeña memoria en este microchip almacena la descripción del sistema o los valores de configuración, incluidos los valores de tiempo almacenados por el RTC. Cuando encendemos el ordenador, la BIOS lee la hora actual desde la memoria en el chip con el RTC.
      Aunque el término RTC normalmente se refiere a dispositivos en ordenadores y sistemas embebidos, los RTC están presentes en la mayoría de los aparatos electrónicos que necesitan guardar el tiempo exacto.
       
      Placas base con chipset Intel series 300
       
      Algunos fabricantes de placas base Intel, sobre todo de la serie 300 (B360, B365, H310, H370, Z370, Z390, B460, Z490, etc.) han implementado un nuevo tipo de reloj del sistema llamado AWAC (ACPI Wake Alarm Counter Clock). El problema es que macOS no sabe manejar AWAC y, en su lugar, espera encontrar el clásico RTC. Esto puede ocasionar problemas como la desconfiguración de la BIOS en cada apagado o errores importantes al arrancar el sistema operativo. La solución pasa por traer de vuelta el RTC para que macOS pueda funcionar correctamente. Esto es lo que se busca con los archivos SSDT-AWAC y SSDT-RTC0. Cada uno de ellos funciona de forma diferente:
      SSDT-AWAC: deshabilita AWAC y y habilita RTC. En nuestro DSDT generalmente hay una variable llamada STAS que determina qué reloj utilizar, One para RTC y Zero para AWAC
      SSDT-RTC0: crea un falso dispositivo RTC para macOS cuando el DSDT no tiene la opción de utilizar el RTC clásico.
       
      ¿Cómo saber si necesito uno de estos SSDT?
       
      Para saber esto has de obtener el DSDT de tu sistema en formato AML y descompilarlo a formato ASL para que puedas leerlo con un editor de texto (ver más abajo).
       
      Busca en el archivo DSL el texto Device (AWAC). Si no se encuentra ninguna coincidencia (el reloj AWAC no existe), no es necesario que continúes. No tienes dispositivo AWAC y no necesitas ninguno de estos DSDT.
        Si el texto Device (AWAC) existe, busca el texto STAS. Si este texto existe, significa que se puede forzar la utilización del RTC clásico mediante SSDT-AWAC.aml que es el archivo que has de emplear en este caso.
        Si el texto Device (AWAC) existe pero no el texto STAS, has de usar SSDT-RTC0.aml pero es conveniente saber cómo se llama el dispositivo LPC en nuestro DSDT. SSDT-RTC0 por defecto utiliza LPCB pero en el DSDT puede llamarse así o también LBC o incluso LBC0. Puedes averiguarlo buscando el texto Name (_ADR, 0x001F0000) que corresponde al dispositivo LPC (Low Pin Count) y comprobar cómo se llama realmente en tu sistema para corregirlo si es necesario en SSDT-RTC0.
        Por ejemplo, si en tu DSDT se llama LPCB:
      Device (LPCB) { Name (_ADR, 0x001F0000) // _ADR: Address Method (SPTS, 1, NotSerialized) { SLPX = One SLPE = One If (PWBT) { PBEN = One } } no tendrías que hacer ninguna corrección en el archivo SSDT. Pero si tuviese otro de los nombres posibles, habría que corregirlo.
      El archivo SSDT-RTC0 tiene este contenido:
      DefinitionBlock ("", "SSDT", 2, "ACDT", "RTC0", 0x00000000) { External (_SB_.PCI0.LPCB, DeviceObj) // (from opcode) Scope (_SB.PCI0.LPCB) { Device (RTC0) { Name (_HID, EisaId ("PNP0B00")) // _HID: Hardware ID Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x08, // Length ) IRQNoFlags () {8} }) Method (_STA, 0, NotSerialized) // _STA: Status { If (_OSI ("Darwin")) { Return (0x0F) } Else { Return (0); } } } } } Las 2 apariciones de LPCB quedarían sin modificar o serían cambiadas a LBC o LBC0, según cada caso.
       
      ¿Cómo obtener DSDT.aml del sistema? (ACPI dump)
       
      AML (ACPI machine Language) es el código que utiliza ACPI. Es independiente de la plataforma. El código AML es interpretado cuando se leen cada una de las tablas ACPI.
      ASL (ACPI source language) es el código fuente utilizado por ACPI. Se pude editar con editores de texto.
      Para convertir AML a ASL y viceversa es necesario emplear un compilador. El más utilizado es iasl (Intel ACPI source language optimizing compiler and dissasembler), utilidad libre incluida en distribuciones Linux y que también tiene versiones para macOS y para Windows.
      La versión para macOS se puede descargar desde el repositorio de RehabMan entre otros sitios.
      La versión para Windows se puede obtener incluida en el paquete Windows Binay Tools desde la web acpica.org.
       
      Extraer DSDT en macOS con Clover
       
      Si usas Clover, esta es una de las formas más sencillas de obtener DSDT.aml. Simplemente hay que pulsar F4 en la pantalla del menú de Clover y el archivo se genera en la partición EFI, en EFI/Clover/acpi/origin, junto a otros archivos que no son interesantes para la tarea que nos ocupa. El archivo DSDT.aml no se puede leer tal cual, es necesario descompilarlo al formato DSL. Para ello, desde Terminal:
      > iasl DSDT.aml Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version 20180427(RM) Copyright (c) 2000 - 2018 Intel Corporation File appears to be binary: found 88786 non-ASCII characters, disassembling Binary file appears to be a valid ACPI table, disassembling Input file DSDT.aml, Length 0x408B7 (264375) bytes ACPI: DSDT 0x0000000000000000 0408B7 (v02 ALASKA A M I 01072009 INTL 20180427) Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) Parsing completed Disassembly completed ASL Output: DSDT.dsl - 1853692 bytes El resultado es un archivo DSDT.dsl en el que podemos hacer las búsquedas relativas al RTC.
       
      Extraer DSDT en Windows
       
      Del paquete Windows Binary Tools solamente vamos a utilizar iasl.exe y acpidump.exe. Para extraer las tablas al directorio actual: acpidump -b. Se obtienen, como en el caso de macOS, una serie de archivos de los que sólo nos interesa dsdt.dat (en Windows el archivo AML obtenido tiene extensión dat). El proceso para descompilar el archivo DSDT es muy parecido a macOS:
      > iasl -d dsdt.dat Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version 20200925 Copyright (c) 2000 - 2020 Intel Corporation File appears to be binary: found 88982 non-ASCII characters, disassembling Binary file appears to be a valid ACPI table, disassembling Input file dsdt.dat, Length 0x40AAB (264875) bytes ACPI: DSDT 0x0000000000000000 040AAB (v02 ALASKA A M I 01072009 INTL 20160527) Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) Parsing completed Disassembly completed ASL Output: dsdt.dsl - 1980764 bytes El resultado es un archivo dsdt.dsl en el que también podemos hacer las búsquedas relativas al RTC.
       
      Nota: los archivos SSDT han de colocarse en la Carpeta EFI/Clover/ACPI/patched (Clover) o EFI/OC/ACPI (OpenCore). En OpenCore también hay que añadirlos en el archivo config.plist.
    • By ankarastrix
      I have a problem, I select the "sleep" option from the menu, the mac goes to sleep but does not "wake up" (screen). I can't even change smbios from iMac17.1 to iMac18.1 + when I change the mac it boots, the progress bar and apple icon are visible and then the screen goes off.
      config.plist
    • By melamangiata
      Hello, these are my pc specs:
       
      i5-4460
      H97M-D3H Gigabyte
      HD 4600 as a gpu
      4gb DDR3
      SSD 256gb
       
      I attach my EFI folder, i removed only the mac serial.
       
      I installed Catalina 10.15.6 with OpenCore 0.6.0, every things is working except for the wakeup.
       
      I put the pc in stop form the apple icon, the monitors turns off, the pc turns "off".
      When i push a keyboards button the pc turns on also the monitors turns on, but the screen is still black. Force rebooting is required. Any advice?
       
      Thank you.
       
       
       
       
      EFI.zip
    • By amin321
      since the installation of macOS, the most observable problem is awaking from sleep failure, I almost tried every related thing like mapping USB ports, appropriate ig-platform-id and disabling dgpu , all of those does not help at all that report on panic gets triggered after force shutdown and reopening the system (as the system does not wake from sleep) dell g3 3590 intel core i7 9750h *iGPU : Intel UHD 630 *RAM : 16GB, 2x8GB, DDR4, 2666MHz *Storage : 256GB M.2 PCIe NVMe Solid Stat e Drive (Boot) + 1TB 5400 rpm 2.5" SATA Hard Drive (Storage) can anybody give me a tip on that
×