Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: Exclude Intel 760p on Dell XPS 13 7390 from simple suspend
@ 2026-11-30  4:45 Moncef Mechri via B4 Relay
  2026-11-30  8:51 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Moncef Mechri via B4 Relay @ 2026-11-30  4:45 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
  Cc: linux-nvme, linux-kernel, Moncef Mechri

From: Moncef Mechri <moncef.mechri@gmail.com>

The Dell XPS 13 7390 (Comet Lake) firmware sets StorageD3Enable for
the NVMe drive, so the driver applies NVME_QUIRK_SIMPLE_SUSPEND and
puts the drive into D3hot during s2idle. With an Intel 760p/Pro 7600p
(8086:f1a6) in D3hot, the PCH never enters S0ix: the package is in C10
for nearly all of the suspend, but the SLP_S0 residency counter does
not move. With intel_pmc_core.warn_on_s0ix_failures=1, a resume from
such a suspend logs, for example:

  intel_pmc_core INT33A1:00: CPU did not enter SLP_S0!!! (S0ix cnt=0)

and the SLP_S0 debug status shows, among others, PCIE_LOW_POWER,
USB2_SUS_GATED and MPHY_CORE_GATED as not met. Over several overnight
suspends, the battery charge dropped by 1.5-1.6 percentage points per
hour, roughly 0.8 W based on the battery's design capacity.

The platform does reach S0ix in runtime idle with the display off,
with the drive in D0. Keeping the drive in D0 during s2idle, so that
the driver sets an NVMe power state instead, restores S0ix:

  - nvme.noacpi=1: 556.8 s of S0ix in a 596.7 s suspend
  - this patch, all devices enabled in the BIOS: 556.5 s of S0ix in a
    596.5 s suspend

In both cases about 40 s of the suspend is spent outside S0ix. Over a
20,995 s (5.8-hour) suspend with this patch, the battery charge dropped
by 153 mAh, about 0.38 percentage points of the design capacity per
hour, or roughly 0.2 W.

Add this drive and laptop to the combinations that ignore
StorageD3Enable, as is already done for some Kingston and Samsung
drives. The XPS 13 7390 also shipped with other SSDs, which were not
tested, so the quirk is limited to this drive.

Tested on a Dell XPS 13 7390 (i7-10710U, BIOS 1.29.0) with an Intel
SSDPEMKF512G8 (firmware 7002), on 7.3.6 with this change applied.

The analysis that led to this change, the patch and this changelog were
produced with the help of an AI coding assistant (Claude, by Anthropic),
working from intel_pmc_core debug output, suspend traces and battery
measurements collected on the affected laptop. OpenAI Codex reviewed
the analysis and the patch.

Cc: stable@vger.kernel.org
Signed-off-by: Moncef Mechri <moncef.mechri@gmail.com>
---
 drivers/nvme/host/pci.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 076603df0..1bb88898b 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3874,6 +3874,16 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 		    dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1") ||
 		    dmi_match(DMI_BOARD_NAME, "PH6PG01_PH6PG71"))
 			return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
+	} else if (pdev->vendor == 0x8086 && pdev->device == 0xf1a6) {
+		/*
+		 * Exclude Intel 760p/Pro 7600p from NVME_QUIRK_SIMPLE_SUSPEND
+		 * on the Dell XPS 13 7390. With the drive in D3hot the PCH
+		 * never enters S0ix in s2idle sleep, which more than doubles
+		 * the battery drain while suspended.
+		 */
+		if (dmi_match(DMI_SYS_VENDOR, "Dell Inc.") &&
+		    dmi_match(DMI_PRODUCT_NAME, "XPS 13 7390"))
+			return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
 	}
 
 	/*

---
base-commit: 4f069ab1ec243e6b60dc438772905855c60774e8
change-id: 20261129-nvme-xps13-7390-quirk-50f9e84fbcf1

Best regards,
-- 
Moncef Mechri <moncef.mechri@gmail.com>




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme-pci: Exclude Intel 760p on Dell XPS 13 7390 from simple suspend
  2026-11-30  4:45 [PATCH] nvme-pci: Exclude Intel 760p on Dell XPS 13 7390 from simple suspend Moncef Mechri via B4 Relay
@ 2026-11-30  8:51 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2026-11-30  8:51 UTC (permalink / raw)
  To: moncef.mechri
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	linux-nvme, linux-kernel, Mario Limonciello, linux-pci

It feels like we should just ignore the StorageD3Enable for this model
entirely.  It obviously is safe as we do that for various SSDs.

On Mon, Nov 30, 2026 at 01:45:50AM -0300, Moncef Mechri via B4 Relay wrote:
> From: Moncef Mechri <moncef.mechri@gmail.com>
> 
> The Dell XPS 13 7390 (Comet Lake) firmware sets StorageD3Enable for
> the NVMe drive, so the driver applies NVME_QUIRK_SIMPLE_SUSPEND and
> puts the drive into D3hot during s2idle. With an Intel 760p/Pro 7600p
> (8086:f1a6) in D3hot, the PCH never enters S0ix: the package is in C10
> for nearly all of the suspend, but the SLP_S0 residency counter does
> not move. With intel_pmc_core.warn_on_s0ix_failures=1, a resume from
> such a suspend logs, for example:
> 
>   intel_pmc_core INT33A1:00: CPU did not enter SLP_S0!!! (S0ix cnt=0)
> 
> and the SLP_S0 debug status shows, among others, PCIE_LOW_POWER,
> USB2_SUS_GATED and MPHY_CORE_GATED as not met. Over several overnight
> suspends, the battery charge dropped by 1.5-1.6 percentage points per
> hour, roughly 0.8 W based on the battery's design capacity.
> 
> The platform does reach S0ix in runtime idle with the display off,
> with the drive in D0. Keeping the drive in D0 during s2idle, so that
> the driver sets an NVMe power state instead, restores S0ix:
> 
>   - nvme.noacpi=1: 556.8 s of S0ix in a 596.7 s suspend
>   - this patch, all devices enabled in the BIOS: 556.5 s of S0ix in a
>     596.5 s suspend
> 
> In both cases about 40 s of the suspend is spent outside S0ix. Over a
> 20,995 s (5.8-hour) suspend with this patch, the battery charge dropped
> by 153 mAh, about 0.38 percentage points of the design capacity per
> hour, or roughly 0.2 W.
> 
> Add this drive and laptop to the combinations that ignore
> StorageD3Enable, as is already done for some Kingston and Samsung
> drives. The XPS 13 7390 also shipped with other SSDs, which were not
> tested, so the quirk is limited to this drive.
> 
> Tested on a Dell XPS 13 7390 (i7-10710U, BIOS 1.29.0) with an Intel
> SSDPEMKF512G8 (firmware 7002), on 7.3.6 with this change applied.
> 
> The analysis that led to this change, the patch and this changelog were
> produced with the help of an AI coding assistant (Claude, by Anthropic),
> working from intel_pmc_core debug output, suspend traces and battery
> measurements collected on the affected laptop. OpenAI Codex reviewed
> the analysis and the patch.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Moncef Mechri <moncef.mechri@gmail.com>
> ---
>  drivers/nvme/host/pci.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 076603df0..1bb88898b 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -3874,6 +3874,16 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
>  		    dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1") ||
>  		    dmi_match(DMI_BOARD_NAME, "PH6PG01_PH6PG71"))
>  			return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
> +	} else if (pdev->vendor == 0x8086 && pdev->device == 0xf1a6) {
> +		/*
> +		 * Exclude Intel 760p/Pro 7600p from NVME_QUIRK_SIMPLE_SUSPEND
> +		 * on the Dell XPS 13 7390. With the drive in D3hot the PCH
> +		 * never enters S0ix in s2idle sleep, which more than doubles
> +		 * the battery drain while suspended.
> +		 */
> +		if (dmi_match(DMI_SYS_VENDOR, "Dell Inc.") &&
> +		    dmi_match(DMI_PRODUCT_NAME, "XPS 13 7390"))
> +			return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
>  	}
>  
>  	/*
> 
> ---
> base-commit: 4f069ab1ec243e6b60dc438772905855c60774e8
> change-id: 20261129-nvme-xps13-7390-quirk-50f9e84fbcf1
> 
> Best regards,
> -- 
> Moncef Mechri <moncef.mechri@gmail.com>
> 
---end quoted text---


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-30  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30  4:45 [PATCH] nvme-pci: Exclude Intel 760p on Dell XPS 13 7390 from simple suspend Moncef Mechri via B4 Relay
2026-11-30  8:51 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox