Bug 1896904 - External USB Monitor shown as Built-in Display
Summary: External USB Monitor shown as Built-in Display
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 33
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1902079 (view as bug list)
Depends On: 1891782
Blocks: 1816645 1816768
TreeView+ depends on / blocked
 
Reported: 2020-11-11 19:51 UTC by David Ober
Modified: 2021-04-29 08:43 UTC (History)
37 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1891782
Environment:
Last Closed: 2021-04-29 08:43:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
debug info when USB-C monitor cable connected to P15 TBT port (14.25 KB, text/plain)
2020-11-18 18:18 UTC, Mark Pearson
no flags Details
debug information when HDMI connection used (14.25 KB, text/plain)
2020-11-18 18:19 UTC, Mark Pearson
no flags Details
Dmesg log from P15 (98.78 KB, text/plain)
2020-11-25 15:50 UTC, Mark Pearson
no flags Details
test.patch (1.53 KB, patch)
2020-11-26 20:00 UTC, Karol Herbst
no flags Details | Diff
display settings looking good (151.94 KB, image/png)
2020-11-27 04:09 UTC, Mark Pearson
no flags Details
dmesg log with succesful and unsuccessful monitor attach (105.96 KB, text/plain)
2020-11-27 04:10 UTC, Mark Pearson
no flags Details
dmesg log (105.73 KB, text/plain)
2020-11-27 14:42 UTC, Mark Pearson
no flags Details
dmesg after suspend/resume with nouveau.runpm=0 (117.52 KB, text/plain)
2020-11-27 17:29 UTC, Mark Pearson
no flags Details

Description David Ober 2020-11-11 19:51:51 UTC
+++ This bug was initially created as a clone of Bug #1891782 +++

Description of problem: Plug an external monitor into the thunderbolt USB port and it shows up as a Built-in Display in GNOME, this can be either direct connect or through a TBT3 dock


Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. Connect monitor via USB-C port on P1G3 Laptop
2. OPen Gnome and look at displays
3.

Actual results: shows as built-in


Expected results: show as a ThinkVision P32U


Additional info:  Also attempt to switch to external only display logs you out while in this configuration which is how I found this issue

--- Additional comment from David Ober on 2020-11-11 19:49:53 UTC ---

update, this is a nouveau only issue as it works properly when using the nvidia driver

Comment 1 Mark Pearson 2020-11-18 14:54:46 UTC
@dober - collect xrandr output
grep . /sys/class/drm/*/enabled

Comment 2 Mark Pearson 2020-11-18 18:18:10 UTC
I was able to reproduce this on the P15 as well. 
I'll attach two logs - one with xrandr and /sys/class/drm output for the USB-C into a thunderbolt port case and one where HDMI was used.

Comment 3 Mark Pearson 2020-11-18 18:18:43 UTC
Created attachment 1730641 [details]
debug info when USB-C monitor cable connected to P15 TBT port

Comment 4 Mark Pearson 2020-11-18 18:19:08 UTC
Created attachment 1730642 [details]
debug information when HDMI connection used

Comment 5 Benjamin Berg 2020-11-18 18:50:08 UTC
Yeah, not surprising.

grep . /sys/class/drm/*/enabled
/sys/class/drm/card0-eDP-1/enabled:enabled
/sys/class/drm/card1-DP-1/enabled:disabled
/sys/class/drm/card1-eDP-2/enabled:disabled
/sys/class/drm/card1-eDP-3/enabled:disabled
/sys/class/drm/card1-eDP-4/enabled:enabled
/sys/class/drm/card1-HDMI-A-1/enabled:disabled

On HDMI, it is clear, but here the external display is on card1-eDP-4 where eDP is embedded DisplayPort (i.e. for internal displays).

So, I think this is a nouveau kernel driver issue. CC'ing Karol.

Comment 6 Ben Skeggs 2020-11-25 09:54:52 UTC
Can you post the kernel log from loading nouveau on this system please?

Comment 7 Mark Pearson 2020-11-25 15:50:31 UTC
Created attachment 1733389 [details]
Dmesg log from P15

Comment 8 Mark Pearson 2020-11-25 15:52:57 UTC
dmesg-p15 attachment goes with the P15 system showing this issue:

[root@localhost banther]# grep . /sys/class/drm/*/enabled
/sys/class/drm/card0-eDP-1/enabled:enabled
/sys/class/drm/card1-DP-1/enabled:disabled
/sys/class/drm/card1-eDP-2/enabled:disabled
/sys/class/drm/card1-eDP-3/enabled:disabled
/sys/class/drm/card1-eDP-4/enabled:enabled
/sys/class/drm/card1-HDMI-A-1/enabled:disabled

Let me know if there is anything else useful I can collect or try
Thanks
Mark

Comment 9 Karol Herbst 2020-11-25 16:54:29 UTC
(In reply to Mark Pearson from comment #7)
> Created attachment 1733389 [details]
> Dmesg log from P15

the

> [    2.962909] nouveau 0000:01:00.0: DRM: unknown connector type 48
> [    2.962942] nouveau 0000:01:00.0: DRM: unknown connector type 48
> [    2.962976] nouveau 0000:01:00.0: DRM: unknown connector type 48

stands out. And checking with the docs we got from Nvidia 48 is "0x48 = DisplayPort (Mini) External Connector" which seems to match here.

Ben I assume you already know where and what to fix? Otherwise I can probably also came up with a patch and build to test.

Comment 10 Karol Herbst 2020-11-26 20:00:58 UTC
Created attachment 1733873 [details]
test.patch

no idea if this just works, but something along those lines is what we need. I suspect there might be more we have to change.. maybe not.

Can anybody with an affected machine give it a try? I don't think any of my laptops have this issue.

Comment 11 Jonas Ådahl 2020-11-26 21:39:40 UTC
*** Bug 1902079 has been marked as a duplicate of this bug. ***

Comment 12 Mark Pearson 2020-11-27 04:09:40 UTC
Created attachment 1733988 [details]
display settings looking good

Comment 13 Mark Pearson 2020-11-27 04:10:21 UTC
Created attachment 1733989 [details]
dmesg log with succesful and unsuccessful monitor attach

Comment 14 Mark Pearson 2020-11-27 04:13:39 UTC
Hi Karol,

I tried out the patch - I think it likely cures the issue, unfortunately I did see something else but my suspicion is it's a different problem.

The good bit first: The monitor is correctly detected (see the .png) and I was able to remove and reattach and the display continued to work. You should see this event in the dmesg log.

Unfortunately on the 2nd remove/attach I got a nouveau timeout and then everything stops working. I think it might be a separate issue as I also saw this issue on the first boot with no monitor attached. Let me know if you want a separate bug or any debug information to help with that.

Thanks for the patch - definitely a big step forward

mark

Comment 15 Karol Herbst 2020-11-27 10:38:43 UTC
(In reply to Mark Pearson from comment #13)
> Created attachment 1733989 [details]
> dmesg log with succesful and unsuccessful monitor attach

huh, it seems like that this is with a stock fedora kernel.

And I still see the 

> [    2.269719] nouveau 0000:01:00.0: DRM: unknown connector type 48
> [    2.269786] nouveau 0000:01:00.0: DRM: unknown connector type 48
> [    2.269824] nouveau 0000:01:00.0: DRM: unknown connector type 48

messages.

Are you sure you compiled the kernel with the patch and booted into the correct one?

Comment 16 Mark Pearson 2020-11-27 14:42:03 UTC
Created attachment 1734132 [details]
dmesg log

Sorry - perils of doing things late at night. Somehow I either collected or uploaded the wrong log. This version should be correct

It should show booting succesfully, and the first remove/insert working. The second remove/insert gives a timeout and everything stops working after.

Apologies for the goof. Let me know if you need anything else
Mark

Comment 17 Karol Herbst 2020-11-27 15:53:48 UTC
(In reply to Mark Pearson from comment #16)
> Created attachment 1734132 [details]
> dmesg log
> 
> Sorry - perils of doing things late at night. Somehow I either collected or
> uploaded the wrong log. This version should be correct
> 
> It should show booting succesfully, and the first remove/insert working. The
> second remove/insert gives a timeout and everything stops working after.
> 
> Apologies for the goof. Let me know if you need anything else
> Mark

it looks like something goes wrong in the device suspend path with the firmware unloading. I'd assume that booting with nouveau.runpm=0 would workaround the issue. Mind checking that?

Thanks.

Comment 18 Mark Pearson 2020-11-27 16:08:33 UTC
No problems. using nouveau.runpm=0 is good as a workaround - tried a bunch of times and it worked beautifully. I assume that kills power management though :)
Mark

Comment 19 Karol Herbst 2020-11-27 16:40:51 UTC
(In reply to Mark Pearson from comment #18)
> No problems. using nouveau.runpm=0 is good as a workaround - tried a bunch
> of times and it worked beautifully. I assume that kills power management
> though :)
> Mark

glad to hear. Yeah, although it's not really a power management issue, but related to the firmware we load to the GPU. I don't think I've encountered that issue yet on my own. Any idea if other laptops are affected by the same problem?

Anyway, will send out the patch so we can get at least the display stuff fixed. Do you mind if I add your Tested-by: Tag?

Ben, are you aware of any GPUs with that gr unloading issue?

Comment 20 Mark Pearson 2020-11-27 17:29:23 UTC
I'll have to check on the other laptops - I don't think it was reported on the P1G3 which has just completed it's run through test with Fedora (my P1G3 doesn't have an Nvidia card to confirm with). My guess is it will show up on the P17 as well, but I'm just guessing and we don't have a Fedora release there so it might get missed. I'll do some double checking and of course holler if there are things we can try.
As a note - I just suspend/resumed this and saw the issue come back (I'll upload a new dmesg, but it looks like the same trace) so the nouveau.rpm=0 isn't a full workaround either :(

No problem on the Tested-by tag (please use markpearson - it's my open source friendly email account)

Mark

Comment 21 Mark Pearson 2020-11-27 17:29:59 UTC
Created attachment 1734180 [details]
dmesg after suspend/resume with nouveau.runpm=0

Comment 22 Karol Herbst 2020-11-27 18:19:22 UTC
(In reply to Mark Pearson from comment #20)
> I'll have to check on the other laptops - I don't think it was reported on
> the P1G3 which has just completed it's run through test with Fedora (my P1G3
> doesn't have an Nvidia card to confirm with). My guess is it will show up on
> the P17 as well, but I'm just guessing and we don't have a Fedora release
> there so it might get missed. I'll do some double checking and of course
> holler if there are things we can try.
> As a note - I just suspend/resumed this and saw the issue come back (I'll
> upload a new dmesg, but it looks like the same trace) so the nouveau.rpm=0
> isn't a full workaround either :(
> 

yeah, not surprised by that. Mind opening a new bug for that, so we can close this one once the fixes land for the eDP vs mDP issue? Thanks.

> No problem on the Tested-by tag (please use markpearson - it's my
> open source friendly email account)
> 
> Mark

Comment 23 David Ober 2020-11-30 11:40:38 UTC
clearing my need info flag as Mark has provided it

Comment 24 Mark Pearson 2020-11-30 17:51:18 UTC
I created https://bugzilla.redhat.com/show_bug.cgi?id=1902798 to track the timeout issue.
Thanks
Mark

Comment 25 Karol Herbst 2021-04-27 15:01:26 UTC
I think we can close this bug now, no?

Comment 26 Mark Pearson 2021-04-27 20:01:53 UTC
Yes. Moving to verified - I assume you close it? Or do I?

Comment 27 Karol Herbst 2021-04-29 08:43:03 UTC
yeah, I think I just close it then :) Bug was fixed inside kernel 5.10.20 and 5.11.3, and Fedora 33 shipped 5.10.20 and later 5.11.7.


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