Re: [PATCH 1/2] thunderbolt: add opt-in to preserve tunnels across s2idle
From: Tobias Heath
Date: Wed Nov 25 2026 - 09:43:10 EST
Mika,
Because s2idle is Linux's path to Modern Standby — "look off / wake instant / state preserved". From ACPI's perspective the system never leaves S0 during s2idle; the tb_suspend_noirq callback fires anyway because Linux's PM core runs the full suspend chain on every s2idle. That's the mismatch I'm trying to address: the ACPI state says "we're idle in S0", but the TB driver treats the event as a real suspend and tears down the fabric.
On this hardware the dock-side TB host has power/runtime_active_time = 515 s and runtime_suspended_time = 0 ms since boot, because the USB tunnels downstream keep it in D0 continuously. Entering s2idle doesn't change what the user wants that host to be doing — the laptop's job is "look off, wake instantly, don't drop the dock" — but current code forces it to D3cold anyway and pays the full re-init cost on every wake.
If you'd prefer the driver auto-detect this (preserve only when sleep target is s2idle AND the domain has active tunnels), instead of a module parameter, that works for me.
Happy to spin v2 along those lines if you'd accept the general direction.
Many thanks.
On 25/11/2026 14:35, Mika Westerberg wrote:
Hi,
On Wed, Nov 25, 2026 at 02:26:56PM +0000, Tobias Heath wrote:
Hello,Okay so you blocked D3 entry intentionally. Why you are even entering
Many thanks for your reply.
On this hardware the dock-side host router is pinned in D0 by active USB4
tunnels and has not runtime-suspended since boot (active_time=515s,
suspended_time=0). The quiet host router does go to D3cold exactly as the
spec describes. The s2idle_preserve=1 path keeps the state that runtime-PM
would have kept anyway — it prevents the system-suspend path from forcing a
D3cold transition that tears down tunnels users still have open. Would you
be open to a v2 that scopes to 'suspend target is s2idle AND domain has
active tunnels' rather than a global module parameter?
s2idle if you want to keep the tunnels up? Why not stay in S0 then.