Re: Wake from Thunderbolt dock doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 22, 2022 at 03:54:16PM +0200, Tomasz Moń wrote:
> On Fri, 2022-04-22 at 09:30 +0300, Mika Westerberg wrote:
> > On Fri, Apr 22, 2022 at 08:09:23AM +0200, Tomasz Moń wrote:
> > > On Fri, Apr 22, 2022 at 7:27 AM Mika Westerberg
> > > <mika.westerberg@xxxxxxxxxxxxxxx> wrote:
> > > > On Thu, Apr 21, 2022 at 09:52:18PM +0200, Tomasz Moń wrote:
> > > > > I have observed that when I suspend to RAM, I cannot wakeup the
> > > > > host
> > > > > (MacBook Pro 2019) with my low-speed USB keyboard (Microsoft
> > > > > Comfort
> > > > > Curve Keyboard 2000) connected to Thunderbolt 3 dock (CalDigit
> > > > > USB-C
> > > > > Pro Dock).
> > > > > 
> > > > > The host runs on Intel Core i9-9980HK and lspci shows Intel
> > > > > Corporation
> > > > > JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] and Intel
> > > > > Corporation
> > > > > DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015].
> > > > > 
> > > > > On Windows and Mac OS the system can be successfully woken up
> > > > > by
> > > > > pressing key on keyboard connected via the dock.
> > > > 
> > > > Is the system that has the problem an Apple system or a regular
> > > > PC?
> > > 
> > > It is an Apple system (MacBook Pro 2019) as noted in in first
> > > paragraph. All tests were performed on the same host with the same
> > > equipment.
> > 
> > OK, I see. I was bit confused because you mention that it works in
> > Windows. I guess you run the Windows on boot camp or so?
> 
> Yes, Windows was installed using Boot Camp Assistant.

OK.

> > If that's the case then you should be getting same kind of "support"
> > by passing "thunderbolt.start_icm=1" in the kernel command line.
> 
> Passing "thunderbolt.start_icm=1" in the kernel command line made
> things worse. The system does not wake from suspend at all. It does not
> wake from USB keyboard connected directly to the host. And it does not
> wake after opening the lid nor after pressing power button (Touch ID).
> 
> The only way to get system back running seemed to be pressing and
> holding power button long enough until the Apple bootloader starts.

OK. The start_icm=1 starts the connection manager firmware which is one
thing that Windows relies too. However, all the PM stuff is still not
there unfortunately.

> > That should do the same than what the boot camp does and start the
> > TBT firmware connection manager.
> 
> I have no idea what boot camp does on the low level, but atleast
> Windows can wakeup successfully.

please try the same in Linux if that's possible. Running Linux natively
will likely have issues because all the non-standard stuff in those
systems.

> > Apple systems by default have the firmware connection manager
> > disabled so the OS does all the tunneling and in Linux we do not
> > supportThunderbolt 3 hosts fully in the software connection manager
> > side (we do support devices, though).  Mostly it's the power
> > management that is missing and I don't see it being fully supported
> > in the future either because the Apple systems are not like the most
> > standardized systems in the market so there are lots of "magic"
> > things happening that are completely undocumented :(
> 
> Apple "magic" is just one thing, but for someone outside Intel it is
> even worse, as basically the whole JHL7540 is just a black box. Or is
> there a way for casual programmer to get hold on the Intel Thunderbolt
> 3 datasheet/specification?

It is not about the TBT spec. It is how Apple wired and implemented the
power management of it. In PC world it's all standard ACPI methods that
are used to turn off/on power to the chip and implement the PCIe L2/3
handshake etc. All that is most likely different in Apple systems.

If you are interested the USB4 spec [1], which is public, describes the
TBT3 power management but again this is host and it is pretty much
implementation specific.

[1] https://usb.org/sites/default/files/USB4%20Specification%2020220331.zip



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux