Bug 103645 - Dell XPS 13 and TB16 thunderbolt dock
Summary: Dell XPS 13 and TB16 thunderbolt dock
Status: CLOSED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Stanislav Lisovskiy
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-09 12:44 UTC by Patrik Flykt
Modified: 2018-06-04 10:57 UTC (History)
1 user (show)

See Also:
i915 platform: KBL
i915 features: display/USB-C


Attachments
Kernel log for drm-tip 4.14.0-rc8 (136.84 KB, application/gzip)
2017-11-09 12:44 UTC, Patrik Flykt
no flags Details
Kernel log for drm-tip 4.14.0-rc8, take 2 (228.38 KB, application/gzip)
2017-11-10 14:42 UTC, Patrik Flykt
no flags Details
Kernel log with more debugs enabled (132.31 KB, application/gzip)
2017-11-17 07:10 UTC, Patrik Flykt
no flags Details
Kernel log from suspend-resume and connect Thunderbolt (6.01 KB, application/gzip)
2017-11-28 08:47 UTC, Patrik Flykt
no flags Details

Description Patrik Flykt 2017-11-09 12:44:56 UTC
Created attachment 135347 [details]
Kernel log for drm-tip 4.14.0-rc8

Dell XPS13 laptop i7-7500U has a Dell TB16 Thunderbolt dock attached. Thunderbolt itself and USB are verified with respective maintainers to be set up and working properly. Proper things happen when the dock is plugged in and out wrt USB and Thunderbolt.

The sequence of events goes like this:
* boot up and plug in the dock USB-C cable with two monitors attached (VGA+HDMI)
* log in using for example GDM
* configure laptop internal screen off, two external monitors on from for example GNOME settings application
* pull out the dock USB-C cable
* the open (wayland) application windows are placed on the laptop screen, which is now turned on automatically
* plug in the dock again
* plug the dock out and in again until GDM restarts

Kernel is drm-tip 4.14.0-rc8, last cable plug out/plug in event happens after 13:33 in the log. Other installed components for Debian 9.1 are:
ii  libdrm-intel1:amd64                       2.4.74-1                  amd64
ii  libgl1-mesa-dri:amd64                     13.0.6-1+b2               amd64
ii  xserver-xorg-video-intel                  2:2.99.917+git20161206-1  amd64
Comment 1 Elizabeth 2017-11-09 21:09:34 UTC
Hello Patrik,
Could you please share dmesg with debug information: drm.debug=0x1e log_bug_len=2M on grub. Thank you.
Comment 2 Patrik Flykt 2017-11-10 14:42:43 UTC
Created attachment 135373 [details]
Kernel log for drm-tip 4.14.0-rc8, take 2

This should contain the full kernel logs.
Comment 3 Elizabeth 2017-11-10 17:31:41 UTC
From dmesg:
traps: gnome-shell[4551] trap int3 ip:7f551f015261 sp:7ffe0d54e610 error:0
nfsd: last server has exited, flushing export cache

So basically the problem you're reporting is the X crash after plugin and unplug?? Is this desktop dependent??

It seems that you have an issue with dmc, could you try please try to reinstall dmc?
i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_01.bin failed with error -2
i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_01.bin. Disabling runtime power management.
i915 0000:00:02.0: DMC firmware homepage: https://01.org/linuxgraphics/downloads/firmware
[drm:intel_fbc_init] Sanitized enable_fbc value: 1

Have you tried i915.enable_rc6=0 or i915.enable_fbc=0 on grub?

[drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe B FIFO underrun
[drm:intel_fbc_underrun_work_fn] Disabling FBC due to FIFO underrun.

Not sure if this are relevant:

[drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -5
[drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -5
[drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -5
[drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -5
[drm:process_single_tx_qlock] failed to dpcd write 10 -5
[drm:process_single_tx_qlock] sideband msg failed to send
[drm:process_single_down_tx_qlock] failed to send msg in q -5
Comment 4 Patrik Flykt 2017-11-17 07:09:35 UTC
(In reply to Elizabeth from comment #3)
> traps: gnome-shell[4551] trap int3 ip:7f551f015261 sp:7ffe0d54e610 error:0
> nfsd: last server has exited, flushing export cache
> 
> So basically the problem you're reporting is the X crash after plugin and
> unplug?? Is this desktop dependent??

At least GNOME and wayland specific. Right now I don't have any other desktops installed.

> It seems that you have an issue with dmc, could you try please try to
> reinstall dmc?
> i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_01.bin failed
> with error -2
> i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_01.bin.
> Disabling runtime power management.
> i915 0000:00:02.0: DMC firmware homepage:
> https://01.org/linuxgraphics/downloads/firmware
> [drm:intel_fbc_init] Sanitized enable_fbc value: 1

kbl_dmc_ver1_01.bin (re)installed from Debian's firmware-misc-nonfree, version 20170823-1

> Have you tried i915.enable_rc6=0 or i915.enable_fbc=0 on grub?

Grub boots now with drm.debug=0xe i915.enable_rc6=0 i915.enable_fbc=0 added. Log attached.

Both BIOS and Thunderbolt firmware updated to latest versions, 2.3.1 and 21.0, respectively. Debian updated to testing, now we have:
ii  libdrm-intel1:amd64                     2.4.85-1
ii  libgl1-mesa-dri:amd64                   13.0.6-1+b2
ii  libwayland-client0:amd64                1.14.0-1
ii  xserver-xorg-video-intel                2:2.99.917+git20161206-1

Right now with modest cable plugging I don't seem able to reproduce the crash, so I can't yet confirm or deny whether it works.
Comment 5 Patrik Flykt 2017-11-17 07:10:35 UTC
Created attachment 135538 [details]
Kernel log with more debugs enabled
Comment 6 Patrik Flykt 2017-11-28 08:47:47 UTC
Created attachment 135746 [details]
Kernel log from suspend-resume and connect Thunderbolt
Comment 7 Patrik Flykt 2017-11-28 08:48:35 UTC
Although drm-tip has looked mostly stable, it can also be persuaded to do unwanted things. Dock and laptop are the same, this time a suspend-resume did its job.

 * Pull out Thunderbolt, etc. cables
 * Laptop internal screen gets activated and GNOME screen lock is visible
 * Suspend yesterday ~16:15
 * Resume today ~9:43 by opening lid
 * Laptop internal screen gets activated, lock screen shown
 * Plug in the Thunderbolt cable
 * Watch internal screen go off and on, looks like graphics is trying to find the two external monitors connected (VGA + DP)
 * After the fourth attempt GDM greets the user with a new login screen...

This time around the software installed was:
ii  libdrm-intel1:amd64                          2.4.88-1
ii  libgl1-mesa-dri:amd64                        13.0.6-1+b2
ii  libwayland-client0:amd64                     1.14.0-1
ii  xserver-xorg-video-intel                     2:2.99.917+git20161206-1

Drm-tip is at commit 65dc54b704d3ee0486f9f5b11f00c28973f783a2.
Comment 8 Jani Saarinen 2018-03-29 07:11:08 UTC
First of all. Sorry about spam.
This is mass update for our bugs. 

Sorry if you feel this annoying but with this trying to understand if bug still valid or not.
If bug investigation still in progress, please ignore this and I apologize!

If you think this is not anymore valid, please comment to the bug that can be closed.
If you haven't tested with our latest pre-upstream tree(drm-tip), can you do that also to see if issue is valid there still and if you cannot see issue there, please comment to the bug.
Comment 9 Jani Saarinen 2018-04-18 10:23:08 UTC
Patrik, see https://bugs.freedesktop.org/show_bug.cgi?id=104425 if same issue and fix works for you?
Comment 10 Jani Saarinen 2018-04-20 14:51:48 UTC
Patrik, was this working?
Comment 11 Patrik Flykt 2018-04-23 06:33:00 UTC
I didn't have a problem of a blank screen, actually. I got a blank screen connecting TB16 to only the DP monitor with the following combination:

XPS13, USB-C thunderbolt, TB16 dock, only one monitor connected via DP:
 - 4.15.x works fine
 - 4.16 shows black/blank screen when connecting thunderbolt cable
 - 4.16.1 shows black/blank screen when connecting thunderbolt cable
 - 4.16.2 works fine

Applying said patch to 4.16.2 shows black/blank screen when connecting the cable, so something might have gone wrong here.

But pulling out the cable multiple times has to wait for my main work right now, which isn't about pulling out thunderbolt cables...
Comment 12 aappddeevv 2018-04-23 12:24:23 UTC
I found that the latest linux firmware package (20180402-83, which I picked up while testing some 4.17 kernels) seems to help stabilize some things with the dock.
Comment 13 Jani Saarinen 2018-04-25 11:53:04 UTC
Patrik, does comment #12 help you?
Comment 14 Patrik Flykt 2018-04-26 08:16:30 UTC
Reporting that kernel 4.16.2 works seems to have been a working accident. Neither patching 4.16.4 or leaving the kernel unpatched works for me. Both variants leave the DP monitor black/turned off. HDMI might be working a bit better, though.
Comment 15 Patrik Flykt 2018-05-29 10:39:55 UTC
Looks like crashing has stopped since the last time this bug was updated. All pieces of software have been updated meanwhile, i.e.:
- Linux kernel 4.16.11
- Dell BIOS updated to latest, version number I can provide at next reboot
- Updated software, we now have
  ii  libdrm-intel1:amd64                            2.4.92-1
  ii  libgl1-mesa-dri:amd64                          18.0.4-1
  ii  libwayland-client0:amd64                       1.15.0-2
  ii  xserver-xorg-video-intel                       2:2.99.917+git20161206-1

So one or more components above seem to have gotten the issue adressed...
Comment 16 Stanislav Lisovskiy 2018-06-04 09:51:55 UTC
Hi Patrik,

So can you please once again confirm, that the bug is no longer reproducible?

Otherwise, I need to proceed with investigation.
Comment 17 Patrik Flykt 2018-06-04 10:24:10 UTC
The BIOS version that was missing in comment #15 is 2.6.2.

I can confirm that pulling out the USB-C Thunderbolt cable no longer crashes the desktop/gdm combination with the above list of software installed.

However, there is a regression issue in bug #106250 that makes the dock quite unusable right now.
Comment 18 Jani Saarinen 2018-06-04 10:57:29 UTC
Thanks, closing this.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.