S3 resume hang when PCI Express wakeups don't clear the PM1 PCI_WAKE_DISABLE bit

Bug #613381 reported by Colin Ian King
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

It has been observed on a AMD K325 netbook that resumes hang in the BIOS if PCI Express ethernet is enabled on the 2nd or 3rd resume. Disabling the ethernet has shown that the resume works flawlessly. This has been tracked down to the fact that a PCI Express Wake event has occurred and the kernel is not clearing the PM1 PCIEXP_WAKE_STS bit when coming out of resume.

Section 4.7.3.1.1 of version 4.0 of the acpi spec (http://www.acpi.info/spec40.htm) in table 4-11 concerning PCIEXP_WAKE_STS states:

"Software writes a 1 to clear this bit. If the WAKE# pin is still active during
the write, one or more PCI Express ports is in the beacon state or the PME
message received indication has not been cleared in the root port, then the bit
will remain active (i.e. all inputs to this bit are level-sensitive)."

"Note: This bit does not itself cause a wake event or prevent entry to a
sleeping state. Thus if the bit is 1 and the system is put into a sleeping state,
the system will not automatically wake."

A suitable fix is to define ACPI_BITMASK_ALL_FIXED_STATUS to:

#define ACPI_BITMASK_ALL_FIXED_STATUS (\
        ACPI_BITMASK_TIMER_STATUS | \
        ACPI_BITMASK_BUS_MASTER_STATUS | \
        ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
        ACPI_BITMASK_POWER_BUTTON_STATUS | \
        ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
        ACPI_BITMASK_RT_CLOCK_STATUS | \
        ACPI_BITMASK_PCIEXP_WAKE_DISABLE | \
        ACPI_BITMASK_WAKE_STATUS)

..and this ensures PCIEXP_WAKE_STS is cleared by acpi_hw_clear_acpi_status() when coming out of S3.

Changed in linux (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Colin King (colin-king)
Revision history for this message
Len Brown (len-brown) wrote :

commit 573b638158029898caf9470c8214b7ddd29751e3
Author: Colin Ian King <email address hidden>
Date: Mon Aug 2 15:14:43 2010 +0000

    ACPI: enable repeated PCIEXP wakeup by clearing PCIEXP_WAKE_STS on resume

shipped upstream in Linux-2.6.36-rc6-git2

Revision history for this message
Colin Ian King (colin-king) wrote :

SRU Justification:

Impact: It has been observed on a AMD K325 netbook that resumes hang in the
BIOS if PCI Express ethernet is enabled on the 2nd or 3rd resume. Disabling
the ethernet has shown that the resume works flawlessly. This has been tracked
down to the fact that a PCI Express Wake event has occurred and the kernel
is not clearing the PM1 PCIEXP_WAKE_STS bit when coming out of resume.

Fix: Clearing PCIEXP_WAKE_STS on resume fixes the resume hang.

Testcase: Without the patch, resume hangs in the BIOS after 2nd or 3rd resume.
With the patch, resume works flawlessly everytime.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted linux into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in linux (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted linux into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in linux (Ubuntu Maverick):
status: New → Fix Committed
Revision history for this message
cliftonlai (cliftonlai) wrote :

Testing on AMD K325 based unit and the BIOS is X24, after updating the kernel to 2.6.35-23 from proposed repo, it will resume eventually, however it need 5 minutes to resume, i don't think any user will accept this phenomenon.

Revision history for this message
cliftonlai (cliftonlai) wrote :

I try several times, suspend then resume, at least 4 times above, after updating kernel to 2.6.35-23

Revision history for this message
Colin Ian King (colin-king) wrote :

Will test when I get back to the UK with the original H/W and BIOS to see if this is a BIOS regression rather than an issue with the patch.

Revision history for this message
Steve Conklin (sconklin) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed' to 'verification-done'.

If verification is not done by Thursday, November 11, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

Revision history for this message
Colin Ian King (colin-king) wrote :

Tested with preposed Maverick kernel - works fine for me. Had to use "noapic" kernel boot flag to work around another known BIOS issue on this machine, which is why Clifton saw the 5 minute resume hang.

Revision history for this message
Colin Ian King (colin-king) wrote :

Tested with proposed Lucid pae generic kernel, works fine too. Again used noapic kernel boot flag to work around a known BIOS issue on the machine.

The patch fixes the hang on resume. Did 10 S3 suspend/resume cycles with PCI express ethernet configured. Verified OK.

tags: added: verification-done
removed: verification-needed
Changed in linux (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (18.8 KiB)

This bug was fixed in the package linux - 2.6.32-26.47

---------------
linux (2.6.32-26.47) lucid-proposed; urgency=low

  [ Steve Conklin ]

  * Revert "SAUCE: ALSA: HDA: Enable internal mic on Dell E6410 and Dell
    E6510"
  * Revert "[Config] Added be2net, be2scsi to udebs"

  [ Upstream Kernel Changes ]

  * Revert "(ore-stable) ALSA: hda - Apply ALC269 VAIO fix-up to all Sony
    laptops with ALC269"
  * Revert "(pre-stable) ALSA: HDA: Correctly apply position_fix quirks for
    ATI and VIA controllers"
  * Revert "ALSA: hda: Use LPIB for another mainboard"
  * Revert "ALSA: hda: Use LPIB for ASUS M2V"
  * Revert "ALSA: hda: Use LPIB for an ASUS device"
  * Buglink Fixup for reverted unverified fixes

linux (2.6.32-26.46) lucid-proposed; urgency=low

  [ Brad Figg ]

  * SAUCE: ALSA: HDA: Enable internal mic on Dell E6410 and Dell E6510
    - See: #605047, #628961

  [ Tim Gardner ]

  * [Config] Added be2net, be2scsi to udebs
    - See: #628776

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) drm/i915: add PANEL_UNLOCK_REGS definition"
    - LP: #645444
  * Revert "(pre-stable) drm/i915: make sure we shut off the panel in eDP
    configs"
    - LP: #645444
  * Revert "(pre-stable) drm/i915: make sure eDP panel is turned on"
    - LP: #645444
  * Revert "(pre-stable) drm/radeon/kms: initialize set_surface_reg reg for
    rs600 asic"
    - LP: #645371
  * Revert "drm/nouveau: Fix fbcon corruption with font width not divisible
    by 8"
    - LP: #663176
  * mmc: fix all hangs related to mmc/sd card insert/removal during
    suspend/resume
    - LP: #477106
  * mmc: build fix: mmc_pm_notify is only available with CONFIG_PM=y
    - LP: #477106
  * hwmon: (k8temp) Differentiate between AM2 and ASB1
    - LP: #644694
  * xen: handle events as edge-triggered
    - LP: #644694
  * xen: use percpu interrupts for IPIs and VIRQs
    - LP: #644694
  * ALSA: hda - Rename iMic to Int Mic on Lenovo NB0763
    - LP: #605101, #644694
  * sata_mv: fix broken DSM/TRIM support (v2)
    - LP: #644694
  * x86, tsc, sched: Recompute cyc2ns_offset's during resume from sleep
    states
    - LP: #644694
  * PCI: MSI: Remove unsafe and unnecessary hardware access
    - LP: #644694
  * PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
    - LP: #644694
  * sched: kill migration thread in CPU_POST_DEAD instead of CPU_DEAD
    - LP: #644694
  * sched: revert stable c6fc81a sched: Fix a race between ttwu() and
    migrate_task()
    - LP: #644694
  * staging: hv: Fix missing functions for net_device_ops
    - LP: #644694
  * staging: hv: Fixed bounce kmap problem by using correct index
    - LP: #644694
  * staging: hv: Fixed the value of the 64bit-hole inside ring buffer
    - LP: #644694
  * staging: hv: Increased storvsc ringbuffer and max_io_requests
    - LP: #644694
  * staging: hv: Fixed lockup problem with bounce_buffer scatter list
    - LP: #644694
  * fuse: flush background queue on connection close
    - LP: #644694
  * ath9k_hw: fix parsing of HT40 5 GHz CTLs
    - LP: #644694
  * ocfs2: Fix incorrect checksum validation error
    - LP: #644694
  * USB: ehci-ppc-of: problems in unwind
    - LP: #644694
  * USB: Fix kernel oo...

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.2 KiB)

This bug was fixed in the package linux - 2.6.35-23.40

---------------
linux (2.6.35-23.40) maverick-proposed; urgency=low

  [ Brad Figg ]

  * No change rebuild.

linux (2.6.35-23.39) maverick-proposed; urgency=low

  [ Brad Figg ]
    - LP: #676214

  [ Ricardo Salveti de Araujo ]

  * SAUCE: ARM: OMAP3: beagle: use GPIO2 on the xM A3 to turn DVI on
    - LP: #663642

linux (2.6.35-23.38) maverick-proposed; urgency=low

  [ Brad Figg ]

  * Revert "SAUCE: ARM: OMAP3: beagle: use GPIO2 on the xM A3 to turn DVI
    on"

  [ Upstream Kernel Changes ]

  * Revert "(upstream) ALSA: hda - Apply ALC269 VAIO fix-up to all Sony
    laptops with ALC269"
  * Revert "ALSA: HDA: Correctly apply position_fix quirks for ATI and VIA
    controllers"
  * Buglink Fixup for reverted unverified fixes

linux (2.6.35-23.37) maverick-proposed; urgency=low

  [ Brad Figg ]

  * ARM: Temporarily disable module check for armel

linux (2.6.35-23.36) maverick-proposed; urgency=low

  [ Andy Whitcroft ]

  * reduce disk usage during buildd builds
    - LP: #645653

  [ Brad Figg ]

  * ARM: Temporarily disable module check for armel

  [ Enric Balletbo i Serra ]

  * ARM: igepv2: Adding support for VBUS and overcurrent
    - LP: #651589
  * ARM: igepv2: Fix and improve LED handling
    - LP: #654582
  * ARM: igepv2: Introduce function to dectect HW version
    - LP: #654586
  * ARM: igepv2: Fix handling of GPIOs for WLAN-BT combo
    - LP: #654590
  * ARM: igepv2: Add i2c eeprom driver to read EDID
    - LP: #654594
  * ARM: igepv2: Remove VMMC2 regulator
    - LP: #654595

  [ Leann Ogasawara ]

  * ARM: Temporarily disable module check for armel

  [ Mathieu Poirier ]

  * SAUCE: ARM: Add DSS2 support for Overo board
    - LP: #660811

  [ Maurus Cuelenaere ]

  * SAUCE: ARM: OMAP3: Add S-Video output to IGEPv2 board
    - LP: #607250

  [ Ricardo Salveti de Araujo ]

  * [Config] Remove CONFIG_FIXED_PHY and move CONFIG_SMSC911X from m to y
    for omap
    - LP: #645689
  * SAUCE: ARM: OMAP3: Adding vdd_sdi regulator supply to IGEPv2 board
    - LP: #607250
  * SAUCE: ARM: OMAP3: beagle: use GPIO2 on the xM A3 to turn DVI on
    - See: #663642

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) ALSA: HDA: Use model=auto for LG R510"
  * Revert "(pre-stable) ALSA: hda - Rename iMic to Int Mic on Lenovo
    NB0763"
  * Revert "Input: appletouch - fix integer overflow issue"
  * Revert "ALSA: hda - Handle pin NID 0x1a on ALC259/269"
  * Revert "ALSA: hda - Handle missing NID 0x1b on ALC259 codec"
  * Revert "(pre-stable) ALSA: hda - Add a new hp-laptop model for Conexant
    5066, tested on HP G60"
  * Revert "mmc: build fix: mmc_pm_notify is only available with
    CONFIG_PM=y"
  * Revert "mmc: fix all hangs related to mmc/sd card insert/removal during
    suspend/resume"
  * Revert "(pre-stable) bounce: call flush_dcache_page() after
    bounce_copy_vec()"
  * Revert "Input: i8042 - reset keyboard controller wehen resuming from
    S2R"
  * Revert "ALSA: HDA: Enable internal speaker on Dell M101z"
  * Revert "(pre-stable) drm/i915: don't enable self-refresh on Ironlake"
  * Revert "drm/i915: Allow LVDS on pipe A on gen4+"
  * (pre-stable) ACPI: enable repeated...

Changed in linux (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted linux into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Brad Figg (brad-figg) wrote :

Verification was done on a previous kernel. This has come up again because the patch first came in as (pre-stable) and then came in from stable. So, we reverted the (pre-stable) and applied the "stable" patch. They were identical.

tags: added: verification-done
removed: verification-needed
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
assignee: Colin King (colin-king) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.