RE: A different PD controller firmware problem?

From: Mario.Limonciello
Date: Thu Nov 08 2018 - 13:01:05 EST


Ted,

Sorry for my delayed responses.

>
> On Tue, Sep 11, 2018 at 01:02:00PM +0000, Mario.Limonciello@xxxxxxxx wrote:
> > > I tried 9370 and it detects the adapter correctly. IIRC I did the same
> > > for 5530 and it worked as well.
> >
> > Thanks for confirming that. Hopefully the same change can be ported to PD
> controller
> > firmware then on other models, I'll inquire.
>
> Hey Mario,
>
> Sorry for the thread hijack (I've changed the subject line to make it
> clear it's a separate issue), but just this evening I just had a
> very.... interesting problem with my Dell XPS 9370, and it appears to
> be related to the PD controller.
>
> Sortly after 12:30am US/Eastern, I got a low power warning on my
> system, and the battery power had dropped below 10%. Apparently the
> laptop was not accepting any charge any more. I tried doing a suspend
> to ram, and then unsuspended it, and it still wasn't accepting any
> charge, even though the adapter indicated it was plugged in and
> supplying power. I then did a power cycle, and still the laptop
> didn't indicate it was charging with a USB C 45W power supply plugged
> in.

Just to be clear was this a Dell adapter or another manufacturer?

If it's non-Dell, there could easily be an untested combination of controllers
and one getting into a bad state.

>
> I inserted a Satechi USB C voltage monitor in-line, and found that
> while it was powered on, the laptop has pulling 0 mA at 5V. If the
> laptop was suspended, it would pull 3A at 5V. Rebooting and power
> cycling didn't change this syndrome.
>
> What *did* fix it was powering down, and disconnecting the power
> adapter for 30 seconds or so. Then when I plugged it back in, the
> laptop started accepting 20V at 2A. I assume what happened is that
> the PD controller had crashed, and it required a powerdown *and*
> unplugging the power to force the EC to reset.

That's the same hypothesis I would have come to in these circumstances.

I haven't heard of this particular issue in the past, but that doesn't mean
anything since I don't work in Dell's support group or have access to their
call information.

Is this a 1 time occurrence or something you can regularly trigger with the
right set of events?

As you know if you can't trigger it regularly it's going to be just as hard
for this to be reproduced and fixed by the engineering team maintaining
this platform.

If you can trigger it regularly (or semi-regularly even) the right way to report
it would be to contact the ProSupport team, explain the circumstances that
can cause it and they would escalate it to the proper channels.

Sorry I can't be more helpful.

>
> I have noticed other problems where a USB C to HDMI adapter doesn't
> quite work right (the laptop refuses to talk to the display), and the
> *only* way to fix things is to powerdown Linux and then remove the
> power plug.

Is this with the DA200 or DA300? Or something else?

I think it would be worth checking this with drm-tip, and if it keeps reproducing
there then:
1) Check if UCSI sysfs can tell you anything about what accessory mode the device is operating in.
I'm not sure if accessory_mode gets populated by the EC, but if it does it might be useful to debug.

2) Boot with drm.debug=0xe and double check the differences around the circumstances
of it working or not working. Having to boot with it plugged in for it to work tells
me that it's either the wrong type C alternate mode coming up for this adapter or the graphics
driver not getting along with the adapter.

3) Raising it with the graphics mailing list.

> So this is not the first time that this particular
> technique is needed to make my Dell XPS 9370 (with NVMe SSD, currently
> running XPS 13 9370 System Firmware version 0.1.5.1) happy again.
>
> What's the best place to report this sort of problem? And is there
> anything more I can do to debug these sorts of apparent PD Controller
> / EC bugs?

It sounds like this one might be more reproducible. If it's a Dell peripheral I think it should be
pretty easy for support to reproduce and escalate.