USB Type-C hotplug event not handled properly in TGL-H system during s2idle

Bug #1931072 reported by Chris Chiu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HWE Next
Undecided
Unassigned
linux (Ubuntu)
Undecided
Chris Chiu
Focal
Undecided
Unassigned
Hirsute
Medium
Unassigned
Impish
Undecided
Chris Chiu
linux-oem-5.10 (Ubuntu)
Undecided
Chris Chiu
Focal
Undecided
Chris Chiu
Hirsute
Undecided
Unassigned
Impish
Undecided
Chris Chiu
linux-oem-5.13 (Ubuntu)
Undecided
Unassigned
Focal
Undecided
Chris Chiu
Hirsute
Undecided
Unassigned
Impish
Undecided
Unassigned

Bug Description

[SRU Justification]

[Impact]
The system will be hold by the infinite loop in ACPI method IPCS after exiting s2idle in TGL-H systems if the docking station with external display connected is unplugged when the system is still in s2idle. It's
because the system is unaware of the unplug event and it seems keep something asserted which will never be released while the system trying to exit s2idle.

[Fix]
Disconnect TypeC PHYs during system suspend and shutdown, even with the
corresponding TypeC sink still plugged to its connector. The HPD event is no longer triggered when the system is in s2idle so the resume process will not be hindered.

[Test Case]
1. On all TigerLake-H and later platforms with NVIDIA GPU, make sure the NVIDIA GPU is running in either On-Demand mode or Performance mode.
2. Connect the docking station with the external display connected.
3. Suspend the system.
4. Remove the docking station when the system is suspended.
5. Press power button to wake up the system and wait > 1 minutes to make sure if the display comes back.

[Where problems could occur]
Low. This will only make a difference in the TypeC DP alternate mode, and the display driver will detect the display connector after resume.

========== Original Bug Description ==========

[Summary]
As mentioned in #1929166, the NVIDIA GPU will fall off the bus after exiting s2idle in TGL-H systems if the USB Type-C docking/dongle with external display connected is unplugged when the system is still in s2idle. The system will be hold by the infinite loop in ACPI method IPCS and then the PCIe root port of NVIDIA gpu fails the power transition from D3cold to D0. It's because the display connector hotplug event not handled properly in graphics drivers and the system will freeze for > 30 seconds to wait for ACPI method IPCS to exit.

[ 154.446781]
[ 154.446783]
[ 154.446783] Initialized Local Variables for Method [IPCS]:
[ 154.446784] Local0: 000000009863e365 <Obj> Integer 00000000000009C5
[ 154.446790]
[ 154.446791] Initialized Arguments for Method [IPCS]: (7 arguments
defined for method invocation)
[ 154.446792] Arg0: 0000000025568fbd <Obj> Integer 00000000000000AC
[ 154.446795] Arg1: 000000009ef30e76 <Obj> Integer 0000000000000000
[ 154.446798] Arg2: 00000000fdf820f0 <Obj> Integer 0000000000000010
[ 154.446801] Arg3: 000000009fc2a088 <Obj> Integer 0000000000000001
[ 154.446804] Arg4: 000000003a3418f7 <Obj> Integer 0000000000000001
[ 154.446807] Arg5: 0000000020c4b87c <Obj> Integer 0000000000000000
[ 154.446810] Arg6: 000000008b965a8a <Obj> Integer 0000000000000000
[ 154.446813]
[ 154.446815] ACPI Error: Aborting method \IPCS due to previous error
(AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446824] ACPI Error: Aborting method \MCUI due to previous error
(AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446829] ACPI Error: Aborting method \SPCX due to previous error
(AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446835] ACPI Error: Aborting method \_SB.PC00.PGSC due to
previous error (AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446841] ACPI Error: Aborting method \_SB.PC00.PGON due to
previous error (AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446846] ACPI Error: Aborting method \_SB.PC00.PEG1.NPON due to
previous error (AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446852] ACPI Error: Aborting method \_SB.PC00.PEG1.PG01._ON due
to previous error (AE_AML_LOOP_TIMEOUT) (20200925/psparse-529)
[ 154.446860] acpi device:02: Failed to change power state to D0
[ 154.690760] video LNXVIDEO:00: Cannot transition to power state D0
for parent in (unknown)

[Reproduce Steps]
1. Connect either Dell WD19SC/DC/TB docking station(USB Type-C) to the system.
2. Connect to external display to HDMI/DisplayPort of the docking
3. Suspend the system
4. Unplug the USB Type-C connector which connects to the system
5. Press power button to wake up the system
6. Check if the internal/external display come back within 10 seconds.

[Results]
Expected:
  System works with the internal/external display

Actual:
  System takes > 30 seconds to get back the display.

Revision history for this message
Chris Chiu (mschiu77) wrote :

Report https://gitlab.freedesktop.org/drm/intel/-/issues/3500 upstream and tried the OEM kernel with the attached PATCH on problematic Fariano laptop. It works w/o problem. Waiting for the official patch to backport.

Revision history for this message
Chris Chiu (mschiu77) wrote :

https://cgit.freedesktop.org/drm-tip/commit/?id=151ec347b06a2fb6ecd2922475dca71a7af827a5 is in the drm-intel-next. Will do backport for the OEM-5.10 kernel

Chris Chiu (mschiu77)
description: updated
Changed in linux (Ubuntu Focal):
status: New → Invalid
Changed in linux-oem-5.10 (Ubuntu Focal):
status: New → In Progress
Changed in linux-oem-5.10 (Ubuntu):
assignee: nobody → Chris Chiu (mschiu77)
Changed in linux-oem-5.10 (Ubuntu Focal):
assignee: nobody → Chris Chiu (mschiu77)
Chris Chiu (mschiu77)
Changed in linux-oem-5.10 (Ubuntu Hirsute):
status: New → Invalid
Changed in linux-oem-5.10 (Ubuntu Impish):
status: New → Invalid
Chris Chiu (mschiu77)
tags: added: oem-priority originate-from-1924204 somerville
tags: added: originate-from-1925291
tags: added: originate-from-1923729
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.10 (Ubuntu Focal):
status: In Progress → Fix Committed
Chris Chiu (mschiu77)
no longer affects: linux (Ubuntu Impish)
no longer affects: linux-oem-5.10 (Ubuntu Impish)
Changed in linux (Ubuntu Hirsute):
status: New → In Progress
Stefan Bader (smb)
Changed in linux (Ubuntu Hirsute):
importance: Undecided → Medium
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-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

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-focal
Chris Chiu (mschiu77)
Changed in linux (Ubuntu Impish):
assignee: nobody → Chris Chiu (mschiu77)
Changed in linux-oem-5.13 (Ubuntu Focal):
assignee: nobody → Chris Chiu (mschiu77)
status: New → In Progress
Changed in linux (Ubuntu Impish):
status: New → In Progress
Changed in linux-oem-5.13 (Ubuntu Hirsute):
status: New → Invalid
Changed in linux-oem-5.13 (Ubuntu Impish):
status: New → Invalid
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.13 (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (45.9 KiB)

This bug was fixed in the package linux-oem-5.10 - 5.10.0-1038.40

---------------
linux-oem-5.10 (5.10.0-1038.40) focal; urgency=medium

  * CVE-2021-33909
    - SAUCE: seq_file: Disallow extremely large seq buffer allocations

linux-oem-5.10 (5.10.0-1037.38) focal; urgency=medium

  * focal/linux-oem-5.10: 5.10.0-1037.38 -proposed tracker (LP: #1935808)

  * Mute/mic LEDs no function on some HP platfroms (LP: #1934878)
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 450 G8
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G8
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 630 G8

linux-oem-5.10 (5.10.0-1036.37) focal; urgency=medium

  * focal/linux-oem-5.10: 5.10.0-1036.37 -proposed tracker (LP: #1934760)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis
    - [Packaging] update helper scripts

  * mute/micmute LEDs no function on HP EliteBook 830 G8 Notebook PC
    (LP: #1934239)
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC

  * Add l2tp.sh in net from ubuntu_kernel_selftests back (LP: #1934293)
    - Revert "UBUNTU: SAUCE: selftests/net -- disable l2tp.sh test"

  * devlink_port_split in net from ubuntu_kernel_selftests linux ADT test
    failure with linux/5.11.0-18.19 ( list index out of range) (LP: #1928889)
    - selftests: net: devlink_port_split.py: skip the test if no devlink device

  * icmp_redirect.sh in net from ubuntu_kernel_selftests failed on F-OEM-5.6 /
    F-OEM-5.10 / F-OEM-5.13 / F / G / H (LP: #1880645)
    - selftests: icmp_redirect: support expected failures

linux-oem-5.10 (5.10.0-1035.36) focal; urgency=medium

  * focal/linux-oem-5.10: 5.10.0-1035.36 -proposed tracker (LP: #1932479)

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * XPS 9510 (TGL) Screen Brightness could not be changed (LP: #1933566)
    - SAUCE: drm/i915: Force DPCD backlight mode for Dell XPS 9510(TGL)

  * mute/micmute LEDs no function on HP EliteBook x360 830 G8 (LP: #1933508)
    - ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook x360 830 G8

  * Focal update: v5.10.46 upstream stable release (LP: #1933367)
    - dmaengine: idxd: add missing dsa driver unregister
    - dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions
    - dmaengine: xilinx: dpdma: initialize registers before request_irq
    - dmaengine: ALTERA_MSGDMA depends on HAS_IOMEM
    - dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM
    - dmaengine: SF_PDMA depends on HAS_IOMEM
    - dmaengine: stedma40: add missing iounmap() on error in d40_probe()
    - afs: Fix an IS_ERR() vs NULL check
    - mm/memory-failure: make sure wait for page writeback in memory_failure
    - kvm: LAPIC: Restore guard to prevent illegal APIC register access
    - fanotify: fix copy_event_to_user() fid error clean up
    - batman-adv: Avoid WARN_ON timing related checks
    - mac80211: fix skb length check in ieee80211_scan_rx()
    - mlxsw: reg: Spectrum-3: Enforce lowest max-shaper burst size of 11
    - mlxsw: core: Set thermal zone polling delay argument to real value at init
    - libbpf: Fixes incorrect rx_ring_setup_done
    - net: ipv4: fix memory...

Changed in linux-oem-5.10 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.4 KiB)

This bug was fixed in the package linux-oem-5.13 - 5.13.0-1009.10

---------------
linux-oem-5.13 (5.13.0-1009.10) focal; urgency=medium

  * CVE-2021-33909
    - SAUCE: seq_file: Disallow extremely large seq buffer allocations

linux-oem-5.13 (5.13.0-1007.7) focal; urgency=medium

  * focal/linux-oem-5.13: 5.13.0-1007.7 -proposed tracker (LP: #1934979)

  * intel_pmc_core driver is not probed on ADL (LP: #1934660)
    - SAUCE: platform/x86: intel_pmc_core: Add Alderlake support to pmc_core
      driver
    - SAUCE: platform/x86: intel_pmc_core: Add Latency Tolerance Reporting (LTR)
      support to Alder Lake
    - SAUCE: platform/x86: intel_pmc_core: Add Alder Lake low power mode support
      for pmc_core
    - SAUCE: platform/x86: intel_pmc_core: Add GBE Package C10 fix for Alder Lake
      PCH

linux-oem-5.13 (5.13.0-1006.6) focal; urgency=medium

  * focal/linux-oem-5.13: 5.13.0-1006.6 -proposed tracker (LP: #1934490)

  * Replace AMD nvme workaround from oem-5.10 with upstream version
    (LP: #1930719)
    - ACPI: Check StorageD3Enable _DSD property in ACPI code
    - ACPI: Add quirks for AMD Renoir/Lucienne CPUs to force the D3 hint

  * Add Thunderbolt support for Intel Alder Lake (LP: #1934240)
    - thunderbolt: Add support for Intel Alder Lake

  * Fix Ethernet not working by hotplug - RTL8106E (LP: #1930645)
    - SAUCE: r8169: Use PHY_POLL when RTL8106E enable ASPM

  * Realtek USB hubs in Dell WD19SC/DC/TB fail to work after exiting s2idle
    (LP: #1928242)
    - USB: Verify the port status when timeout happens during port suspend
    - Revert "USB: Add reset-resume quirk for WD19's Realtek Hub"

  * USB Type-C hotplug event not handled properly in TGL-H system during s2idle
    (LP: #1931072)
    - drm/i915: Force a TypeC PHY disconnect during suspend/shutdown

  * Miscellaneous Ubuntu changes
    - [Config] Sync annotations and config with master

  [ Ubuntu: 5.13.0-11.11 ]

  * impish/linux: 5.13.0-11.11 -proposed tracker (LP: #1933854)
  * Packaging resync (LP: #1786013)
    - [Packaging] update variants
  * Support builtin revoked certificates (LP: #1932029)
    - [Packaging] build canonical-revoked-certs.pem from branch/arch certs
    - [Packaging] Revoke 2012 UEFI signing certificate as built-in
    - [Config] Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys
  * Miscellaneous Ubuntu changes
    - [Packaging] Change source package name to linux
  * Miscellaneous upstream changes
    - mm/page_alloc: Correct return value of populated elements if bulk array is
      populated

  [ Ubuntu: 5.13.0-10.10 ]

  * impish/linux-unstable: 5.13.0-10.10 -proposed tracker (LP: #1933795)
  * Pixel format change broken for Elgato Cam Link 4K (LP: #1932367)
    - media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K
  * initramfs-tools & kernel: use zstd as the default compression method
    (LP: #1931725)
    - s390/decompressor: correct BOOT_HEAP_SIZE condition
    - s390/boot: add zstd support
    - [Packaging] use ZSTD to compress s390 kernels
  * Miscellaneous Ubuntu changes
    - SAUCE: selftests: tls: fix chacha+bidir tests
    - SAUCE: selftests: icmp_redirect: support expected failures
    - [Config] update ...

Read more...

Changed in linux-oem-5.13 (Ubuntu Focal):
status: Fix Committed → Fix Released
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
Chris Chiu (mschiu77)
tags: added: verification-done-focal verification-done-hirsute
removed: verification-needed-focal verification-needed-hirsute
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (62.5 KiB)

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

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

  * hirsute/linux: 5.11.0-34.36 -proposed tracker (LP: #1941766)

  * Server boot failure after adding checks for ACPI IRQ override (LP: #1941657)
    - Revert "ACPI: resources: Add checks for ACPI IRQ override"

linux (5.11.0-33.35) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-33.35 -proposed tracker (LP: #1940101)

  * libvirtd fails to create VM (LP: #1940107)
    - sched: Stop PF_NO_SETAFFINITY from being inherited by various init system
      threads

linux (5.11.0-32.34) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-32.34 -proposed tracker (LP: #1939769)

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

  * CVE-2021-3656
    - SAUCE: KVM: nSVM: always intercept VMLOAD/VMSAVE when nested

  * CVE-2021-3653
    - SAUCE: KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl

  * [regression] USB device is not detected during boot (LP: #1939638)
    - SAUCE: Revert "usb: core: reduce power-on-good delay time of root hub"

  * Support builtin revoked certificates (LP: #1932029)
    - [Packaging] build canonical-revoked-certs.pem from branch/arch certs
    - [Packaging] Revoke 2012 UEFI signing certificate as built-in
    - [Config] Configure CONFIG_SYSTEM_REVOCATION_KEYS with revoked keys

  * Support importing mokx keys into revocation list from the mok table
    (LP: #1928679)
    - SAUCE: integrity: add informational messages when revoking certs

  * Support importing mokx keys into revocation list from the mok table
    (LP: #1928679) // CVE-2020-26541 when certificates are revoked via
    MokListXRT.
    - SAUCE: integrity: Load mokx certs from the EFI MOK config table

  * Include product_sku info to modalias (LP: #1938143)
    - firmware/dmi: Include product_sku info to modalias

  * Fix Ethernet not working by hotplug - RTL8106E (LP: #1930645)
    - net: phy: rename PHY_IGNORE_INTERRUPT to PHY_MAC_INTERRUPT
    - SAUCE: r8169: Use PHY_POLL when RTL8106E enable ASPM

  * [SRU][H/OEM-5.10/OEM-5.13/U] Fix system hang after unplug tbt dock
    (LP: #1938689)
    - SAUCE: igc: fix page fault when thunderbolt is unplugged

  * [Regression] Audio card [8086:9d71] not detected after upgrade from linux
    5.4 to 5.8 (LP: #1915117)
    - [Config] set CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC to y

  * Backlight (screen brightness) on Lenovo P14s AMD Gen2 inop (LP: #1934557)
    - drm/amdgpu/display: only enable aux backlight control for OLED panels

  * Touchpad not working with ASUS TUF F15 (LP: #1937056)
    - pinctrl: tigerlake: Fix GPIO mapping for newer version of software

  * dev_forward_skb: do not scrub skb mark within the same name space
    (LP: #1935040)
    - dev_forward_skb: do not scrub skb mark within the same name space

  * Fix display output on HP hybrid GFX laptops (LP: #1936296)
    - drm/i915: Invoke another _DSM to enable MUX on HP Workstation laptops

  * [SRU][OEM-5.10/H] UBUNTU: SAUCE: Fix backlight control on Samsung 16727
    panel (LP: #1930527)
    - SAUCE: drm/i915: Force DPCD backlight mode for Samsung 16727 pa...

Changed in linux (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.13.0-21.21 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-impish' to 'verification-done-impish'. If the problem still exists, change the tag 'verification-needed-impish' to 'verification-failed-impish'.

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-impish
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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