Bug 1869722 - Thunderbolt 3 dock Display Port detection problem
Summary: Thunderbolt 3 dock Display Port detection problem
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 32
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Lyude
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-18 13:49 UTC by Mark Menzynski
Modified: 2020-10-02 11:03 UTC (History)
22 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
dmesg is a log with kernel parameters log_buf_len=50M drm.debug=0x116, state is an output of /sys/kernel/debug/dri/0/state after booting up with only VGA and DP cables connected (126.09 KB, application/zip)
2020-08-18 13:49 UTC, Mark Menzynski
no flags Details
dmesg#2 of new scenarios (593.53 KB, application/zip)
2020-08-24 11:20 UTC, Mark Menzynski
no flags Details
dmesg#3 (453.80 KB, application/zip)
2020-09-08 11:12 UTC, Mark Menzynski
no flags Details


Links
System ID Priority Status Summary Last Updated
GNOME Gitlab GNOME/mutter - issues 1390 None None None 2020-08-25 21:22:28 UTC

Description Mark Menzynski 2020-08-18 13:49:34 UTC
Created attachment 1711722 [details]
dmesg is a log with kernel parameters log_buf_len=50M drm.debug=0x116, state is an output of /sys/kernel/debug/dri/0/state after booting up with only VGA and DP cables connected

1.
I use a ThinkPad Thunderbolt 3 Dock with a ThinkPad T580, i7-8650U, UHD Graphics 620. My main monitor I am trying to connect through DP is Samsung LCF27f398FWUXEN. The monitor and the DP cable works fine on my desktop. Secondary monitor, also connected to the dock, but through a VGA cable is a BenQ GL260.
Display Ports on the dock don't work. When I plug the cable in, the other screen goes dark (sometimes for too long), and then there is still no new monitor detected. Seems like the monitor detects the input, at least for short time. Also, I have seen in Fedora Display Settings the monitor pop out for a short time after connecting and then disappear. If I boot with DP cable already connected, there is no input on the monitor. And when I log in, the secondary monitor goes black in a similar way as when the DP cable gets connected.

2.
5.7.12-200

3.
It worked 4 months ago. I have not since tried to use Display Ports until now. I don't know what version it was.

4.
Plug in a DP cable into the ThinkPad Thunderbolt 3 Dock or boot up with the cable connected.

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
warning: /var/cache/dnf/rawhide-2d95c80a1fa0a67d/packages/kernel-5.8.0-1.fc33.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 45719a39: NOKEY
Fedora - Rawhide - Developmental packages for the next Fedora release   
GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-32-x86_64 (0x12C944D0) is already installed.
The GPG keys listed for the "Fedora - Rawhide - Developmental packages for the next Fedora release" repository are already installed but they are not correct for this package.

6. Are you running any modules that not shipped with directly Fedora's kernel?:
Not at the moment.

Comment 1 Lyude 2020-08-20 20:02:31 UTC
(In reply to Mark Menzynski from comment #0)
> Created attachment 1711722 [details]
> dmesg is a log with kernel parameters log_buf_len=50M drm.debug=0x116, state
> is an output of /sys/kernel/debug/dri/0/state after booting up with only VGA
> and DP cables connected
> 
> 1.
> I use a ThinkPad Thunderbolt 3 Dock with a ThinkPad T580, i7-8650U, UHD
> Graphics 620. My main monitor I am trying to connect through DP is Samsung
> LCF27f398FWUXEN. The monitor and the DP cable works fine on my desktop.
> Secondary monitor, also connected to the dock, but through a VGA cable is a
> BenQ GL260.
> Display Ports on the dock don't work. When I plug the cable in, the other
> screen goes dark (sometimes for too long), and then there is still no new
> monitor detected. Seems like the monitor detects the input, at least for
> short time. Also, I have seen in Fedora Display Settings the monitor pop out
> for a short time after connecting and then disappear. If I boot with DP
> cable already connected, there is no input on the monitor. And when I log
> in, the secondary monitor goes black in a similar way as when the DP cable
> gets connected.
> 
> 2.
> 5.7.12-200
> 
> 3.
> It worked 4 months ago. I have not since tried to use Display Ports until
> now. I don't know what version it was.
> 
> 4.
> Plug in a DP cable into the ThinkPad Thunderbolt 3 Dock or boot up with the
> cable connected.
> 
> 5. Does this problem occur with the latest Rawhide kernel? To install the
>    Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
>    ``sudo dnf update --enablerepo=rawhide kernel``:
> warning:
> /var/cache/dnf/rawhide-2d95c80a1fa0a67d/packages/kernel-5.8.0-1.fc33.x86_64.
> rpm: Header V4 RSA/SHA256 Signature, key ID 45719a39: NOKEY
> Fedora - Rawhide - Developmental packages for the next Fedora release   
> GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-32-x86_64 (0x12C944D0)
> is already installed.
> The GPG keys listed for the "Fedora - Rawhide - Developmental packages for
> the next Fedora release" repository are already installed but they are not
> correct for this package.

heh, tried these instructions in a container and fedora-repos-rawhide definitely seems to be broken, since they specify the gpgkey for each repository using $releasever instead of hardcoding it to rawhide, which because you're not on rawhide evaluates to 32 - causing it top try to verify the packages signed with the rawhide gpg key against the f32 gpg key, which of course fails. I'll go make a merge request on pagure to fix this.

Anyway, workaround: add --nogpgcheck to the dnf update command and try again. Let me know if a rawhide kernel actually ends up fixing this, in the mean time I'm going to take a closer look at the dmesg you linked here and see if I can come up with any ideas/patches


> 
> 6. Are you running any modules that not shipped with directly Fedora's
> kernel?:
> Not at the moment.

Comment 2 Lyude 2020-08-21 16:45:19 UTC
OK - squinted very hard at your log for a while and I've noticed a couple of things

* The hub never reports more then one monitor being connected:

[    3.634388] [drm:drm_dp_send_link_address [drm_kms_helper]] link address reply: 4
[    3.634394] [drm:drm_dp_send_link_address [drm_kms_helper]] port 0: input 1, pdt: 1, pn: 0, dpcd_rev: 00, mcs: 1, ddps: 1, ldps 0, sdp 0/0
[    3.634399] [drm:drm_dp_send_link_address [drm_kms_helper]] port 1: input 0, pdt: 0, pn: 1, dpcd_rev: 00, mcs: 0, ddps: 0, ldps 0, sdp 0/0
[    3.634404] [drm:drm_dp_send_link_address [drm_kms_helper]] port 2: input 0, pdt: 0, pn: 2, dpcd_rev: 00, mcs: 0, ddps: 0, ldps 0, sdp 0/0
[    3.634409] [drm:drm_dp_send_link_address [drm_kms_helper]] port 3: input 0, pdt: 4, pn: 3, dpcd_rev: 00, mcs: 0, ddps: 1, ldps 1, sdp 1/1


(ldps = legacy device plug status, ddps = displayport device plug status, the only two ports that seem to be connected are the input port (which is expected, that's your laptop) and the VGA port. I remember you mentioning to me that you weren't sure if this was an issue with the dock, and I'm starting to become a bit suspicious the issue is something hardware related as well.

I've got a couple of ideas for us to try:

* You have probably already tried this but just to be sure: try using a different displayport on the dock
* Try the rawhide kernel with the instructions I suggested, although I expect it might not fix it
* Let's get another log exactly like the one you posted here, but instead let's try a couple different scenarios here:

  * Boot up with only the VGA monitor connected to the dock, then connect the DP connector to the hub after booting, wait a little bit, then grab me the dmesg in the same manner you did before
  * Boot up with only the DP monitor connected to the dock, and do the same thing but with the VGA adapter this time

Comment 3 Mark Menzynski 2020-08-24 11:15:26 UTC
(In reply to Lyude from comment #2)
> * You have probably already tried this but just to be sure: try using a
> different displayport on the dock
Yes, I tried, and now again.

> * Try the rawhide kernel with the instructions I suggested, although I
> expect it might not fix it
Nothing changed with the rawhide kernel.

> * Let's get another log exactly like the one you posted here, but instead
> let's try a couple different scenarios here:
> 
>   * Boot up with only the VGA monitor connected to the dock, then connect
> the DP connector to the hub after booting, wait a little bit, then grab me
> the dmesg in the same manner you did before
>   * Boot up with only the DP monitor connected to the dock, and do the same
> thing but with the VGA adapter this time

So with only VGA connected, I realized that one of the patterns is now recurrent.
If I only boot with VGA, grub is okay, and until I log in into my user account. At that point, screen goes black, and it probably goes into a suspend mode, I think. The power button on a dock is slowly blinking, in a breathing way. Now I need to press the power button to bring it out of the suspend mode. Now power button is glowing, which means the system is running. But screen is still black. What I need to do now to get an image on a screen is 1. reconnect VGA, 2. connect a new working display connection. I will provide an attachment with few of the scenarios with logs right after sending this.

About the DP scenario, could you please elaborate more? I could keep VGA connected screen plugged in to set up the kernel parameters, disconnect the monitor, confirm changes, and at some point connect back the secondary monitor. But I need to know when. I could probably enter the decryption password and log in to the user account without any image on a screen.

Comment 4 Mark Menzynski 2020-08-24 11:20:58 UTC
Created attachment 1712338 [details]
dmesg#2 of new scenarios

Booting with only VGA, after screen going black when loggin in, returning from suspend mode by pressing power button
- vga-black-hdmi is after returning from suspend mode connecting a HDMI
- vga-black-vga-replug is after returning from suspend mode, disconnecting the VGA and connecting it back
- vga-black-vga-replug-dp is after returning from suspend mode, disconnecting VGA and connecting it back, then connecting the DP

Comment 5 Lyude 2020-08-25 21:21:24 UTC
(In reply to Mark Menzynski from comment #3)
> (In reply to Lyude from comment #2)
> > * You have probably already tried this but just to be sure: try using a
> > different displayport on the dock
> Yes, I tried, and now again.
> 
> > * Try the rawhide kernel with the instructions I suggested, although I
> > expect it might not fix it
> Nothing changed with the rawhide kernel.
> 
> > * Let's get another log exactly like the one you posted here, but instead
> > let's try a couple different scenarios here:
> > 
> >   * Boot up with only the VGA monitor connected to the dock, then connect
> > the DP connector to the hub after booting, wait a little bit, then grab me
> > the dmesg in the same manner you did before
> >   * Boot up with only the DP monitor connected to the dock, and do the same
> > thing but with the VGA adapter this time
> 
> So with only VGA connected, I realized that one of the patterns is now
> recurrent.
> If I only boot with VGA, grub is okay, and until I log in into my user
> account. At that point, screen goes black, and it probably goes into a
> suspend mode, I think. The power button on a dock is slowly blinking, in a
> breathing way. Now I need to press the power button to bring it out of the
> suspend mode. Now power button is glowing, which means the system is
> running. But screen is still black. What I need to do now to get an image on
> a screen is 1. reconnect VGA, 2. connect a new working display connection. I
> will provide an attachment with few of the scenarios with logs right after
> sending this.

OK-that's useful to know. it seemed like from the logs that you sent me in the past that you've been booting your system up with the lid closed. So it sounds like between boot and when you log into your user session it's seeing the VGA display, then when you log in it suddenly doesn't detect it. My guess is that it's getting reprobed just because of gnome-shell starting up. I'll see if I can figure out anything from the logs that you've got me, but definitely don't be surprised if I need to ask for more.

> 
> About the DP scenario, could you please elaborate more? I could keep VGA
> connected screen plugged in to set up the kernel parameters, disconnect the
> monitor, confirm changes, and at some point connect back the secondary
> monitor. But I need to know when. I could probably enter the decryption
> password and log in to the user account without any image on a screen.

So: first off for all the scenarios I think it would make things easier if you kept your laptop's screen open, so it doesn't go into suspend immediately if it stops detecting the VGA display. Coincidentally, the logs you gave me actually pointed out another bug that seems to be happening here where gnome-shell doesn't restore the display mode properly on resume (I'll add a link to the upstream bug I filed for this in a second). I'm pretty confident if we can fix the issue with it losing the display after logging in, the laptop should also stop going into suspend after you've logged in.

As for when to plug in the displays: I would just plug each combination of displays I gave before you turn on the laptop, add the kernel command line parameters I gave you when you're in grub (drm.debug=0x116 log_buf_len=50M), and then leave them plugged in until you log in and the screen goes black (if that's not possible, unplugging them shortly after you log in should be fine). Then, grab the dmesg afterwards.

Comment 6 Lyude 2020-08-25 21:23:30 UTC
Oh also - just setting NEEDINFO here until I get the new logs, but I'll look at what I've gotten from you in the mean time.

Comment 7 Mark Menzynski 2020-09-08 11:12:38 UTC
Created attachment 1714073 [details]
dmesg#3

DP-then-VGA - Booted with DP connected and laptop lid open. After logging in connecting in VGA and saving logs
VGA-then-DP - Same but booting with VGA, and connecting DP after

Comment 8 Lyude 2020-09-09 16:35:28 UTC
(In reply to Mark Menzynski from comment #7)
> Created attachment 1714073 [details]
> dmesg#3
> 
> DP-then-VGA - Booted with DP connected and laptop lid open. After logging in
> connecting in VGA and saving logs
> VGA-then-DP - Same but booting with VGA, and connecting DP after

Thanks - I'll try to take a look at this this week

Comment 9 Mark Menzynski 2020-10-02 11:03:18 UTC
I have moved into an office. And here DisplayPorts on NEC E231W monitor work just fine.


Note You need to log in before you can comment on or make changes to this bug.