Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1767741ybc; Wed, 20 Nov 2019 03:53:07 -0800 (PST) X-Google-Smtp-Source: APXvYqxkK4C20YVt7ITt5+d2fA9vvdTkJIQE7ytBCfohjSHV4W83FEMgWjn3Y4L5U+UkQRXE4Nct X-Received: by 2002:a17:906:4dda:: with SMTP id f26mr4941157ejw.89.1574250787509; Wed, 20 Nov 2019 03:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574250787; cv=none; d=google.com; s=arc-20160816; b=gtEnE3wS83PPbFNxLSYnI3QJFtsPophLnDImcQO6gsoLorPC5JFfw0lD7HH61BCvlE ZW3Byf5kIpyQeOWmLcqmd9mA67f1jDTGK5syEcF2Pja73+10Cgzg7BuSWPMLhXxyJUEO N0zJXPfM6QX3NeZrs74G9lGO0mofnkefAwuIxjGEWcQEUv6g+eVyYjWOGySPRKOTCPQ1 l6dHGEOBjMhqYrHpdQpwAEQq47xFAJfIfXeQ9e6Wtsd7L14qjxJaTsTg9Opf4a5LnZvA Jn7HJ/6GmYjcaeKCjP5F+pDZvUz9mueZlL8yDzU+lzrPXFYE1IK/sPeHRps0SBgC+XGF lAIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=U1htdB6XomQ/WE9sq+to3Mop/NyPVWzVLhLfU1Zcw/w=; b=dlsAzIR6oiZwagkPDi1luGojhFk0UcfWABrn8YLHZre0YQefJE74BkVd77UcFHxUif MT66Mpg56oimLWXAbYEvPNgB9UP/Onoq1qw+nkFARZXThf6lKEV2Fhov1WnHfQS24qGI wNl4eugEV8pzVUwe3Ijao2MTt1RVBf4tg6QmsJfSAro2Msc/PQszu+OMeBby/HZVVoJC 6/2ox7hW7Rkz1F7lmAFQY4fZ/cbu2YUufH99y0JaF76Tq7++0slpa+iToX3z+H/te/v8 3r6p2wgzakf9F7P5hGRkqKUq9dYpmkKCrC/lOYmZSVghIy6/wP7oZ/iKpH5G1OxmtWW8 J4pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p17si16420849edm.269.2019.11.20.03.52.42; Wed, 20 Nov 2019 03:53:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbfKTKuy (ORCPT + 99 others); Wed, 20 Nov 2019 05:50:54 -0500 Received: from mga02.intel.com ([134.134.136.20]:12954 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727514AbfKTKux (ORCPT ); Wed, 20 Nov 2019 05:50:53 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2019 02:50:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,221,1571727600"; d="scan'208";a="215756739" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga001.fm.intel.com with SMTP; 20 Nov 2019 02:50:49 -0800 Received: by lahna (sSMTP sendmail emulation); Wed, 20 Nov 2019 12:50:49 +0200 Date: Wed, 20 Nov 2019 12:50:48 +0200 From: Mika Westerberg To: Paul Menzel Cc: Mario Limonciello , Andreas Noever , Michael Jamet , Yehezkel Bernat , Christian Kellner , linux-kernel@vger.kernel.org, Anthony Wong Subject: Re: USB devices on Dell TB16 dock stop working after resuming Message-ID: <20191120105048.GY11621@lahna.fi.intel.com> References: <5d2b39bc-5952-c2b6-63b3-bce28122ffd5@molgen.mpg.de> <20191104142459.GC2552@lahna.fi.intel.com> <20191104144436.GD2552@lahna.fi.intel.com> <20191104154446.GH2552@lahna.fi.intel.com> <20191104162103.GI2552@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 05:55:43PM +0100, Paul Menzel wrote: > Dear Mika, > > > On 2019-11-04 17:21, Mika Westerberg wrote: > > On Mon, Nov 04, 2019 at 05:11:10PM +0100, Paul Menzel wrote: > > >> On 2019-11-04 16:49, Mario.Limonciello@dell.com wrote: > >> > >>>> From: Mika Westerberg > >>>> Sent: Monday, November 4, 2019 9:45 AM > >> > >>>> On Mon, Nov 04, 2019 at 04:44:40PM +0200, Mika Westerberg wrote: > >>>>> On Mon, Nov 04, 2019 at 04:25:03PM +0200, Mika Westerberg wrote: > >> > >>>>>> On Mon, Nov 04, 2019 at 02:13:13PM +0100, Paul Menzel wrote: > >> > >>>>>>> On the Dell XPS 13 9380 with Debian Sid/unstable with Linux 5.3.7 > >>>>>>> suspending the system, and resuming with Dell’s Thunderbolt TB16 > >>>>>>> dock connected, the USB input devices, keyboard and mouse, > >>>>>>> connected to the TB16 stop working. They work for a few seconds > >>>>>>> (mouse cursor can be moved), but then stop working. The laptop > >>>>>>> keyboard and touchpad still works fine. All firmware is up-to-date > >>>>>>> according to `fwupdmgr`. > >>>>>> > >>>>>> What are the exact steps to reproduce? Just "echo mem > > >>>>>> /sys/power/state" and then resume by pressing power button? > >> > >> GNOME Shell 3.34.1+git20191024-1 is used, and the user just closes the > >> display. So more than `echo mem > /sys/power/state` is done. What > >> distribution do you use? > > > > I have buildroot based "distro" so there is no UI running. > > Hmm, this is quite different from the “normal” use-case of the these devices. > That way you won’t hit the bugs of the normal users. ;-) Well, I can install some distro to that thing also :) I suppose Debian 10.2 does have this issue, no? > >>>>> I tried v5.4-rc6 on my 9380 with TB16 dock connected and did a couple of > >>>>> suspend/resume cycles (to s2idle) but I don't see any issues. > >>>>> > >>>>> I may have older/different firmware than you, though. > >>>> > >>>> Upgraded BIOS to 1.8.0 and TBT NVM to v44 but still can't reproduce this > >>>> on my system :/ > >> > >> The user reported the issue with the previous firmwares 1.x and TBT NVM v40. > >> Updating to the recent version (I got the logs with) did not fix the issue. > > > > I also tried v40 (that was originally on that system) but I was not able > > to reproduce it. > > > > Do you know if the user changed any BIOS settings? > > We had to disable the Thunderbolt security settings as otherwise the USB > devices wouldn’t work at cold boot either. That does not sound right at all. There is the preboot ACL that allows you to use TBT dock aready on boot. Bolt takes care of this. Are you talking about USB devices connected to the TB16 dock? Also are you connecting the TB16 dock to the Thunderbolt ports (left side of the system marked with small lightning logo) or to the normal Type-C ports (right side)? > So, I built Linux 5.4-rc8 (`make bindeb-pkg -j8`), but unfortunately the > error is still there. Sometimes, re-plugging the dock helped, and sometimes > it did not. > > Please find the logs attached. The strange thing is, the Linux kernel detects > the devices and I do not see any disconnect events. But, `lsusb` does not list > the keyboard and the mouse. Is that expected. I'm bit confused. Can you describe the exact steps what you do (so I can replicate them). > Additionally, despite `CONFIG_PCI_DEBUG` I do not see more elaborate messages. I see one strange thing in that log. The Thunderbolt driver does not show the device at boot. You should see something like this when you boot with the dock connected: thunderbolt 0-3: new device found, vendor=0xd4 device=0xb051 thunderbolt 0-3: Dell Dell Thunderbolt Cable thunderbolt 0-303: new device found, vendor=0xd4 device=0xb054 thunderbolt 0-303: Dell Dell Thunderbolt Dock I only see those after you did suspend/resume cycle. > Lastly, could the daemon boltd have anything to do with this? It is the one that authorizes the PCIe tunneling so definitely has something to do but below: > > ``` > $ boltctl --version > bolt 0.8 > $ boltctl list > ● Dell Thunderbolt Cable > ├─ type: peripheral > ├─ name: Dell Thunderbolt Cable > ├─ vendor: Dell > ├─ uuid: 0082b09d-2f5f-d400-ffff-ffffffffffff > ├─ status: authorized looks what is expected.