External displays not working on Thinkpad T490 with ThinkPad Thunderbolt 3 Dock

Bug #1938999 reported by Tomas Petricek
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
AaronMa
Hirsute
Fix Released
Medium
AaronMa

Bug Description

I have two external displays chained via Display port connected to the ThinkPad Thunderbolt 3 Dock.

They are working with kernel 5.8.0-63 but not with the new 5.11.0-25 kernel.

I could reproduce this behavior several times for both kernels, as follows: I booted up with disconnected dock, logged in, then I connected it, disconnected it, and connected it again.

With the 5.11.0-25 kernel the external displays go black; the main screen turns off and on several times. Sometimes the main screen remains working, but UI is lagging.

I'm attaching the logs. Two separate boots for each variant are marked 'a'/'b'.

SRU Justifications:
===============
[Impact]
External displays not working on Thinkpad T490 with ThinkPad Thunderbolt
3 Dock

[Fix]
Some SKL systems DP output fails when AUX timeout of LTTPR detection.
Disable the LTTPR detection until GLK to fix the link training.

[Test]
Verified on hardware, external DP work fine.
Also tested on I+N GPU laptop and a iGPU only laptop, all displays with dock are good.

[Where problems could occur]
It may break output of external DP.

This patch from 5.12-rc5, only Hirsute kernel is SRUed.

CVE References

Revision history for this message
Tomas Petricek (tpetricek) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

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

nouveau is used instead of nvidia-driver.
external display highly depends on nvidia gpu.

Could you try 5.13/5.14 kernel?
Or 5.13 with nvidia-driver?

Revision history for this message
Tomas Petricek (tpetricek) wrote :

Thanks for looking into this. I changed the drivers to nouveau to workaround some previous issues I had with external displays and then I forgot made this change.

Could you point me to how to test with 5.13/5.14 kernels, please? If possible I would like to stick to the default drivers/kernel.

For now I switched again to 5.11.0-25 and nvidia drivers v.470 to check the current state. Without the dock and one external display it is okay, but I'll be able to test with the dock only later this week. I'll post updates once done.

Revision history for this message
AaronMa (mapengyu) wrote :

I didn't reproduce this issue on T590 with 5.11.0-25 kernel.

Please try dock or DP again.

And the 5.13 kernel:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.13/amd64/

Revision history for this message
Tomas Petricek (tpetricek) wrote :

I tested again on kernels 5.8 and 5.11 with nvidia-driver-470. Logs are attached.

With 5.8 kernel, the external displays eventually come to live, after connecting the dock and some waiting (~15 s). After first connection, it seemed to be doing several trials, in the end it worked too.

With 5.11 kernel, the external displays remain black, and computer was lagging or almost frozen.

I'll see what I can do with 5.13 kernel.

Revision history for this message
Tomas Petricek (tpetricek) wrote :

There seems to be a dependency problem with linux-headers-5.13.0-051300-generic:

dpkg: dependency problems prevent configuration of linux-headers-5.13.0-051300-generic:
 linux-headers-5.13.0-051300-generic depends on libc6 (>= 2.33); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.2.

dpkg: error processing package linux-headers-5.13.0-051300-generic (--install):
 dependency problems - leaving unconfigured

Revision history for this message
Tomas Petricek (tpetricek) wrote :

I also installed the 5.13.9 kernel, again with the same unmet dependency:

dpkg: dependency problems prevent configuration of linux-headers-5.13.9-051309-generic:
 linux-headers-5.13.9-051309-generic depends on libc6 (>= 2.33); however:
  Version of libc6:amd64 on system is 2.31-0ubuntu9.2.

To my surprise, I was able to boot using this kernel.
Package manager complains due to broken packages.
Also, I am unable to gather some of the logs:
cat: /proc/version_signature: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted

Nevertheless, the displays work as they should. I'm attaching the logs I got.

Revision history for this message
AaronMa (mapengyu) wrote :

I am trying to find T490 to reproduce.
Please wait a while.

Revision history for this message
Bin Li (binli) wrote :

I could reproduce this issue on L15, when I insert DP cable, it show a lot of '*ERROR* Link Training Unsuccessful'. And from the xrandr I found the DP monitor was recognized, and I could move mouse to this external monitor, but the screen is black.

Aug 12 23:45:05 u-ThinkPad-L15-Gen-1 kernel: i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful
Aug 12 23:45:05 u-ThinkPad-L15-Gen-1 kernel: i915 0000:00:02.0: [drm] *ERROR* Link Training Unsuccessful

u@u-ThinkPad-L15-Gen-1:~$ uname -an
Linux u-ThinkPad-L15-Gen-1 5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ xrandr
DP-1-3 connected 1600x900+1920+0 (normal left inverted right x axis y axis) 434mm x 236mm
   1600x900 59.98*+
   1280x1024 75.02 60.02··
   1152x864 75.00··
   1024x768 75.03 60.00··
   800x600 75.00 60.32··
   640x480 75.00 59.94··
   720x400 70.08··

Revision history for this message
Bin Li (binli) wrote :

I tried the maniline kernel with bisect method. We need bisect the patch from v5.10.57 to v5.11-rc2, and v5.11-rc1 didn't provide deb package because of building failure.

v5.10 works fine
v5.10.57 works fine
v5.11 doesn't work
v5.11-rc4 doesn't work
v5.11-rc2 doesn't work

Revision history for this message
Bin Li (binli) wrote :

I also found the fixed patch should between v5.12-rc4 and v5.12-rc5.

v5.12 works.
v5.11.22 doesn't work.
v5.12-rc4 doesn't work.
v5.12-rc6 works.
v5.12-rc5 works.

Revision history for this message
AaronMa (mapengyu) wrote :

I think the following commits are the fixes:
ab03631087f5 drm/i915: Disable LTTPR support when the LTTPR rev < 1.4
7dffbdedb96a drm/i915: Disable LTTPR support when the DPCD rev < 1.4
3f3a9bc1f6df drm/i915/ilk-glk: Fix link training on links with LTTPRs

Revision history for this message
Bin Li (binli) wrote :

I build a kernel based on v5.12-rc4, and cherry-pick below commit, this issue is fixed.

3f3a9bc1f6df drm/i915/ilk-glk: Fix link training on links with LTTPRs

And I tried to cherry-pick the other two commits. It's still good.
ab03631087f5 drm/i915: Disable LTTPR support when the LTTPR rev < 1.4
7dffbdedb96a drm/i915: Disable LTTPR support when the DPCD rev < 1.4

Revision history for this message
AaronMa (mapengyu) wrote :

Thanks BinLi,
I will SRU it.

Revision history for this message
AaronMa (mapengyu) wrote :
Revision history for this message
Bin Li (binli) wrote :

@aaron,

 Tried the 5.11.0-26.28-lp1938999-generic kernel, it works fine. You could check more about it from this log. Thanks!

AaronMa (mapengyu)
description: updated
Changed in linux (Ubuntu):
assignee: nobody → AaronMa (mapengyu)
AaronMa (mapengyu)
description: updated
Stefan Bader (smb)
Changed in linux (Ubuntu Hirsute):
assignee: nobody → AaronMa (mapengyu)
importance: Undecided → Medium
status: New → In Progress
Changed in linux (Ubuntu Hirsute):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-hirsute' to 'verification-done-hirsute'. If the problem still exists, change the tag 'verification-needed-hirsute' to 'verification-failed-hirsute'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-hirsute
Revision history for this message
Tomas Petricek (tpetricek) wrote :

Thanks for the fix. I'm not sure to whom the previous message is addressed but I will not be able to test it because I'm will not be at the office until end of September.

Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

Thank you for the note, Tomas. Aaron, may you please help with the verification on this? Thank you!

AaronMa (mapengyu)
tags: added: verification-done-hirsute
removed: verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (68.6 KiB)

This bug was fixed in the package linux - 5.11.0-37.41

---------------
linux (5.11.0-37.41) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-37.41 -proposed tracker (LP: #1944180)

  * CVE-2021-41073
    - io_uring: ensure symmetry in handling iter types in loop_rw_iter()

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.09.06)

  * LRMv5: switch primary version handling to kernel-versions data set
    (LP: #1928921)
    - [Packaging] switch to kernel-versions

  * disable “CONFIG_HISI_DMA” config for ubuntu version (LP: #1936771)
    - Disable CONFIG_HISI_DMA
    - [Config] Record hisi_dma no longer built for arm64

  * ubunut_kernel_selftests: memory-hotplug: avoid spamming logs with
    dump_page() (LP: #1941829)
    - selftests: memory-hotplug: avoid spamming logs with dump_page(), ratio limit
      hot-remove error test

  * alsa: the soundwire audio doesn't work on the Dell TGL-H machines
    (LP: #1941669)
    - ASoC: SOF: allow soundwire use desc->default_fw_filename
    - ASoC: Intel: tgl: remove sof_fw_filename set for tgl_3_in_1_default

  * e1000e blocks the boot process when it tried to write checksum to its NVM
    (LP: #1936998)
    - e1000e: Do not take care about recovery NVM checksum

  * Dell XPS 17 (9710) PCI/internal sound card not detected (LP: #1935850)
    - ASoC: Intel: sof_sdw: include rt711.h for RT711 JD mode
    - ASoC: Intel: sof_sdw: add quirk for Dell XPS 9710

  * mute/micmute LEDs no function on HP ProBook 650 G8 (LP: #1939473)
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PC

  * Fix mic noise on HP ProBook 445 G8 (LP: #1940610)
    - ALSA: hda/realtek: Limit mic boost on HP ProBook 445 G8

  * GPIO error logs in start and dmesg after update of kernel (LP: #1937897)
    - ODM: mfd: Check AAEON BFPI version before adding device

  * External displays not working on Thinkpad T490 with ThinkPad Thunderbolt 3
    Dock (LP: #1938999)
    - drm/i915/ilk-glk: Fix link training on links with LTTPRs

  * Fix kernel panic caused by legacy devices on AMD platforms (LP: #1936682)
    - SAUCE: iommu/amd: Keep swiotlb enabled to ensure devices with 32bit DMA
      still work

  * Hirsute update: upstream stable patchset 2021-08-30 (LP: #1942123)
    - drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"
    - Revert "drm/i915: Propagate errors on awaiting already signaled fences"
    - regulator: rtmv20: Fix wrong mask for strobe-polarity-high
    - regulator: rt5033: Fix n_voltages settings for BUCK and LDO
    - spi: stm32h7: fix full duplex irq handler handling
    - ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
    - r8152: Fix potential PM refcount imbalance
    - qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
    - ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend
    - net: Fix zero-copy head len calculation.
    - ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup
    - ASoC: ti: j721e-evm: Check for not initialized parent_clk_id
    - efi/mokvar: Reserve the table only if it is in boot services data
    - nvme: fix nvme_setup_command ...

Changed in linux (Ubuntu Hirsute):
status: Fix Committed → Fix Released
AaronMa (mapengyu)
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
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.