MacNB Posted November 1, 2014 Share Posted November 1, 2014 Have a a pretty good working Mavericks build on Inspiron 530 (P35 chipset with Xeon E5450 Quad Core). It goes to sleep OK (well it take 30 seconds). Wakes instantly. Life is great. Graphics card is GT240 that works out of the box. Did a fresh install of Yosemite on a a spare partition (using latest Chameleon as boot loader). Used the existing DSDT.aml. All seems to work well EXCEPT wake from sleep. Putting to sleep is same as Mavericks ...takes ˜30 seconds... the fans turn off and the power light flashes. BUT...touching the keyboard or pressing the power button starts up the power but the screen stays black (no signal from DVI) and the CAPS LOCK light does nothing. Basically it's crashed and the only option is to restart (by keeping the power button pressed). So I did a new install on another drive but this time using Clover boot loader. No change. Still the same problem ...no wake from sleep. I checked the logs and there's no mention of sleep starting or any Wake Reason. Not sure how to debug this problem. Any suggestions ? Link to comment Share on other sites More sharing options...
Allan Posted November 1, 2014 Share Posted November 1, 2014 Run this command in Terminal: pmset -g | grep hibernatemode and put the result here. Link to comment Share on other sites More sharing options...
MacNB Posted November 1, 2014 Author Share Posted November 1, 2014 Run this command in Terminal: pmset -g | grep hibernatemode and put the result here. Last login: Sat Nov 1 20:32:03 on ttys000 MacNB@MacNB-Mac-Pro:~$ pmset -g | grep hibernatemode hibernatemode 0 MacNB@MacNB-Mac-Pro:~$ I am currently using Clover (btw, really like it). Attached my config.plist config.plist.zip Link to comment Share on other sites More sharing options...
Allan Posted November 1, 2014 Share Posted November 1, 2014 Ok. I need more information, before edit something. Put your Hack for Sleep, after this go in Launchpad > Console, and in search bar, put Wake Reason line, and take a screenshot and upload here. Link to comment Share on other sites More sharing options...
MacNB Posted November 1, 2014 Author Share Posted November 1, 2014 That's the problem...the system sleeps fine but crashes on wake and so there's nothing in the logs. If I look for "Wake", there's still nothing to indicate what caused a wake (see second screen shot). After wake, the OS never gets a chance to run. Link to comment Share on other sites More sharing options...
Allan Posted November 1, 2014 Share Posted November 1, 2014 Go in SystemLog. Link to comment Share on other sites More sharing options...
Allan Posted November 1, 2014 Share Posted November 1, 2014 Try this: config.plist.zip And run this command: sudo rm -rf /private/var/vm/sleepimage After this, reboot your OS X. Link to comment Share on other sites More sharing options...
MacNB Posted November 1, 2014 Author Share Posted November 1, 2014 Same - System Log does not contain "Wake Reason". My screen shots above searches "All Messages" for Wake and Wake Reason. That is, non of the logs contain Wake reason. Which means the OS is not getting a chance to write to the log files after waking...because it has crashed before it can write to the logs (?) As hibernatemode = 0, then there's no sleepimage. That is, the file does not exist. I applied your config.plist and rebooted. Thanks. No change. Still crashes after wake. Attached my dsdt.aml file. This file works fine with Mavericks but maybe Yosemite has changed the way it handles ACPI tables ? macnb.DSDT.aml.zip Link to comment Share on other sites More sharing options...
Allan Posted November 2, 2014 Share Posted November 2, 2014 As hibernatemode = 0, then there's no sleepimage. That is, the file does not exist. This file works fine with Mavericks but maybe Yosemite has changed the way it handles ACPI tables ? pmset -a hibernatemode 0 will save sleepimage only to RAM, this will be Sleep only. In Yosemite nothing changed. Try this: DSDT.zip Link to comment Share on other sites More sharing options...
MacNB Posted November 2, 2014 Author Share Posted November 2, 2014 Thx Allan for the DSDT. Makes no difference. Still crashes after wake. Link to comment Share on other sites More sharing options...
MacNB Posted November 3, 2014 Author Share Posted November 3, 2014 I think it may be a DSDT issue. Is there any way to debug the DSDT ? That is, dsdt logs or debug statements that can be put into the DSDT to get an idea of what is happening ? Link to comment Share on other sites More sharing options...
ytrox Posted November 3, 2014 Share Posted November 3, 2014 with my experience often this is caused by some peripheral that is not properly loaded (wrong driver or missing). take a look and check if all of your peripheral are working fine (audio, graphic card, power management...) sleep is awkward... 1 Link to comment Share on other sites More sharing options...
Allan Posted November 3, 2014 Share Posted November 3, 2014 I think it may be a DSDT issue. Is there any way to debug the DSDT ? That is, dsdt logs or debug statements that can be put into the DSDT to get an idea of what is happening ? All about DSDT you can find here: DSDT/SSDT: Basic knowledge DSDT/SSDT: Edit using MacIASL DSDT/SSDT: Common DSDT patches Link to comment Share on other sites More sharing options...
MacNB Posted November 3, 2014 Author Share Posted November 3, 2014 with my experience often this is caused by some peripheral that is not properly loaded (wrong driver or missing). take a look and check if all of your peripheral are working fine (audio, graphic card, power management...) sleep is awkward... Thx for the suggestion. yes I already tried that. In the BIOS I disabled the Audio and the LAN controller. Disabling the USB is not an option as I need the keyboard and mouse. I removed the LAN kexts. I removed all USB peripherals (including Apple bluetooth USB dongle) except kbd & mouse. If I boot Mavericks 10.9.5, it works great on the same system (same HDD just on a different partition). So the "only" change is the new Yosemite (which works great except the Wake). Link to comment Share on other sites More sharing options...
MacNB Posted November 5, 2014 Author Share Posted November 5, 2014 seems like some changes under the hood in 10.10. Can't get Wake to work. Tried various changes in DSDT _WAK, _PTS and _INI method but nothing fixes it. It could be a graphics card issue which does work (QE/CI) in full acceleration but may be Apple have never tested their old Kexts with the old Nvidia h/w (GT240) for sleep/wake ? Link to comment Share on other sites More sharing options...
MacNB Posted November 6, 2014 Author Share Posted November 6, 2014 OK. So I found the problem and have a solution. I used Rehabman's excellent ACPI Debug/tracking tool/kext (see details here). The problem is Yosemite (I think it's a bug). In the DSDT, there's a method _INI that's called at initialisation. It sets up SMIP, OSFL and OSFX with values depending on the string stored in _OS (to identify the running OS). With Snow Leopard and Mavericks, _OS is always set to "Darwin"....as one would expect. With Yosemite, _OS = "Microsoft Windows NT" .....go figure that out !!!! I think that's a bug in Yosemite. That broke the logic inside _INI and consequently OSFL and OSFX were not setup correctly for Wake. The original code was: Method (^_INI, 0, NotSerialized) // _INI: Initialize { If (STRC (_OS, "Microsoft Windows")) { Store (0x56, SMIP) } Else { If (STRC (_OS, "Microsoft Windows NT")) { If (CondRefOf (\_OSI, Local0)) { If (_OSI ("Windows 2001")) { Store (0x59, SMIP) Store (Zero, OSFL) Store (0x03, OSFX) } If (_OSI ("Windows 2006")) { Store (0x59, SMIP) Store (Zero, OSFL) Store (0x04, OSFX) } } Else { Store (0x58, SMIP) Store (Zero, OSFX) Store (Zero, OSFL) } } Else { Store (0x59, SMIP) Store (Zero, OSFL) Store (0x03, OSFX) } } } To get Sleep/Wake to work correctly, OSFL=0x00 and OSFX=0x03 (or better 0x04) When _OS = "Microsoft Windows NT", then _INI method ends up changing nothing and OSFL=0x00 and OSFX=0x01 (I used various debug outputs in the _INI Method to find out what the variables were set to) Solution: Since this DSDT is only going to be used with this OS, I took out ALL checks on the OS type and simply set OSFL & OSFX to the values required for any Darwin based OS. New code is: Method (^_INI, 0, NotSerialized) // _INI: Initialize { Store (0x59, SMIP) Store (Zero, OSFL) Store (0x04, OSFX) } Now, all three OS's can sleep and wake up with the same DSDT file on the same system. SL is the best behaved in that it instantly sleeps and instantly wakes and I mean within a second. MV takes about 20 seconds to sleep and wakes instantly.YS takes about 30 seconds to sleep (HDD light thrashing) and wakes instantly. There's also another bug in Yosemite. Once asleep, it wakes up about every 2 hours and Wake Reason is RTC Alarm. Many real Mac users are complaining about this. If only Tim Cook had a Real Mac Pro running YS in his bedroom while it (and him) are asleep, then we will get his bug fixed ! MacNB.DSDT.aml.zip 7 Link to comment Share on other sites More sharing options...
d620osx Posted November 6, 2014 Share Posted November 6, 2014 Thanks for posting your results. Can I be very cheeky and ask if your DSDT will work on a Vostro 200 with sleep issues. I am running 10.10 with clover and hd 5450, it works well apart from sleep and audio for which I had to use voodoo hda. Thank you Thanks Link to comment Share on other sites More sharing options...
MacNB Posted November 6, 2014 Author Share Posted November 6, 2014 Thanks for posting your results. Can I be very cheeky and ask if your DSDT will work on a Vostro 200 with sleep issues. I am running 10.10 with clover and hd 5450, it works well apart from sleep and audio for which I had to use voodoo hda. Thank you Thanks My DSDT may work. But first you should checkout what Herve did with the Vostro 200 here as he has full working system on multiple versions of OS X. Take his DSDT then modify your DSDT to replace the _INI method with the one I did in post #16 above and you will have sleep/wake working. Post DSDT here and i'll take a look it. Audio has always been a problem for me on this Dell (Vostro 200 is based on the same motherboard). It has legacy version v1 of ALC 888 chip which can be problematic. I am trying Toledo & Piker Alpha's for Yosemite here but it's not working yet. Link to comment Share on other sites More sharing options...
d620osx Posted November 7, 2014 Share Posted November 7, 2014 Thank you for your help and will check the other thread and also try your DSDT. Link to comment Share on other sites More sharing options...
liujianwei Posted November 7, 2014 Share Posted November 7, 2014 Same problem P45,Exactly what I look for,thank you so much MacNB,my sleep works .The only different is my PC fail to wake from sleep for five years,seems like _OS set to Darwin doesn't help wake up from sleep for my PC.Clover <key>FixDarwin_0002</key><true/> to make _OS set to Windows 2001 works.I think with Yosemite _OS doesn't set to "Microsoft Windows NT" at least in my case,a OS X set Windows Value doesn't make sense,maybe same value is misread.But I still have a question,how do you know so many knowledge?I googled and can't find any documents about method _INI.I see method _INI is under PX40 in DSDT,it relate to LPC,right? Link to comment Share on other sites More sharing options...
MacNB Posted November 7, 2014 Author Share Posted November 7, 2014 I think with Yosemite _OS doesn't set to "Microsoft Windows NT" at least in my case,a OS X set Windows Value doesn't make sense,maybe same value is misread. But I still have a question,how do you know so many knowledge? I googled and can't find any documents about method _INI. I see method _INI is under PX40 in DSDT,it relate to LPC,right? Since you ask....I read a lot and I ask a lot of questions to others and having a software background helps ...and there's the 600+ page ACPI Specification to read ...and lot of trial and error You will not find specific info about _INI related to sleep/wake BUT you will about _PTS (Prepare To Sleep) and _WAK (Wake) methods. Looking at those two, you will see that it sets up OSFL, OSFX and SMIP. So, now I asked my self "what else is changing those variables ?" And the answer is "_INI". It would be interesting (to build everyone's knowledge) to find out what's the value of _OS in your DSDT when running under Yosemite. Use the ACPIdebug kext and put debug statements in _INI, _PTS and _WAK methods. I attached my DSDT that has the debug statements. This is the DSDT BEFORE I took out the check on the OS type inside _INI. Use it as an example of how to put debug statements. Drop the ACPIDebug.kext into /EFI/EFI/CLOVER/Kexts/10.10 Boot your system and check system.log (search for acpidebug) and you will see the debug statements. Post it here. If your _OS is NOT set to "Microsoft Window NT" under Yosemite when you enter _INI, then it looks like a BIOS default value. Which means, Yosemite is NOT setting up _OS...which is still a bug. Yes PX40 is LPC. OS X likes it to called LPCB (see my DSDT). 1 Link to comment Share on other sites More sharing options...
liujianwei Posted November 7, 2014 Share Posted November 7, 2014 I don't understand DSDT debugging like \RMDT.PUSH("Entering") .I try to install by patch DSDT.aml use MaciASL and debug.txt,put ACPIDebug.kext to /Volumes/BOOT//EFI/CLOVER/Kexts/10.10,reboot and check system.log (search for acpidebug) by console and see nothing.Then I install ACPIDebug.kext by Kext Utility to SLE,reboot and boot slow and show prohibitory sign,in verbose said still wait for root device,system halted.I use another Yosemite,replaced DSDT.aml,delete ACPIDebug.kext in SLE and /Volumes/BOOT//EFI/CLOVER/Kexts/10.10,use follow command to rebuild kernel cache cd "/Volumes/Macintosh HD" touch System/Library/Extensions kextcache -prelinked-kernel System/Library/Caches/com.apple.kext.caches/Startup/kernelcache -K System/Library/Kernels/kernel System/Library/Extensions Still no luck,how to solve? Link to comment Share on other sites More sharing options...
d620osx Posted November 7, 2014 Share Posted November 7, 2014 My DSDT may work. But first you should checkout what Herve did with the Vostro 200 here as he has full working system on multiple versions of OS X. Take his DSDT then modify your DSDT to replace the _INI method with the one I did in post #16 above and you will have sleep/wake working. Post DSDT here and i'll take a look it. Audio has always been a problem for me on this Dell (Vostro 200 is based on the same motherboard). It has legacy version v1 of ALC 888 chip which can be problematic. I am trying Toledo & Piker Alpha's for Yosemite here but it's not working yet. Hi I tried what you have suggested and the PC goes to sleep but wakes up straight away. What am I missing? Thank you Link to comment Share on other sites More sharing options...
d620osx Posted November 8, 2014 Share Posted November 8, 2014 In the log it states wake reason as UHC1, how do I find out what usb this is please? These are the error I get when I run syslog |grep -i "Wake reason" Nov 7 19:53:40 Kevs-iMac kernel[0] <Notice>: Wake reason: UHC1 Nov 7 19:56:05 Kevs-iMac kernel[0] <Notice>: Wake reason: ? Nov 7 19:59:42 Kevs-iMac kernel[0] <Notice>: Wake reason: UHC1 Nov 7 20:01:55 Kevs-iMac kernel[0] <Notice>: Wake reason: UHC1 Nov 7 20:31:04 Kevs-iMac kernel[0] <Notice>: Wake reason: UHC1 Nov 7 20:38:20 Kevs-iMac kernel[0] <Notice>: Wake reason: UHC1 When I remove everything from the front usb port I got: Nov 8 07:41:19 Kevs-iMac kernel[0] <Notice>: Wake reason: ? Nov 8 07:42:20 Kevs-iMac kernel[0] <Notice>: Wake reason: PCI0 HUB0 Thank you Link to comment Share on other sites More sharing options...
d620osx Posted November 8, 2014 Share Posted November 8, 2014 All sorted out, I un ticked Allow Bluetooth devices to wake this computer and it seems to work fine. Thank you for all the pointers, never had sleep working on non of the OS X versions I was running. Link to comment Share on other sites More sharing options...
Recommended Posts