Thunderbolt Dock Loses Monitors

Bug #1889342 reported by rhpot1991
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Committed
Undecided
koba

Bug Description

After a suspend or locking the only way to regain external monitors is to unplug and replug the thunderbolt dock back in.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-42-generic 5.4.0-42.46
ProcVersionSignature: Ubuntu 5.4.0-42.46-generic 5.4.44
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.4
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: john 2682 F.... pulseaudio
 /dev/snd/controlC0: john 2682 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Jul 29 00:22:26 2020
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-focal-amd64-20200502-85
InstallationDate: Installed on 2020-07-13 (15 days ago)
InstallationMedia: Ubuntu 20.04 "Focal" - Build amd64 LIVE Binary 20200502-05:58
MachineType: Dell Inc. XPS 13 9300
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-42-generic root=UUID=5e141eb0-e03b-4c39-b826-f94e0d2715ea ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-42-generic N/A
 linux-backports-modules-5.4.0-42-generic N/A
 linux-firmware 1.187.2
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/08/2020
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.0.11
dmi.board.name: 0WX9VX
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.0.11:bd05/08/2020:svnDellInc.:pnXPS139300:pvr:rvnDellInc.:rn0WX9VX:rvrA00:cvnDellInc.:ct10:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 13 9300
dmi.product.sku: 096D
dmi.sys.vendor: Dell Inc.

Revision history for this message
rhpot1991 (rhpot1991) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
rhpot1991 (rhpot1991) wrote :

Some additional details: I'm using a Dell WD19TB dock.

The lock screen seems to be the tipping point, with that disabled I'm able to continually use external monitors. If I hit win+l to lock then I have to unplug the dock in order to get external monitors working again.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

I upgraded my kernel to 5.6.0-1020-oem in order to test. The issue is better then, but not resolved. When using the lock screen one out of the two monitors is lost.

This errors are in dmesg:
[257474.965612] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* failed to get link status
[257474.974761] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun

Changed in linux (Ubuntu):
assignee: nobody → koba (kobako)
Revision history for this message
rhpot1991 (rhpot1991) wrote :

Back on 5.4.0-42-generic

I get random cut outs with this in dmesg:
[60008.139725] xhci_hcd 0000:03:00.0: xHCI host controller not responding, assume dead
[60008.158394] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* failed to get link status

Eventually the displays come back after a few seconds.

koba (kobako)
Changed in linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
koba (kobako) wrote :

@rhpot1991,
Would you please try oem5.6 again?! the new version is released.
#apt install linux-oem-5.6

Revision history for this message
rhpot1991 (rhpot1991) wrote :

Installed, give me some time to do some tests and see if the issue is fixed.

Revision history for this message
koba (kobako) wrote :

@rhpot1991,
Have any feedback!?

Revision history for this message
rhpot1991 (rhpot1991) wrote :

The issue is still occurring.

Configuration - Laptop docked with screen closed, dual monitor on dock.
Linux unicron 5.6.0-1028-oem #28-Ubuntu SMP Tue Sep 8 13:34:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I can reproduce it by doing the following:
1. Hit win+l to lock
2. Let monitors go to sleep
3. Try to wake up with keyboard/mouse
4. Unlock screen is not prompted, it seemingly shows up on the closed laptop.

See attached dmesg with errors.

Revision history for this message
rhpot1991 (rhpot1991) wrote :
Revision history for this message
koba (kobako) wrote :

what cpu generation of xps 9300?

Revision history for this message
Kent Lin (kent-jclin) wrote :

ICL. Gen 10

Revision history for this message
koba (kobako) wrote :

@rhpot1991,
With xps 9300(icl), can't reproduce the issue.
I plug one monitor on wd19tb and disable the screen lock.

please enable the drm debug with drm.debug=0x1e.
reboot the machine and try reproduce it.
Then dump "journalctl -k -b"
Thanks

Revision history for this message
rhpot1991 (rhpot1991) wrote :

Took me a bit to reproduce again while logging:
1. Hit win+l to lock
2. Let monitors go to sleep (the longer the better, if I did this for a short amount of time the system recovered)
3. Try to wake up with keyboard/mouse
4. Unlock screen is not prompted
5. Open laptop, find unlock screen there
6. Now laptop screen is working and one of the monitors. The other monitor is inaccessible

Revision history for this message
rhpot1991 (rhpot1991) wrote :
Revision history for this message
rhpot1991 (rhpot1991) wrote :

I'll also note that at one point in this log the dock lost my keyboard, which needed to be unplugged and plugged back in.

Revision history for this message
koba (kobako) wrote :

@rhpot1991,
could you check the firmware version of wd19tb!?

Revision history for this message
rhpot1991 (rhpot1991) wrote :
Revision history for this message
rhpot1991 (rhpot1991) wrote :

See attachment, everything is up to date according to fwupdmgr.

Revision history for this message
koba (kobako) wrote :

yours is the same as mine.
Did you trigger the issue after the fresh installation?

Revision history for this message
rhpot1991 (rhpot1991) wrote :

Happened out of the box from Dell, switching to 5.6 OEM didn't help. I think part of the key here is the double monitor in the dock with the laptop screen closed.

Revision history for this message
koba (kobako) wrote :

I tried that connect two monitors on wd19tb.
can't trigger the issue on my side.
Can you confirm is the issue be triggered after the fresh installation!?
Thanks your effort

Revision history for this message
markb (mark-blakeney) wrote :

FYI the same lock screen bug and random dock disconnects etc occur on Arch Linux as well. Using XPS 13 9300 + WD19TB + 2 by 2560x1440 DP connected screens, GNOME 3.38, kernel 5.9, fwupd versions up to date.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

It definitely occurs with a fresh install (dell image). I received my laptop and dock together, happened right out of the box.

Revision history for this message
Vladimir Didenko (vladimir-didenko) wrote :

Just in case related thread on Dell forum

https://www.dell.com/community/XPS/XPS-13-9300-and-WD19TB-linux-problem/td-p/7644488

and bug report

https://gitlab.freedesktop.org/drm/intel/-/issues/1453

It is interesting that disabling MST support in the kernel (i915.enable_dp_mst=0)

https://www.dell.com/community/XPS/XPS-13-9300-and-WD19TB-linux-problem/m-p/7723066/highlight/true#M72030

sometimes resolves the problem or at least makes the situation more stable.

Revision history for this message
Vladimir Didenko (vladimir-didenko) wrote :

Also additional note. According to the Dell thread, it seems that this issue is easier to reproduce with higher bandwidth required. E.g. there was a report that this issue could be reproduced with 1080p + 120 Hz when it works fine with 1080p + 60 Hz.

Revision history for this message
Kent Lin (kent-jclin) wrote :

@rhpot1991,

How many monitors are connected to the dock?
What are the maximum resolutions of those monitors connected to the dock?

Revision history for this message
markb (mark-blakeney) wrote :

I am the person who wrote the post on the Dell forums Vladimir is referring to (and I have posted earlier here as above). Note that adding i915.enable_dp_mst=0 doesn't just "sometimes resolve" the very frequent blackouts, disconnects, and other problems I was seeing with my WD19TB dock + XPS 13 9300, it completely resolves all of them! At least with my configuration and versions as stated in that post https://www.dell.com/community/XPS/XPS-13-9300-and-WD19TB-linux-problem/m-p/7723066/highlight/true#M72030.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

I have two monitors connected 1080p 60hz. I have tried with either HTMI or DP, issue is present no matter the combination. I'll also note that I lose my sound settings quite often and need to switch that back to HDMI after any hiccups.

Revision history for this message
koba (kobako) wrote :

@rhpot1991,
###Could you please help to try this!?
https://kernel.ubuntu.com//~kernel-ppa/mainline/drm-tip/current/amd64/

###And this
1. Please enable the proposed and sudo apt update.
2. sudo apt install linux-image-unsigned-5.6.0-1035-oem.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

Can you double check that URL? Doesn't seem to be working.

Revision history for this message
Kent Lin (kent-jclin) wrote :
Revision history for this message
rhpot1991 (rhpot1991) wrote :

I'm already on linux-oem-5.6-headers-5.6.0-1036 with the issue still present. I recently upgraded to a Dell Ultrasharp 38" instead of my double configuration, and the same issue occurs with USB-C connection in this configuration.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

It looks like 5.6.0-1037.41 is on the PPA, is it worth trying that?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Have anyone tried KDE? I wonder if it's caused by how GNOME handles DPMS/CRTC.

Use a live environment is sufficient.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

Another thing to note, when I get flickering monitor loss unplugging and plugging in the dock seems to resolve. Same thing going on in the logs then:
[221027.376079] [drm:intel_fbc_enable [i915]] Enabling FBC on pipe A
[221027.387002] [drm:__intel_fbc_disable [i915]] Disabling FBC on pipe A
[221027.387064] [drm:drm_atomic_state_default_clear [drm]] Clearing atomic state 00000000665ad61a
[221027.387095] [drm:__drm_atomic_state_free [drm]] Freeing atomic state 00000000665ad61a
[221027.391513] [drm:drm_mode_addfb2 [drm]] [FB:252]
[221027.391551] [drm:drm_atomic_state_init [drm]] Allocated atomic state 00000000665ad61a
[221027.391579] [drm:drm_atomic_get_crtc_state [drm]] Added [CRTC:91:pipe A] 000000002b78400a state to 00000000665ad61a
[221027.391601] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE:31:plane 1A] 000000008e58a6fb state to 00000000665ad61a
[221027.391623] [drm:drm_atomic_set_fb_for_plane [drm]] Set [FB:252] for [PLANE:31:plane 1A] state 000000008e58a6fb
[221027.391645] [drm:drm_atomic_check_only [drm]] checking 00000000665ad61a
[221027.391764] [drm:intel_plane_atomic_calc_changes [i915]] [CRTC:91:pipe A] with [PLANE:31:plane 1A] visible 1 -> 1, off 0, on 0, ms 0
[221027.391841] [drm:intel_atomic_get_global_obj_state [i915]] Added new global object 00000000d2037ee9 state 00000000b32f3203 to 00000000665ad61a
[221027.391870] [drm:drm_atomic_nonblocking_commit [drm]] committing 00000000665ad61a nonblocking
[221027.391994] [drm:intel_fbc_enable [i915]] reserved 49152000 bytes of contiguous stolen space for FBC, threshold: 1

I also have a corrupt cursor issue over time - I'll see if I can get a photo of that.

Revision history for this message
koba (kobako) wrote :

@rhpot1991, would you please try the 5.10-oem kernel?
there're some patches to resolve the tbt dock issue.
https://drive.google.com/drive/folders/1975W_7C6IJg9q_IDy08WrJYaIk_zfRp8?usp=sharing

Revision history for this message
rhpot1991 (rhpot1991) wrote :

From the Dell thread mentioned above, adding this to grub helps: "mem_sleep_default=deep i915.enable_guc=2 i915.enable_dp_mst=0"

I'll test out the new kernel and get you feedback.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

Is there a signed version of 5.10 oem available anywhere? I see 5.10.0-1008-oem available in Ubuntu sources, but the version you asked for testing is 5.10.0-4008-oem.

Revision history for this message
rhpot1991 (rhpot1991) wrote :

See kernel log with the 5.10.0-4008-oem kernel. Didn't work with either USB-C port.

Revision history for this message
koba (kobako) wrote :

Hi, here's test kernel with the patch figureed out the suspend&resume issue against wd19tb.
https://drive.google.com/drive/folders/1-x2-IbsqcGJ_SICPyZuOXnplMKTUGWGu?usp=sharing

Revision history for this message
rhpot1991 (rhpot1991) wrote :

5.10.0-1011kgen9tgps3rsm-oem does not help. The system doesn't detect the TB dock at all on one USB-C port. The other leads to the laptop screen constantly turning off and on, and no connection to the TB dock/monitor occuring.

Same results with 5.10.0-1016 in Feisty Fixes.

I see in the Dell forums reports that 5.10.16 and greater fix the issues.

Revision history for this message
koba (kobako) wrote :

@rhpot1991, would you please share the link about dell forums post? thanks

Revision history for this message
rhpot1991 (rhpot1991) wrote :
Revision history for this message
rhpot1991 (rhpot1991) wrote :

I'll also note I'm problem free for a few days on 5.10.24-051024-generic

Revision history for this message
markb (mark-blakeney) wrote :

I'm cc'd on this thread from a while ago when I was looking around for solutions to the many issues that plagued my XPS 9300 laptop and my WD19TB dock (same combination as OP here). I can state that with any Linux kernel 5.10.16 or later, and XPS BIOS 1.5.0, and dock firmware 01.00.15.01, all problems are fixed. I use that combo daily (although up to kernel 5.12.2 now on Arch Linux) and never get any problem at all which is surprising actually given how flaky it was beforehand. There were a heap of i915 patches done in 5.10.15 which are required and then 1 more from 5.10.16 (Fix vswing programming for TBT) that is essential.

Revision history for this message
markb (mark-blakeney) wrote :

I should make it clear that you need the kernel and the updated BIOS and dock firmware at or beyond the versions I state. All 3 are needed.

Revision history for this message
koba (kobako) wrote : Re: [Bug 1889342] Re: Thunderbolt Dock Loses Monitors

@markb,
would you please help to try 5.10-oem-1023 or 1025(Must enable proposed)
#sudo apt update
#sudo apt install linux-image-5.10.0-1023-oem linux-headers-5.10.0-1023-oem

Revision history for this message
markb (mark-blakeney) wrote :

@koba, sorry I use Arch, not Ubuntu/Debian.

Revision history for this message
koba (kobako) wrote :

@markb, ok thanks

Changed in linux (Ubuntu):
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.