Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression with external monitors using 5.17. surface kernel series and Microsoft Dock 2 #834

Closed
Corben78 opened this issue May 25, 2022 · 11 comments

Comments

@Corben78
Copy link

Corben78 commented May 25, 2022

Using a Microsoft Dock 2 and two external monitors via USB-C to HDMI adapters and kernel 5.17.9-surface causes the external display to stay dark when booting fresh. Happens also with 5.17.5-surface. The monitors do flicker from time to time, maybe shortly the image will be shown, but in general nothing is displayed. Booting from a working setting, they are still shown in the gnome settings, but trying to detach and re-attach them shows errors in dmesg.. Works with 5.16. surface kernel series and older.

Environment

  • Hardware model: Surface Pro 7
  • Kernel version: Linux surfacepro7 5.17.9-surface #1 SMP PREEMPT Sat May 21 02:11:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Distribution: Ubuntu 20.04.4 LTS

Dmesg output

dmesg-5.17.9-surface.txt
When re-attaching:

[   74.626593] usb 3-1.4: USB disconnect, device number 7
[   83.687944] i915 0000:00:02.0: [drm] *ERROR* mstb 0000000033ef1eba port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed
[   83.701281] i915 0000:00:02.0: [drm] *ERROR* mstb 0000000033ef1eba port 3: DPCD read on addr 0x4b0 for 1 bytes NAKed
[   91.513507] usb 3-1.4: new full-speed USB device number 15 using xhci_hcd
[   91.649042] usb 3-1.4: New USB device found, idVendor=045e, idProduct=094f, bcdDevice= 0.00
[   91.649052] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   91.649055] usb 3-1.4: Product: Microsoft Surface USB-C to HDMI 2.0 Adapter
[   91.649058] usb 3-1.4: Manufacturer: Microsoft
[   91.661052] hid-generic 0003:045E:094F.000A: hiddev0,hidraw1: USB HID v1.11 Device [Microsoft Microsoft Surface USB-C to HDMI 2.0 Adapter] on usb-0000:00:14.0-1.4/input1
[   92.665734] i915 0000:00:02.0: [drm] *ERROR* GUID check on 10:01 failed: -5
[   98.699770] i915 0000:00:02.0: [drm] *ERROR* mstb 0000000033ef1eba port 3: DPCD read on addr 0x4b0 for 1 bytes NAKed
[  104.066433] usb 3-1.1.4: USB disconnect, device number 8
[  113.716911] i915 0000:00:02.0: [drm] *ERROR* mstb 0000000033ef1eba port 2: DPCD read on addr 0x4b0 for 1 bytes NAKed
[  113.723755] i915 0000:00:02.0: [drm] *ERROR* mstb 0000000033ef1eba port 3: DPCD read on addr 0x4b0 for 1 bytes NAKed
[  137.597797] usb 3-1.1.4: new full-speed USB device number 16 using xhci_hcd
[  137.732625] usb 3-1.1.4: New USB device found, idVendor=045e, idProduct=094f, bcdDevice= 0.00
[  137.732634] usb 3-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  137.732637] usb 3-1.1.4: Product: Microsoft Surface USB-C to HDMI 2.0 Adapter
[  137.732639] usb 3-1.1.4: Manufacturer: Microsoft
[  137.746164] hid-generic 0003:045E:094F.000B: hiddev1,hidraw2: USB HID v1.11 Device [Microsoft Microsoft Surface USB-C to HDMI 2.0 Adapter] on usb-0000:00:14.0-1.1.4/input1
[  138.816298] i915 0000:00:02.0: [drm] *ERROR* GUID check on 00:02 failed: -5
[  145.715518] i915 0000:00:02.0: [drm] *ERROR* mstb 0000000033ef1eba port 3: DPCD read on addr 0x4b0 for 1 bytes NAKed

The same errors occur though on kernel 5.16. and the monitors are not recognized again after re-attaching from the dock itself. Disconnecting the Dock completely and re-attaching it with the monitors attached makes them re-appear on kernel 5.16., and also on 5.17. But not when doing a fresh boot. Looks like some initialization is going wrong.

@NickyTope
Copy link

I have similar issues and i915 drm errors using a Dock 2 with my Surface Book 3. the monitors are recognised and show in xrandr but have no output. Same issue using latest kernel.

I have switched to linux-lts and nvidia-lts to get anything to work in the meantime, am happy to post more logs / info if needed.

@Corben78
Copy link
Author

Unfortunately this is still an issue with Kernel 5.19.

@charlie-haley
Copy link

This is an upstream kernel issue, there's some more info here NVIDIA/open-gpu-kernel-modules#256

@Corben78
Copy link
Author

I guess the nVidia issue is not related to my Surface Pro 7 with only integrated Intel graphics.

@charlie-haley
Copy link

I guess the nVidia issue is not related to my Surface Pro 7 with only integrated Intel graphics.

Ah sorry, I missed that part, I had a similar issue to @NickyTope with my SB3!

@Corben78
Copy link
Author

Looks like external monitors via the Dock 2 are working for me with 5.19.13-surface.
Can't say since when it works, as I've used 5.16.17-surface now for a long time, but currently that issue is solved.
The issue that 1600x1024 can be selected, but doesn't work as mentioned in #737 still persists (but for me 1680x1050 is fine too).

@Corben78
Copy link
Author

Looks like I was wrong. Today a cold boot didn't bring up the external displays again. Booting 5.16.17-surface or even 5.15.0-52-generic (currenty official Ubuntu HWE kernel on 20.04) works though.
Haven't figured out yet what I did yesterday to have it working properly with 5.19.13-surface... still looks like some kind of initialization issue.

@Corben78
Copy link
Author

Today I found out it seems related to cdc_ether. At least that's the symptom:
If I unload the module with sudo modprobe -r cdc_ether, the monitors are immediately turning on. If I load the module with sudo modprobe cdc_ether, the monitors show colorful pixels for a moment and turn off. When I unplug the ethernet cable, the monitors turn on again.

At some point after Kernel 5.16.17-surface this regressions seems have been introduced.

@Corben78
Copy link
Author

After realizing it's related to cdc_ether, and coincidentally getting a notification about this bug report no connection anymore with r8152 on 4.13.0-26, which lead me to USB 3.0 ethernet adapter not working I'm testing now this kernel parameter:
usbcore.quirks=045e:09a0:k
So far no issues.

The USB ID is from the output of lsbusb -v of the Microsoft Dock 2:

lsusb -v
Bus 003 Device 006: ID 045e:09a0 Microsoft Corp. USB2 Hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x045e Microsoft Corp.
  idProduct          0x09a0 
  bcdDevice           31.01
  iManufacturer           1 Microsoft
  iProduct                2 USB 10/100/1000 LAN
  iSerial                 6 1016EE9A9
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              350mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval               8
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0050
    bNumInterfaces          2
    bConfigurationValue     2
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              350mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      6 Ethernet Networking
      bInterfaceProtocol      0 
      iInterface              5 CDC Communications Control
      CDC Header:
        bcdCDC               1.10
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      CDC Ethernet:
        iMacAddress                      3 F01DBCA0BFF4
        bmEthernetStatistics    0x00000000
        wMaxSegmentSize               1514
        wNumberMCFilters            0x0000
        bNumberPowerFilters              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              4 Ethernet Data
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x0016
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000006
      BESL Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x02
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   2
      Lowest fully-functional device speed is High Speed (480Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
Device Status:     0x0000
  (Bus Powered)

Info about the usbcore.quirks can be found here: [PATCH v3] usb: core: Add "quirks" parameter for usbcore

I'm not sure if this is just pure luck, or if there is more to it. I'm still testing with now kernel 6.0.12-surface on Ubuntu 20.04 LTS, but so far the external monitors are initialized correctly

@Corben78
Copy link
Author

Corben78 commented Mar 6, 2023

Looks like I cheered to soon with the additional usbcore quirk parameter. I didn't work the next day anymore.
But I upgraded now to kernel 6.2.2-surface and it just works. External monitors are initialized correctly on boot.
I still cannot select 1600x1024 as resolution without breaking it, but I got now used to 1680x1050.

Will close this issue in a few days, if this problem doesn't come back.

@Corben78
Copy link
Author

Corben78 commented Apr 4, 2023

No real problems anymore since kernel 6.2.2-surface. Worked with 6.2.6 and now with 6.2.8.
Sometimes after sleep one of my 2 monitors connected to the microsoft dock 2 doesn't wake up, but a power cycle helps then.
Closing this issue.

@Corben78 Corben78 closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants