mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andrei Rusu de Castro <arc@empyreal.works>
Cc: Mika Westerberg <westeri@kernel.org>,
	Andreas Noever <andreas.noever@gmail.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thunderbolt: Optionally keep PCIe tunnels up through suspend-to-idle
Date: Thu, 12 Nov 2026 06:49:24 +0100	[thread overview]
Message-ID: <20261112054924.GK259790@black.igk.intel.com> (raw)
In-Reply-To: <20261111-tb-s2idle-keep-pcie-2a2a66a2@empyreal.works>

Hi,

On Wed, Nov 11, 2026 at 10:57:08PM +0000, Andrei Rusu de Castro wrote:
> Every system sleep puts the USB4 routers to sleep, which takes all
> tunnels down, and the connection manager re-creates them on resume. A
> PCIe device behind a tunnel disappears from the bus in between. An
> external GPU that drives a display does not survive that: on a ROG Flow
> Z13 (GZ302EA) with an RTX 5090 in a Razer Core X V2 driving an external
> monitor, the GPU driver found the device gone after suspend-to-idle, the
> enclosure was removed and re-added under a compositor still using it,
> and the desktop froze.

It is supposed to work so that the tunnels get re-established before the
native stacks are resumed, for that we have the device links. In you case
it may be that they are missing.

> For suspend-to-idle the domain can keep running instead. Add a module
> parameter, s2idle_keep_pcie, off by default. When it is set, the target
> state is suspend-to-idle and the software connection manager has a PCIe
> tunnel, leave the routers, links and control channel running and keep
> the host interface in D0 by saving its PCI state in the noirq phase, so
> the PCI core does not put it into D3. The devices behind the tunnel then
> go through an ordinary PCI suspend and resume. Without a PCIe tunnel, in
> other sleep states and with the firmware connection manager nothing
> changes.

I don't think this is a good idea to be honest. We should really understand
why the PCIe link is not coming back as it should be and for that it would
be good if you can share full dmesg with thunderbolt.dyndbg=+p in the
kernel command line.

      parent reply	other threads:[~2026-11-12  5:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 22:57 Andrei Rusu de Castro
2026-11-12  1:58 ` [PATCH v2] " Andrei Rusu de Castro
2026-11-12  5:49 ` Mika Westerberg [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=20261112054924.GK259790@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=arc@empyreal.works \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=westeri@kernel.org \
    /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

all inboxes | Powered by JetHome®