Jump to content

Black screen - Wake from sleep using PWRB (Power Button)


bertolin
 Share

12 posts in this topic

Recommended Posts

Hello, guys!

 

I was messing around with my DSDT, asking for help here and there, trying to solve the last thing to make my Cintiq Companion 2 a perfect hack and provide a perfect guide for it. I don't know where more I can ask, so I hope somebody with more knowledge than me about ACPI and many more could possibly had some time to help this fella debug some stuff. My system:

 

Cintiq Companion 2 DTHW1310L (Clover)

i5-4258U, H8x/P8x

Intel Iris 5100, 2560x1440 (QHD)

 

My problem is related to wake from sleep using power button. Everything else works very well. My system enters sleep well, led blinks as expected. From here, there are two ways to wake it:

 

Option 1.- Using PWRB (Power Button): it wakes, backlight with black screen (seems to try to connect or push signal to display), ten seconds and display go off, no backlight. Fans keep running, system is available in SSH but not in screen sharing. USB seems not work after sleep since connecting a usb keyboard and built-in buttons doesn't make anything.

 

Option 2.- Connecting the "Wacom link cable"*: it wakes, backlight with black screen, if you wait about 20 or 30 second, display comes back. It's the only way I have to wake my system properly (Wacom link cable doesn't need to be connected to another computer, just connecting the 24-pin connector to my Companion make it wake).

 

* Wacom link cable is a special cable with one 24-pin connector in one side to attach to Companion 2 and an HDMI and an USB cables in the other for a host computer. When connected, if Cintiq Companion 2 goes to sleep, hardware is detected by host computer as a standalone Cintiq 13HD and a USB HUB, so you can use it as an aditional display with Wacom features with future or more powerful systems. This hardware function is called Cintiq Mode.

 

Things I've tried:

 

I'm trying to use ACPIDebug.kext (thanks to RehabMan) in order to try to debug if my device properly wakes or somewhere in ACPI it stopped (please, forgive if I'm say things wrong, english is not my native language and I don't have any coder or programming skills or background). But more tracing code is needed for what I've been told, but don't know how to do it. Some guidance here will be really appreciated.

 

I can see logs in Console.app if Option 2 is choosen, but using PWRB makes impossible to do that. Black screen as I said, so I need to force a shutdown. I don't know if there's a way to record logs in a file before put system to sleep, so I will be able to check them after a forced reboot.

 

FYI, I've tried to use all ig-platform-id I could find in AppleIntelFramebufferAzul.kext with different DVMT-prealloc values in BIOS and proper Clover patches, including those "enable display after wake" patches you can find in RehabMan repo. I've played with framebuffer sizes, cursor bytes, delay, connector port types... No solution so far.

 

Curious things:

- If I boot in safe mode, wake from sleep using PWRB works (WTF).

- My display seems to have more than one EDID (I used RW-Everything in Windows). It works under OSX even if I change connector type in port 0 from LVDS to eDP or HDMI. I've tried to inject using Clover or DSDT patch, no-connect or no-edid.. These tests bring some differences in display behaviour (recognized as external or internal, with or without backlight control) but issue persists.

 

I'm attaching files for any of you that have the time and want to help. Files are:

- Original Clover extracted ACPI files.

- Clover folder.

- Multipatch (all patches used for this device copied/pasted in one single text file)

- IOReg

- Intel Video Bios extracted from Linux.

- EDID extracted with SwitchResX from OSX. 

 

Thanks in advance!

Companion2.zip

Link to comment
Share on other sites

Its not a bug of your dsdt, i have an Asus UX301LA, had same at beginnings...

 

you have 2 different bugs, 20-30secounds delay after sleep and the black display...

 

1. 20sec delay: exchange your sandisk M2 SSD, to something else, the sandisk SSD have a power management bug... (in windows its working, in OS X you have a delay)

any other SSD doesn't have that bug.

 

2. About the display bug, its actually a bios bug, check if your vendor have a bios update, had same here too

 

Cheers

  • Like 1
Link to comment
Share on other sites

Its not a bug of your dsdt, i have an Asus UX301LA, had same at beginnings...

 

you have 2 different bugs, 20-30secounds delay after sleep and the black display...

 

1. 20sec delay: exchange your sandisk M2 SSD, to something else, the sandisk SSD have a power management bug... (in windows its working, in OS X you have a delay)

any other SSD doesn't have that bug.

 

2. About the display bug, its actually a bios bug, check if your vendor have a bios update, had same here too

 

Cheers

Ramalama! Thanks for answering, mate! I've read a lot of threads and you were in a few of them. I was even looking into your original MacbooPro11,1 ACPI files in github trying to guess things. It's great having some feedback from you :)

 

1.- 20sec delay: my SATA is a Toshiba M2 SSD, not a SanDisk. I don't know which brand or SSD models are affected by this bug. Do you mean replacing SSD drive with another model/brand will solve delay? Any thread to start reading info about it?

 

2.- Wacom seems to have one of the worst customers support, there's only one BIOS update and it's from more than a year ago. So, no luck for me here. I guess, for what I read, we are not the only ones with this bug, Ramalama.

Link to comment
Share on other sites

ive fixed here both bugs,

 

asus provided a bios update:

http://www.asus.com/support/Download/3/574/0/1/41/

look at bios 209:

"Fix system hangs on black screen after resuming from S3."

 

And about the ssds, i dont know if toshiba have this bug... ive thinked only sandisk have that bug, so im sry... i cant say about toshiba :-(

 

I will check your ioreg tomorrow, maybe i will see something...

 

nothing is not fixeable, you have almost same hardware in your tablet as me in my laptop xD

and here for me everything works absolutely amazing...

(just have a safari flash freeze bug on some sites xD)

 

ive looked into your ioreg, there are some things you need to fix

 

1. D00C, rename it to SBUS and use a patch which inserts BUS0->DVL0

2. remove VoodoHDA completely, you need a proper applehda

3. rename XHC to XHC1 + you need a proper selfmade kextinject (we can make one tomorrow or so)

4. change inside fakesmc kext "smc-napa" to "smc-huronriver"

5. WTF! you need inside Clover (drivers64uefi) only this efi drivers:

   FSInject-64.efi HFSPlus-64.efi  OsxAptioFix2Drv-64.efi  OsxFatBinaryDrv-64.efi  SMCHelper-64.efi

remove every other efi driver, remove drivers32UEFI folder...

 

need to sleep now, but i will look into the rest tomorrow or so...

ps, disable CSM completely in bios, you need only uefi...

 

cheers :-)

  • Like 1
Link to comment
Share on other sites

ive fixed here both bugs,

 

asus provided a bios update:

http://www.asus.com/support/Download/3/574/0/1/41/

look at bios 209:

"Fix system hangs on black screen after resuming from S3."

 

And about the ssds, i dont know if toshiba have this bug... ive thinked only sandisk have that bug, so im sry... i cant say about toshiba :-(

 

I will check your ioreg tomorrow, maybe i will see something...

 

nothing is not fixeable, you have almost same hardware in your tablet as me in my laptop xD

and here for me everything works absolutely amazing...

(just have a safari flash freeze bug on some sites xD)

 

ive looked into your ioreg, there are some things you need to fix

 

1. D00C, rename it to SBUS and use a patch which inserts BUS0->DVL0

2. remove VoodoHDA completely, you need a proper applehda

3. rename XHC to XHC1 + you need a proper selfmade kextinject (we can make one tomorrow or so)

4. change inside fakesmc kext "smc-napa" to "smc-huronriver"

5. WTF! you need inside Clover (drivers64uefi) only this efi drivers:

   FSInject-64.efi HFSPlus-64.efi  OsxAptioFix2Drv-64.efi  OsxFatBinaryDrv-64.efi  SMCHelper-64.efi

remove every other efi driver, remove drivers32UEFI folder...

 

need to sleep now, but i will look into the rest tomorrow or so...

ps, disable CSM completely in bios, you need only uefi...

 

cheers :-)

Thank you so much for your response, Ramalama! Thanks to you I see some light at the end of the tunnel!

 

As I said, no more BIOS updates from Wacom so far. In Windows, there's no issue waking from sleep so I think they won't release any more.

Curious thing is I'm having no freeze issue in Safari in my Companion 2, but I'm having it in my real iMac 21,5" Mid 2010.

 

1.- I'll rename D00C and look for that patch.

2.- VoodooHDA is working for me right now but I know AppleHDA is the proper way. Mine is ALC286 but I'll need help to patch it, tried before but got lost in the node path part. I'm attaching my dumped ALC codec.

3.- I'm using a custom Injector to make my EH01 have zero ports and properly use my XHC, everything is working for what I can see. I guess I just need to rename XHC>XHC1 and change that in my custom injector too, right? I'm attaching my injector for you to check if needed.

4.- I don't know how to change things inside FakeSMC. Is it like editing some .plist file or something more is required?

5.- I didn't manually put all those drivers there, they appeared updating Clover to latest version. I'll remove it and report back.

 

About CSM, I just have enabled Legacy Video. I read this option makes boot glitches disappear and this is what is doing for me. If I totally disable CSM, some glitches during boot are back. I can live with boot glitches if we can solve this wake problem.

 

Thanks again for your time, Ramalama! I know this tablet is almost identical to your laptop so I hope with your help this wake problem will be solved :)

 

Cheers!

 

EDIT: 

 

1.- D00C/SMBUS related fix.

 

I've found a SBUS in my DSDT. It has same _ADR than D00C. Each of them are in a separate _SB.PCI0 (it's like this scope were split in two). I've applied "SMBUS Fix" from RehabMan repo and BUS0 is added under D00C instead of SBUS (I think because D00C is the first to be found). IOReg shows BUS0 and DVL0 under D00C, AppleSMBusPCI and AppleSMBusControllerICH loaded.

 

If I change D00C>SBUS I have three errors regarding SBUS: two "name already exist in scope" and a "object do not exist". So I've tried one thing: to remove D00C which is an empty device and move BUS0 to SBUS manually. Now, IOReg shows BUS0 and DVL0 under SBUS. Same AppleSMBusPCI and AppleSMBusControllerICH are loaded.

 

So it seems like point 1 of our list is solved if you give your ok :)

 

2.- AppleHDA instead of VoodooHDA.

 

Waiting for some help ^_^

 

3.- Renaming XHC to XHC1.

 

Done, name changed in DSDT and custom injector. USB works well, same than before for what I've checked so far.

 

4.- FakeSMC.

 

I've opened the plist file inside FakeSMC and change smc-napa to smc-huronriver as you said. System still booting, everything is working well. What is this change trying to accomplish? 

 

5.- Drivers63UEFI.

 

I've deleted everything except FSInject-64.efi, HFSPlus-64.efi, OsxAptioFix2Drv-64.efi, OsxFatBinaryDrv-64.efi and SMCHelper-64.efi as you suggested, but I'm keeping PartitonDxe-64 and EmuVariableUEFI-64. These two last drivers I think are needed because I'm dual booting and I've tested NVRAM hardware and it seemed not keep values after reboot.

 

PS: First post contains my ACPI files if you need to check them. I'm also attaching an updated IOReg.

 
 

codec_dump_ALC286.txt

XHCInjectorCC2.kext.zip

Berto’s Cintiq_SBUS_XHC1.ioreg.zip

Link to comment
Share on other sites

EmuVariableUEFI-64 corresponds with OsxAptioFix2Drv-64.efi

on your tablet OsxAptioFix2Drv-64.efi should work very well with nvram. (this one will you real nvram, not emulated like EmuVariableUEFI-64)

 

PartitonDxe-64 you don't need at all, dual boot should work without problems without it, im using dual boot too...

 

​im sry for not responding that much, im really working very much so I have not as much time as I normally have :-)

So this can take some time to fix that things with me :-)

 

But on my laptop even hibernate works.

 

​if I have time next days, I will make you a dsdt and clover config, but not right now, sry :-(

 

Cheers :-)

  • Like 1
Link to comment
Share on other sites

EmuVariableUEFI-64 corresponds with OsxAptioFix2Drv-64.efi

on your tablet OsxAptioFix2Drv-64.efi should work very well with nvram. (this one will you real nvram, not emulated like EmuVariableUEFI-64)

 

PartitonDxe-64 you don't need at all, dual boot should work without problems without it, im using dual boot too...

 

​im sry for not responding that much, im really working very much so I have not as much time as I normally have :-)

So this can take some time to fix that things with me :-)

 

But on my laptop even hibernate works.

 

​if I have time next days, I will make you a dsdt and clover config, but not right now, sry :-(

 

Cheers :-)

I'll try with OsxAptioFix2Drv-64 and without EmuVariableUEFI-64 and test NVRAM. I will also delete PartitionDxe-64 and report back.

 

Of course, there's no rush, Ramalama, and I'm more than glad to have you here trying to help, thank you SO much :D

 

I read hibernate is not totally recommended for hackintosh, am I right? In the other hand, I see many users reporting hibernate works, so I really don't know what's better. If you help me when you have some time, maybe we can make hibernate works in this machine.

I was trying to make my system to enter real sleep, I mean, keeping only power to RAM, not saving any image in my SSD. But if hibernate works, well, it is ok for me :yes:

What it concerns me about hibernate is when booting sleep image after wake. I mean, this tablet doesn't have keyboard and in my config.plist boot drive is directly my OSX installation. I will need some help here to understand how to change config.plist in order to properly boot sleep image.

 

As I said before, thanks a lot, Ramalama, sincerely, there's no rush. I can wait and we can go step by step instead of just you creating files for me if you have the time and you want, mate. Thanks and kind regards!!  :thumbsup_anim:

Link to comment
Share on other sites

Ok, I'm using OsxAptioFix2Drv-64 now without EmuVariableUEFI-64.

I had to search for info about how to remove RC Scripts I installed when I was using EmuVariableUEFI-64.

I've deleted the 80 and 70 scripts. Should I delete all of them, including folders? Haven't found too much info about this.

Captura%20de%20pantalla%202016-12-19%20a

Captura%20de%20pantalla%202016-12-19%20a

 

 

If I add a custom variable for testing NVRAM, it disappears after boot, so I guess native NVRAM is not working, am I right?

I've cleaned NVRAM with sudo nvram -c and after reboot variables are back. I've even removed nvram.plist and they are back.

But it's not keeping custom variable for testing. I'm a little bit lost here with all this NVRAM stuff  :wacko:

 

In any case, I'm running iMessageDebug to check if values are kept after reboot and they are. Somewhere I read this means NVRAM is working. I'm even more confuse  :(

Link to comment
Share on other sites

you can try OsxAptioFixDrv-64 without the "2", can be that you need a bios hack...

 

you can delete both scripts, one is for mount efi partition so you dont need to delete it, but there are tools for this like quickesp :-)

 

do this:

sudo rm -rf /Library/Application\ Support/Clover

sudo rm /Library/PreferencePanes/Clover.prefPane

 

and the scripts above you already mentioned :-)

 

can you boot into windows and dump your bios with AfuWinX64 you can download it direct from ami... you should have aptio4, you will see what i mean if you download the package :-)

 

And dump me your actual ioreg+acpitable dump + clover folder :-)

 

Cheers :-)

  • Like 1
Link to comment
Share on other sites

Happy Holidays, Ramalama! Thanks for keep on helping this fella :)

 

I'm using OsxAptioFixDrv-64 now, OsxAptioFix2Drv-64 gives me random "Error allocating 0x55df pages at 0x000000000eb120000 alloc type 2"

 

I run those command in Terminal. The second didn't work for me so I manually delete Clover.prefPane.

 

I've dumped my BIOS. Initially, I used aptio4 but it said I needed aptio5. It was difficult to know what .exe I should use, I hope to have been done it well.

 

I'm attaching my Clover folder, OEM ACPI files dumped inside origin folder.

 

Thanks, Ramalama!!

 

 

Berto’s Cintiq.ioreg.zip

CLOVER.zip

afuwin.rom.zip

Link to comment
Share on other sites

 Share

×
×
  • Create New...