Linux USB
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: "Achim Löbbert" <aloebbert@gmx.de>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [REGRESSION/BUG] thunderbolt: ASM4242 fails to restore DP tunnel after resume on Ryzen 8700G (7.4-rc4)
Date: Tue, 1 Dec 2026 13:59:30 -0600	[thread overview]
Message-ID: <4e9adf36-e10a-44d2-8dc4-562120784824@kernel.org> (raw)
In-Reply-To: <f0s1LFlpRC-3qBMJpJGffw@gmx.de>

On 12/1/26 13:17, Achim Löbbert wrote:
> On Tuesday, 1. Dezember 2026 18:36:24 CET Mario Limonciello wrote:
>> On 12/1/26 11:24, Achim Löbbert wrote:
>>> On Tuesday, 1. December 2026 15:53:25 CET Mario Limonciello wrote:
>>>> On 12/1/26 08:45, Achim Löbbert wrote:
>>>>> Hi Mario,
>>>>>
>>>>> On Tuesday, 1. December 2026 05:29:52 CET Mario Limonciello wrote:
>>>>> [...]
>>>>>
>>>>>> Can you have a try with this patch to force replug events?  I think it
>>>>>> should help on top of Mika's other inline patch.  Whether it should be
>>>>>> a
>>>>>> quirk or some other form can be up for discussion.  Let's see if the
>>>>>> concept works.
>>>>>
>>>>> Thanks for the patch and the bug description, which summarizes it very
>>>>> well. I applied the patch together with Mika's patch against 7.4-rc5 and
>>>>> rebuilt. I also deactivated my hook script using
>>>>>
>>>>> sudo chmod -x /etc/elogind/system-sleep/99-bolt-wake.sh
>>>>>
>>>>> and added 'log_buf_len=1M' on kernel command line to log more sleep
>>>>> cycles.
>>>>>
>>>>> Attached dmesg log now shows two suspend/resume cycles with following
>>>>> results:
>>>>>
>>>>> #1: PC resumes after 1st keypress and remote ssh to it works. U3225QE
>>>>> wakes up from powersaving, but a screen image is shown only after
>>>>> another
>>>>> 2nd keypress. Seen this before with my hook script, and that's what the
>>>>> for loop is for: to prevent to return to elogind too early before DP-2
>>>>> is
>>>>> actually connected.
>>>>>
>>>>> #2: PC resumes, ssh works again, screen comes up from power saving, but
>>>>> stays black again, unfortunately. But after waiting several (>10)
>>>>> minutes, another keypress might still turn it on and unlock screen is
>>>>> displayed.
>>>>>
>>>>> Another observation: with the latest patches, DP-2 status now always
>>>>> shows
>>>>> connected, even in case of black screen, for which it  showed
>>>>> disconnected
>>>>> before the patch.
>>>>> $ for i in /sys/class/drm/card0-DP-*/status; do echo "$i: $(cat $i)";
>>>>> done
>>>>> /sys/class/drm/card0-DP-1/status: disconnected
>>>>> /sys/class/drm/card0-DP-2/status: connected
>>>>> /sys/class/drm/card0-DP-3/status: disconnected
>>>>> /sys/class/drm/card0-DP-4/status: disconnected
>>>>> /sys/class/drm/card0-DP-5/status: disconnected
>>>>> /sys/class/drm/card0-DP-6/status: disconnected
>>>>>
>>>>> Confusing results. Certainly some race condition is involved.
>>>>> Would be happy to assist with further testing.
>>>>>
>>>>> BR, Achim
>>>>
>>>> Confusing results indeed.  But I think this is at least the right
>>>> direction.
>>>>
>>>> To rule out a race with a compositor; can you stop all userspace that
>>>> holds DRM master and work from a VT while testing?
>>>>
>>>> Then the kernel should be lighting up all the displays and we shouldn't
>>>> have to worry about anything induced by races.
>>>
>>> Good idea: service display-manager (sddm/wayland) deleted from run-level
>>> default, reboot, with everything else unchanged. Text mode VTs only, no
>>> GUI.
>>>
>>> To enter sleep, on the console this was executed 5 times:
>>> $ echo mem | sudo tee /sys/power/state
>>> wait until U3225QE enters power saving state, then press a key to wake up:
>>>
>>> Text mode console screen comes up immediately, turns black exactly once
>>> for 2 seconds each time, then comes up solid without any further issues.
>>>
>>> 2 more times 'sudo tee /sys/power/state' printed "device or resource busy"
>>> and sleep mode S3 was not entered, no clue why. But wanted to mention in
>>> case there is something peculiar in the log.
>>>
>>> Log attached with 5 suspend/resume cycles
>>
>> OK so now with compositor out of the picture it sounds like what I would
>> expect happens.  Basically it forces the plug event after resume and
>> everything works fine.  I don't think the patch as I shared it is what
>> we should be putting in.
> 
> Agreed, because of see below.
> 
>> The surprising part to me is that it was visible before the the black
>> screen.  Is this consistent every single time?  Or just some cycles it
>> happens?
> 
> In case you referred to this (just to avoid misunderstandings):
>>> Text mode console screen comes up immediately, turns black exactly once
>>> for 2 seconds each time, then comes up solid without any further issues.
> Consistent: 2 second black console screen happened every of the 5 times with
> Mika's and your patch applied (Log tb-resume-bug-dmesg.8.txt sent earlier).
> 
>> With just Mika's inline patch and no compositor/userspace running is it
>> a failure rate when there is a black screen vs not?
> The 2 second black console screen did not occur at all while trying 10 times
> with Mika's patch only. Log tb-resume-bug-dmesg.9.txt attached, with ~3
> cycles, but I tested more than 10 cycles without 2s black screen showing up.

If it's working 100% of the time with just Mika's patch that sounds like 
the preferred approach to me.

Any remaining black screen issues sound like they would be caused by 
userland then, no?


      reply	other threads:[~2026-12-01 19:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 17:10 [REGRESSION/BUG] thunderbolt: ASM4242 fails to restore DP tunnel after resume on Ryzen 8700G (7.4-rc4) Achim Löbbert
2026-11-26  7:31 ` Mika Westerberg
2026-11-26  8:53   ` Achim Löbbert
2026-11-26 12:27     ` Mika Westerberg
2026-11-26 16:59       ` Achim Löbbert
2026-11-27  5:35         ` Mika Westerberg
2026-11-27 18:13           ` Achim Löbbert
2026-11-29  3:36             ` Mario Limonciello
2026-11-30 19:16               ` Achim Löbbert
2026-12-01  4:29                 ` Mario Limonciello
2026-12-01 14:45                   ` Achim Löbbert
2026-12-01 14:53                     ` Mario Limonciello
2026-12-01 17:24                       ` Achim Löbbert
2026-12-01 17:36                         ` Mario Limonciello
2026-12-01 19:17                           ` Achim Löbbert
2026-12-01 19:59                             ` Mario Limonciello [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e9adf36-e10a-44d2-8dc4-562120784824@kernel.org \
    --to=superm1@kernel.org \
    --cc=aloebbert@gmx.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox