Skip to contentSkip to conversation

S5 Powerdown problem on TX150 servers

DISCUSSION Andrew de Quincey 2 participants 8 messages Sep 16, 2003 6 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Hi, I have an issue with TX150 servers. Basically, they don't power down in ACPI. I press the power button, and I can see the system shutting down, but, although it clears the screen and kinda makes a clunking noise as if the HDDs are being stopped, the fans stay running, and the power light stays on.

I want the system to enter S5 when I press the power button.

I added some debug to the hwsleep.c/acpi_enter_sleep_state() function. The last thing it executes is:

status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);

<-- DOES NOT GET HERE on button press.

        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }

Which kinda makes sense as this is the write of the PM1B value that completes powerdown.

However, if I press the power button once again, I can see that it RETURNS from this call, and displays the tracing I put after it. Its almost as if the system is going into S1 and not S5.

I've checked in the DSDT, and the values for PM1a_CNT.SLP_TYP and PM1b_CNT.SLP_TYP are correctly for entering an S5 state.

Anyone have any suggestions?

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · Andrew de Quincey

Hi, I have an issue with TX150 servers. Basically, they don't power down in ACPI. I press the power button, and I can see the system shutting down, but, although it clears the screen and kinda makes a clunking noise as if the HDDs are being stopped, the fans stay running, and the power light stays on.

Whoops, this is kernel 2.4.23-pre3 BTW.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#3 lore raw
In reply to a message not in the archive
Quoted 13 lines · Andrew de Quincey

Hi, I have an issue with TX150 servers. Basically, they don't power down in ACPI. I press the power button, and I can see the system shutting down, but, although it clears the screen and kinda makes a clunking noise as if the HDDs are being stopped, the fans stay running, and the power light stays on.

I want the system to enter S5 when I press the power button.

I added some debug to the hwsleep.c/acpi_enter_sleep_state() function. The last thing it executes is:

status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);

Quoted 8 lines

<-- DOES NOT GET HERE on button press.

        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }

Which kinda makes sense as this is the write of the PM1B value that completes powerdown.

No. The real stuff that will complete the powerdown is when you set SLP_EN. Try to remove the write to the PM1b. Anyway, we already clear ARB_DIS early.

Signature · 10 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#5 lore raw
In reply to a message not in the archive
Quoted 21 lines · Ducrot Bruno
Quoted 20 lines · Andrew de Quincey

Hi, I have an issue with TX150 servers. Basically, they don't power down in ACPI. I press the power button, and I can see the system shutting down, but, although it clears the screen and kinda makes a clunking noise as if the HDDs are being stopped, the fans stay running, and the power light stays on.

I want the system to enter S5 when I press the power button.

I added some debug to the hwsleep.c/acpi_enter_sleep_state() function. The last thing it executes is:

status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);

<-- DOES NOT GET HERE on button press.

        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }
Quoted 6 lines
Quoted 2 lines

Which kinda makes sense as this is the write of the PM1B value that completes powerdown.

No. The real stuff that will complete the powerdown is when you set SLP_EN. Try to remove the write to the PM1b. Anyway, we already clear ARB_DIS early.

Ah, I realise I did not include enough context, sorry.

This _is_ in the code which sets SLP_EN:

        /* Insert SLP_ENABLE bit */

        PM1Acontrol |= sleep_enable_reg_info->access_bit_mask;
        PM1Bcontrol |= sleep_enable_reg_info->access_bit_mask;

        /* Write #2: SLP_TYP + SLP_EN */

        ACPI_FLUSH_CPU_CACHE ();

        status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, 
ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);
        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }

        status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, 

ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);

<-- this is the point I highlighted before

        if (ACPI_FAILURE (status)) {
                ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "X6failed\n"));
                return_ACPI_STATUS (status);
        }

In the light of this, is there anything you would like me to try?

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#7 lore raw
In reply to a message not in the archive
Quoted 53 lines · Andrew de Quincey
Quoted 21 lines · Ducrot Bruno
Quoted 20 lines · Andrew de Quincey

Hi, I have an issue with TX150 servers. Basically, they don't power down in ACPI. I press the power button, and I can see the system shutting down, but, although it clears the screen and kinda makes a clunking noise as if the HDDs are being stopped, the fans stay running, and the power light stays on.

I want the system to enter S5 when I press the power button.

I added some debug to the hwsleep.c/acpi_enter_sleep_state() function. The last thing it executes is:

status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);

<-- DOES NOT GET HERE on button press.

        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }
Quoted 6 lines
Quoted 2 lines

Which kinda makes sense as this is the write of the PM1B value that completes powerdown.

No. The real stuff that will complete the powerdown is when you set SLP_EN. Try to remove the write to the PM1b. Anyway, we already clear ARB_DIS early.

Ah, I realise I did not include enough context, sorry.

This _is_ in the code which sets SLP_EN:

        /* Insert SLP_ENABLE bit */

        PM1Acontrol |= sleep_enable_reg_info->access_bit_mask;
        PM1Bcontrol |= sleep_enable_reg_info->access_bit_mask;

        /* Write #2: SLP_TYP + SLP_EN */

        ACPI_FLUSH_CPU_CACHE ();

        status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, 
ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);
        if (ACPI_FAILURE (status)) {
                return_ACPI_STATUS (status);
        }

        status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, 

ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);

<-- this is the point I highlighted before

Quoted 9 lines
        if (ACPI_FAILURE (status)) {
                ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "X6failed\n"));
                return_ACPI_STATUS (status);
        }

In the light of this, is there anything you would like me to try?

Ok. But trouble: you have at first write the desired sleep type, then set SLP_EN. Not the two at the same time.

Signature · 10 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#9 lore raw
In reply to a message not in the archive
Quoted 3 lines

Ok. But trouble: you have at first write the desired sleep type, then set SLP_EN. Not the two at the same time.

Yup, its doing that as well. Heres a quick summary of what it does:

Clears any wake status
Disable BM arbitration

Get current value of PM1A control (and store two copies in variables PM1AControl, PM1BControl)

Clear SLP_EN and SLP_TYP fields in the above variables Insert the SLP_TYP bits in each variable.

Store PM1AControl into ACPI PM1A
Store PM1BControl into ACPI PM1B

Insert the SLP_ENABLE bit in PM1AControl, PM1BControl Flush the CPU cache
Store PM1AControl into ACPI PM1A
Store PM1BControl into ACPI PM1B

At this point the machine should be in S5, but appears to be in S1.

Prior to all this, it has called the _PTS and _GTS (if present) methods as it should.

Should I try masking off the SLP_TYP bits when the second write to PM1A/PM1B occurs?

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#11 lore raw
In reply to a message not in the archive
Quoted 23 lines · Andrew de Quincey
Quoted 3 lines

Ok. But trouble: you have at first write the desired sleep type, then set SLP_EN. Not the two at the same time.

Yup, its doing that as well. Heres a quick summary of what it does:

Clears any wake status
Disable BM arbitration

Get current value of PM1A control (and store two copies in variables PM1AControl, PM1BControl)

Clear SLP_EN and SLP_TYP fields in the above variables Insert the SLP_TYP bits in each variable.

Store PM1AControl into ACPI PM1A
Store PM1BControl into ACPI PM1B

Insert the SLP_ENABLE bit in PM1AControl, PM1BControl Flush the CPU cache
Store PM1AControl into ACPI PM1A
Store PM1BControl into ACPI PM1B

Quoted 8 lines

At this point the machine should be in S5, but appears to be in S1.

Prior to all this, it has called the _PTS and _GTS (if present) methods as it should.

Should I try masking off the SLP_TYP bits when the second write to PM1A/PM1B occurs?

No. But, what contain the _S5 in the asl? What kind of southbridge you have?

Signature · 10 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#13 lore raw
In reply to a message not in the archive
Quoted 3 lines

No. But, what contain the _S5 in the asl? What kind of southbridge you have?

Aha! good idea! Check the chipset docs. Should have thought of that.

Name(\_S5_, Package(0x4) {
    0x7,
    0x0,
    0x1,
    0x1,
})

I've checked, 7 and 0 are correctly being supplied to the code.

I yanked the heatsink off the chip, removing a bit of my finger in the process unfortunately. Its a Serverworks chipset. The chip says SWD-NB7485-P01 on it. I can't find any docs about this chip.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf