ucsi_ccg 50 second hang while resuming from s2ram with nvidia, recent kernels
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Arch Linux) |
New
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Won't Fix
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Confirmed
|
Undecided
|
Unassigned | ||
linux-oem-osp1 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
=== SRU Justification ===
[Impact]
Some systems have a "phantom" Nvidia UCSI, which prevent systems from
suspending.
[Fix]
ucsi_ccg is stuck in its probe routine because of the i2c bus never
timeouts. Let it timeouts and probe can fail since it's just a phantom
device.
[Test]
After applying this patch system can suspend/resume succesfully.
[Regression Potential]
Low. It's a trivial change to correctly handle timeout.
=== Original Bug Report ===
Short version
=============
I'm experiencing a 50-second hang each time I resume from a "deep" (suspend-to-RAM) sleep.
It happens with the newer kernel (5.3 series; I'm currently running the version from eoan-proposed), but not with the version from the Ubuntu 18.04.3 LTS (uname says "5.0.0-31-generic #33~18.04.1-Ubuntu SMP").
[I haven't yet tried to test the mainline builds, nor to find/confirm the regression range, as this seems like something that will take me another week, and I'm not sure if it would be helpful.]
I narrowed the problem down to what I believe is a broken USB Type-C controller on the NVIDIA GPU: the ucsi_ccg driver for /sys/devices/
I guess the hang is the driver waiting for a response to SET_NOTIFICATIO
Creating /etc/modprobe.
Steps to reproduce
==================
(these are not the actual steps one can take to reproduce, starting from a new install; let me know if those will be useful)
1. Boot Ubuntu 19.10 with NVIDIA GPU drivers uninstalled and the following kernel parameters <https:/
nouveau.modeset=0 nouveau.runpm=0 # force using integrated graphics
mem_sleep_
2. Run `dmesg -w` and wait a minute or two until a message like the following is printed:
[ 175.611346] ucsi_ccg 0-0008: failed to reset PPM!
[ 175.611355] ucsi_ccg 0-0008: PPM init failed (-110)
(attempting to suspend before the PPM init timeout will fail to enter sleep at all.)
(if your system doesn't report PPM init timeout, you probably won't see the hang on resume either)
3. Run `sudo pm-suspend` (using the power button to suspend causes other problems)
...wait for the laptop to go to sleep and the fans to turn off.
4. Press Enter on the built-in keyboard to resume. (Although the way we wake up the system doesn't seem to matter.)
5. Observe a hang lasting for almost a minute before the system is operational, with dmesg reporting:
[ 299.331393] ata1.00: configured for UDMA/100
<note the 47 second long gap>
[ 346.133024] ucsi_ccg 0-0008: PPM NOT RESPONDING
[ 346.133039] PM: dpm_run_callback(): ucsi_ccg_
[ 346.133042] PM: Device 0-0008 failed to resume: error -110
...
[ 346.141504] Restarting tasks ... done.
[ 346.340221] PM: suspend exit
System info
===========
My Dell G3 3590 laptop has an NVIDIA "GeForce GTX 1660 Ti with Max-Q Design" GPU.
NVIDIA's "Turing" chips include USB Type-C controller on the GPU (I read future VR headsets are supposed to use it <https:/
# lspci -tv
-[0000:00]-+-00.0 Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers
| +-00.1 NVIDIA Corporation Device 1aeb
| +-00.2 NVIDIA Corporation Device 1aec
| \-00.3 NVIDIA Corporation Device 1aed
...
Where the '1aed' device is detected as "NVIDIA USB Type-C Port Policy Controller" in Windows.
I'm not sure if it's serving any useful purpose on this laptop, and it certainly doesn't seem to function properly:
If I enable UCSI logging on startup (root's crontab):
@reboot bash -c 'echo 1 > /sys/kernel/
..the steps to reproduce above result in the following /sys/kernel/
# tracer: nop
#
# entries-
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
kworker/
kworker/
kworker/
kworker/
kworker/
kworker/
pm-
pm-
kworker/
kworker/
I updated the BIOS to the latest available (08/28/2019) and installed (by booting into Windows) all the other updates available for this system from the vendor. I don't know how to check what is the firmware version of the USB-C chip on the GPU and whether it even exists...
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: linux-image-
ProcVersionSign
Uname: Linux 5.3.0-20-generic x86_64
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 29 01:21:28 2019
InstallationDate: Installed on 2019-10-20 (8 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
MachineType: Dell Inc. G3 3590
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.183.1
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/28/2019
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.7.1
dmi.board.name: 061RYD
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.family: GSeries
dmi.product.name: G3 3590
dmi.product.sku: 0949
dmi.sys.vendor: Dell Inc.
CVE References
description: | updated |
Changed in linux-oem-osp1 (Ubuntu Eoan): | |
status: | New → Won't Fix |
Changed in linux-oem-osp1 (Ubuntu Focal): | |
status: | New → Won't Fix |
Changed in linux (Ubuntu Bionic): | |
status: | New → Won't Fix |
Changed in linux-oem-osp1 (Ubuntu Bionic): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Eoan): | |
status: | Confirmed → Fix Committed |
tags: |
added: verification-done-eoan removed: verification-needed-eoan |
Changed in linux-oem-osp1 (Ubuntu Eoan): | |
status: | Won't Fix → Fix Released |
status: | Won't Fix → Fix Released |
This change was made by a bot.