2

Author Topic: Sleep and shutdown without additional kexts?  (Read 19352 times)

0 Members and 1 Guest are viewing this topic.

00diabolic

  • Observer
  • Posts: 25
Re: Sleep and shutdown without additional kexts?
« Reply #15 on: June 28, 2010, 08:26:45 PM »
Ok I knew this was not going to be easy.. I am looking through my DSDT and all I can say is #$(%. My only problem is that my system will not reboot. I get shutdown instead. So hopefully this code adjustment will fix that.

I of course dont have anything that screams I'm in the right place. Memory address does not match or anything..

However I found a piece of the code that looks like it might be it... It matches on structure only.

Is this it? If so what on earth do I change? Can you guys give me some pointers on this?

Code: [Select]
    OperationRegion (PRT0, SystemIO, 0x80, 0x04)
    Field (PRT0, DWordAcc, Lock, Preserve)
    {
        P80H,   32
    }

    Method (P8XH, 2, Serialized)
    {
        If (LEqual (Arg0, Zero))
        {
            Store (Or (And (P80D, 0xFFFFFF00), Arg1), P80D)
        }

        If (LEqual (Arg0, One))
        {
            Store (Or (And (P80D, 0xFFFF00FF), ShiftLeft (Arg1, 0x08)
                ), P80D)
        }

        If (LEqual (Arg0, 0x02))
        {
            Store (Or (And (P80D, 0xFF00FFFF), ShiftLeft (Arg1, 0x10)
                ), P80D)
        }

        If (LEqual (Arg0, 0x03))
        {
            Store (Or (And (P80D, 0x00FFFFFF), ShiftLeft (Arg1, 0x18)
                ), P80D)
        }

On second thought this could be it also. It looks like I would add the method code in here. But where exactly?

Code: [Select]
Scope (\)
            {
                OperationRegion (IO_T, SystemIO, 0x0800, 0x10)
                Field (IO_T, ByteAcc, NoLock, Preserve)
                {
                            Offset (0x08),
                    TRP0,   8
                }

                OperationRegion (PMIO, SystemIO, 0x1000, 0x80)
                Field (PMIO, ByteAcc, NoLock, Preserve)
                {
                            Offset (0x2A),
                            Offset (0x2B),
                        ,   2,
                    ACPW,   1,
                            Offset (0x42),
                        ,   1,
                    GPEC,   1,
                            Offset (0x64),
                        ,   9,
                    SCIS,   1,
                            Offset (0x66)
                }

I found another topic where mm67 is talking about this but I cant figure out how to calculate where this code needs to go either way.. Here is the quote..
Quote
It's only this :
Code: [Select]

    OperationRegion (PMRS, SystemIO, 0x0430, 0x13)
    Field (PMRS, ByteAcc, NoLock, Preserve)
    {
            ,   4,
        SLPE,   1,
and this:
Code: [Select]

        If (LEqual (Arg0, 0x05))
        {
            Store (Zero, SLPE)
            Sleep(0x10)
        }
that make the shutdown work, rest of the code is Gigabyte specific. This address 0x0430 is also motherboard specific, it is PMBASE+30h. Address of PMBASE is defined in FACP, on most boards it can also be checked from processor definitions. For example I have this in my dsdt:

Processor (CPU0, 0x00, 0x00000410, 0x06)

Here 0x00000410 is referring to PMBASE+10h so I use 0x430 on my Gigabyte board. On my MSI board's dsdt I have this:
Processor (P001, 0x01, 0x00000810, 0x06) {}

So in MSI shutdown code I use this:
OperationRegion (PMRS, SystemIO, 0x0830, 0x13)

mm67

  • Entrant
  • Posts: 5
Re: Sleep and shutdown without additional kexts?
« Reply #16 on: June 29, 2010, 02:21:44 AM »
This code has nothing to do with restart, this only fixes shutdown. Restart fix is in bootloader.

00diabolic

  • Observer
  • Posts: 25
Re: Sleep and shutdown without additional kexts?
« Reply #17 on: June 29, 2010, 05:24:29 AM »
This code has nothing to do with restart, this only fixes shutdown. Restart fix is in bootloader.

Is there no possible fix for restart in the DSDT? I already have restartfix=yes in my bootloader and actually fixes nothing, restart still fails. My shutdown is fine with vanilla files/DSDT. It would make sense to me that if my system can not restart and I get a shutdown an adjustment to the ACPI code for when restart is called could be possible.

Here is what I get with and without restartfix applied in AnVAL valvs bootloader that I use.

Without shutdown works.
With shutdown works
Without restart = black screen
With restart = shutdown

I thought your fix would help if it was either problem, restart or shutdown. Maybe I need a new fix specific to me. If thats the case Ill never figure this out.

Hope you can help...

Thanks

UPDATE: Valv has pointed me to this fix: http://www.insanelymac.com/forum/index.php?s=&showtopic=192518&view=findpost&p=1363388

valv also has an edit to the FADT table applied to his bootloader. I think I figure out why that fix or maybe why Duvel300 fix may not work for me. I have ACPI 2.0 and the FADT fix he refers to is for ACPI 1.0.

I've been reading so much and now I'm not sure what I need anymore. A DSDT fix, a FADT fix or some combo of both. It seems so silly all I have is restart fail me. It has to be FADT but how to extract mine and edit it. No one explains this anywhere. Duvel300 said he would make a guide but I cant find ref to it anywhere prob never happened because bootloaders started addressing this issue.

Can someone HELP ME? PLEASE!!!
« Last Edit: June 29, 2010, 07:35:17 AM by 00diabolic »

mm67

  • Entrant
  • Posts: 5
Re: Sleep and shutdown without additional kexts?
« Reply #18 on: June 29, 2010, 09:38:53 AM »
Have you tried OSXRestart.kext ?

00diabolic

  • Observer
  • Posts: 25
Re: Sleep and shutdown without additional kexts?
« Reply #19 on: June 29, 2010, 11:15:58 AM »
Have you tried OSXRestart.kext ?

Well evoreboot.kext worked fine for me as I assume OSXrestart.kext would also. I am trying to find a DSDT fix for this as an alternative. Since there seems to be DSDT fixes for shutdown/restart why cant this be adapted for me.

Your fix appears to only be for shutdown.

Duval300's FADT fix seems to be for restart but isnt that the same fix applied to AnVAL and AseralBLN's bootloader.

I seem to have an DSDT/ACPI table that almost got it all right but there are a few things that still need to be fixed. Restart and speedstep and thats it.

Can you help me fix my restart through the DSDT/FADT mm67?

UPDATE: I was able to extract my FADT table and it I booted with it but no change to restart. If there is an edit needed to this table I am not sure what I need to change. Any Idea? anyone?
« Last Edit: June 29, 2010, 02:14:40 PM by 00diabolic »

valv

  • VoodooLabs
  • Posts: 72
    • The AnVAL Forum (fr)
Re: Sleep and shutdown without additional kexts?
« Reply #20 on: June 29, 2010, 11:38:02 AM »
Do u have any usb related kexts? If not, how do usb show on "system profiler" (expansion slot, or built-in)?

00diabolic

  • Observer
  • Posts: 25
Re: Sleep and shutdown without additional kexts?
« Reply #21 on: June 29, 2010, 02:05:55 PM »
Do u have any usb related kexts? If not, how do usb show on "system profiler" (expansion slot, or built-in)?

My USB is are seen as built in. I have been looking through console looking for errors that might lead me to something. I do get some kind of failed something when I go to restart but I can not find the reference to it in the shutdown log. Is it somewhere else?

I do not have any USB kext installed either except my zydas Wifi in E/E but I have unplugged all USB items and restarted and it still hangs. Is just having the kext on the system enough? Plus before I had the zydas driver loaded on the system I believe I had the same restart issue. It may be generally USB related but I doubt its zydas.

mm67

  • Entrant
  • Posts: 5
Re: Sleep and shutdown without additional kexts?
« Reply #22 on: June 29, 2010, 02:19:44 PM »
Duvel's FADT fix is exactly what newer bootloaders do, there isn't any dsdt fixes for restart.

00diabolic

  • Observer
  • Posts: 25
Re: Sleep and shutdown without additional kexts?
« Reply #23 on: June 29, 2010, 03:43:35 PM »
Duvel's FADT fix is exactly what newer bootloaders do, there isn't any dsdt fixes for restart.

I was afraid you were going to say that. So I'm stuck with the kext for now. Ok Thanks.. Ill worry about fixing speedstep then however I dont think Ill get working sleep without addressing this. Arnt those kinda related? It seems if you cant get one of the 3 you cant get the other 2 either. At least thats what seems to be true lol.

mm67

  • Entrant
  • Posts: 5
Re: Sleep and shutdown without additional kexts?
« Reply #24 on: June 29, 2010, 03:46:36 PM »
At least my system needed working power management before sleep worked properly so that might be a good idea.