Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: moncef.mechri@gmail.com
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Mario Limonciello <mario.limonciello@amd.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] nvme-pci: Exclude Intel 760p on Dell XPS 13 7390 from simple suspend
Date: Mon, 30 Nov 2026 09:51:35 +0100	[thread overview]
Message-ID: <20261130085135.GA11399@lst.de> (raw)
In-Reply-To: <20261130-nvme-xps13-7390-quirk-v1-1-b065e0a1033d@gmail.com>

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---


      reply	other threads:[~2026-11-30  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130085135.GA11399@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=moncef.mechri@gmail.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox