Hi, On Wed, Sep 27, 2023 at 03:43:29PM +0200, Kamil Paral wrote: > On Wed, Sep 27, 2023 at 7:16 AM Mika Westerberg > <[1]mika.westerberg@xxxxxxxxxxxxxxx> wrote: > > > I would also try to change all the BIOS settings back to defaults, see > > that it works (it is probably in "user" security level then), then > > switch back to "secure" (only change this one option) and try if it now > > works. It could be that some setting just did not get commited properly. > > Hello, I have some interesting findings. > I reset the BIOS ("load BIOS defaults"), however that doesn't reset the TB > security level option - whatever is set is kept. So I can't really find > out what the default value is and whether I changed it. However, to my > surprise, the resume was suddenly fast even with the Secure Connect > security level. So I went through options one by one and finally > discovered that the "Wake by Thunderbolt 3" option makes the difference. > It has the following description: > "Enable/Disable Wake Feature with Thunderbolt 3 ports. If Enabled, the > battery life during low power state may become shorter." > It is enabled by default, I had it disabled before. When I enable it, I > have a 5 sec resume even with Secure Connect TB security level. The dmesg > for such a resume is here: > [2]https://bugzilla-attachments.redhat.com/attachment.cgi?id=1990815 Okay that now looks like what is expected. The firmware re-connects the tunnels and the resume can continue. I actually don't know what that option does either but I would expect that it leaves the PME and small power enabled for the port so that probably allows the firmware to do this even in "secure" mode or so. > I'm sorry I haven't spotted and tested such an obviously named option > earlier. My understanding was that this option either wakes up my laptop > when I connect the cable (tested now, it doesn't appear to do so), or that > it wakes it up when I move/click my dock-connected mouse (tested, doesn't > appear to do so). So originally I wanted this disabled (and I had no > kernel issues with it disabled, prior to e8b908146d44), but it seems I > misunderstood what it does. And I'm still unsure what exactly it's > supposed to do and why it should kill my battery life in the process, > according to its description. > Hopefully this helps to bring more light into this? > However, I also discovered that even though Wake by TB3 + Secure Connect > gives me a fast resume in a normal case, I still see a 60+ sec resume > delay when I disconnect and then reconnect the TB cable while the laptop > is suspended (which is a frequent use case for me). That doesn't happen > with the User Authorization level (regardless of Wake by TB value). So I'm > staying with User Authorization for the moment. If you apply the patch from here: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=pm&id=6786c2941fe1788035f99c98c932672138b3fbc5 Does the problem go away with the disconnect case too (and so that you have "secure" enabled)?