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

[drm] *ERROR* mstb 0000000057b5b857 port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed #4284

Closed
kdj0c opened this issue Feb 14, 2022 · 9 comments
Labels

Comments

@kdj0c
Copy link

kdj0c commented Feb 14, 2022

Describe the bug

When fwupd is running, when I plug a monitor on my lenovo dock, I get the following kernel error on dmesg:
[drm] ERROR mstb 0000000057b5b857 port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed

This is caused by the mst-synaptic plugin, which tries to read at 0x4b0 (REG_RC_CAP)

When looking at the code, https://github.com/fwupd/fwupd/blob/main/plugins/synaptics-mst/fu-synaptics-mst-device.c#L1299
It first read 1 byte at 0x4b0 and then check the vendor ID at 0x500 (REG_VENDOR_ID).

According to DP specification, 0x500 is the generic address for IEEE_OUI vendor identifier, and 0x4b0 is proprietary, and may not be implemented on all devices. (so may generate errors in kernel).

So I think the logic should be to first read at 0x500, and if the vendor is synaptic, then it is safe to read at 0x4b0.

The current logic is a bit weird because if the byte read at 0x4b0 (& 0x04), then it won't check the vendor id ?

Steps to Reproduce

Use a ThinkPad Thunderbolt 3 Dock Gen 2 , and connect anything on hdmi/display port.
(and I use the integrated Intel graphics of my laptop).

if you search on google for "DPCD read on addr 0x4b0", it is affecting a lot of people.

Expected behavior

Kernel should not complain on dmesg, when fwupd scan the devices.

fwupd version information

client version: 1.7.4
compile-time dependency versions
gusb: 0.3.9

daemon version: 1.7.4

installed with dnf

fwupd device information

20TJS53A39

├─CometLake-H GT2 [UHD Graphics]:
│ Device ID: 5792b48846ce271fab11c4a545f7a3df0d36e00a
│ Current version: 05
│ Vendor: Intel Corporation (PCI:0x8086)
│ GUIDs: 07168636-0f3b-565c-8fe1-0f0a77d82cd8
│ 5fde5d20-db24-5f21-afdd-247c1bf1efa1
│ 6c3dbf6c-4e6f-5309-9954-c5ab7aca617e
│ 3777783a-3f83-56a5-95f4-533eb6a2bd19
│ Device Flags: • Internal device
│ • Cryptographic hash verification is available

├─Core™ i7-10850H CPU @ 2.70GHz:
│ Device ID: 4bde70ba4e39b28f9eab1628f9dd6e6244c03027
│ Current version: 0x000000ec
│ Vendor: Intel
│ GUIDs: b9a2dd81-159e-5537-a7db-e7101d164d3f
│ 30249f37-d140-5d3e-9319-186b1bd5cac3
│ a45b0522-5722-54bd-b802-86cd044262df
│ 7b9b6e8c-226c-5db6-86cb-ea3187578013
│ Device Flags: • Internal device

├─Embedded Controller:
│ Device ID: 2292ae5236790b47884e37cf162dcf23bfcd1c60
│ Summary: UEFI ESRT device
│ Current version: 0.1.8
│ Minimum Version: 0.1.8
│ Vendor: Lenovo (DMI:LENOVO)
│ Update State: Success
│ Update Error: Cannot install update when the lid is closed
│ GUIDs: b616d3d6-cca9-40bd-964e-b86ffb62744d
│ 56ee8ee1-8935-5d75-9ede-2ab1422d642e
│ Device Flags: • Internal device
│ • System requires external power source
│ • Supported on remote server
│ • Needs a reboot after installation
│ • Device is usable for the duration of the update
│ • Updatable

├─Integrated Camera:
│ Device ID: 0fef0a0c55f6442bffaebd774ae771341c89571b
│ Current version: 58.18
│ Vendor: Chicony Electronics Co.,Ltd. (USB:0x04F2)
│ GUIDs: 08c6b922-0e9b-5283-9e1a-2f5a549abf8e
│ 95b07a8e-2063-5025-80b5-1fcf4ca8e9e3
│ Device Flags: • Updatable

├─Intel Management Engine:
│ Device ID: 349bb341230b1a86e5effe7dfe4337e1590227bd
│ Summary: UEFI ESRT device
│ Current version: 225.53.1649
│ Minimum Version: 0.0.1
│ Vendor: Lenovo (DMI:LENOVO)
│ Update State: Success
│ Update Error: Cannot install update when the lid is closed
│ GUIDs: 5695cc48-4f4f-4677-8ffb-9f496d3ad9d3
│ 3ef35d3b-ceeb-5e27-8c0a-ac25f90367ab
│ Device Flags: • Internal device
│ • System requires external power source
│ • Supported on remote server
│ • Needs a reboot after installation
│ • Device is usable for the duration of the update
│ • Updatable

├─MZVLB1T0HBLR-000L7:
│ Device ID: 08e1798bf5d9cb56a0290b552cab6c1a371b5089
│ Summary: NVM Express solid state drive
│ Current version: 5M2QEXF7
│ Vendor: Samsung (NVME:0x144D)
│ GUIDs: 0b4d773a-7ac3-58c1-a541-e22ef1cdfe02
│ c9d531ea-ee7d-5562-8def-c64d0d144813
│ 6e54c992-d302-59ab-b454-2d26ddd63e6d
│ 47335265-a509-51f7-841e-1c94911af66b
│ b77af583-f45c-537c-8584-fc5d1c80fa20
│ Device Flags: • Internal device
│ • Updatable
│ • System requires external power source
│ • Supported on remote server
│ • Needs a reboot after installation
│ • Device is usable for the duration of the update

├─Prometheus:
│ │ Device ID: d432baa2162a32c1554ef24bd8281953b9d07c11
│ │ Summary: Fingerprint reader
│ │ Current version: 10.01.3224691
│ │ Vendor: Synaptics (USB:0x06CB)
│ │ Install Duration: 2 seconds
│ │ GUIDs: 09e8bf16-3e69-50f5-bb66-c7a040248352
│ │ 8088f861-6318-5b1e-9ce4-fbddbedb09ac
│ │ Device Flags: • Updatable
│ │ • Supported on remote server
│ │ • Cryptographic hash verification is available
│ │
│ └─Prometheus IOTA Config:
│ Device ID: 8dcffb5d059857368caa2b7b22371ebd831b0c0c
│ Summary: Fingerprint reader config
│ Current version: 0030
│ Minimum Version: 0030
│ Vendor: Synaptics (USB:0x06CB)
│ GUIDs: 7c5a1e62-38fa-5859-9337-09dbac6377e4
│ 8177bb07-fa98-5bdb-a55d-bdc0fa95535b
│ Device Flags: • Updatable
│ • Supported on remote server
│ • Only version upgrades are allowed

├─System Firmware:
│ │ Device ID: a45df35ac0e948ee180fe216a5f703f32dda163f
│ │ Summary: UEFI ESRT device
│ │ Current version: 0.1.19
│ │ Minimum Version: 0.1.0
│ │ Vendor: Lenovo (DMI:LENOVO)
│ │ Update State: Success
│ │ Update Error: Cannot install update when the lid is closed
│ │ GUIDs: 6e58e73d-8061-44e4-8949-33b7f0d5c726
│ │ 230c8b18-8d9b-53ec-838b-6cfc0383493a
│ │ 0e91d507-ea0c-5543-9850-204d9a6635c7
│ │ Device Flags: • Internal device
│ │ • System requires external power source
│ │ • Supported on remote server
│ │ • Needs a reboot after installation
│ │ • Cryptographic hash verification is available
│ │ • Device is usable for the duration of the update
│ │ • Updatable
│ │
│ ├─Intel AMT [unprovisioned]:
│ │ Device ID: e2623122c99d58220498aacbfcfdb1baebbae3c5
│ │ Summary: Hardware and firmware technology for remote out-of-band management
│ │ Current version: 14.1.53.1649
│ │ Bootloader Version:14.1.53.1649
│ │ Vendor: Intel Corporation
│ │ GUID: 2800f812-b7b4-2d4b-aca8-46e0ff65814c
│ │ Device Flags: • Internal device
│ │
│ └─UEFI dbx:
│ Device ID: 362301da643102b9f38477387e2193e57abaa590
│ Summary: UEFI revocation database
│ Current version: 77
│ Minimum Version: 77
│ Vendor: UEFI:Linux Foundation
│ Install Duration: 1 second
│ GUIDs: 14503b3d-73ce-5d06-8137-77c68972a341
│ 5971a208-da00-5fce-b5f5-1234342f9cf7
│ c6682ade-b5ec-57c4-b687-676351208742
│ f8ba2887-9411-5c36-9cee-88995bb39731
│ Device Flags: • Internal device
│ • Updatable
│ • Needs a reboot after installation
│ • Only version upgrades are allowed

├─TPM:
│ Device ID: c6a80ac3a22083423992a3cb15018989f37834d6
│ Current version: 1.258.0.0
│ Vendor: ST Microelectronics (TPM:STM)
│ GUIDs: ff71992e-52f7-5eea-94ef-883e56e034c6
│ 84df3581-f896-54d2-bd1a-372602f04c32
│ bfaed10a-bbc1-525b-a329-35da2f63e918
│ 70b7b833-7e1a-550a-a291-b94a12d0f319
│ 06f005e9-cb62-5d1a-82d9-13c534c53c48
│ Device Flags: • Internal device

├─ThinkPad Thunderbolt 3 Dock:
│ │ Device ID: b89da1ab2d1d7eb3e8b53306e63268f28b336d6e
│ │ Current version: 62.00
│ │ Vendor: Lenovo (THUNDERBOLT:0x0108, TBT:0x0108)
│ │ GUIDs: 45c1814e-eb83-5b03-8997-ef8d4d8ade29
│ │ 03b97e38-f4b8-5a19-917c-28f95ca29768
│ │ 75039175-c354-5df9-a798-5da41461c007
│ │ 39361084-a038-5757-976a-4d022a61d009
│ │ Device Flags: • Updatable
│ │ • System requires external power source
│ │ • Device stages updates
│ │
│ ├─USB2.0 Hub:
│ │ │ Device ID: 84d0e3f2a0f8b2328f7995767b23ebb40494723f
│ │ │ Summary: USB 3.x hub
│ │ │ Current version: 51.63
│ │ │ Vendor: VIA Labs, Inc. (USB:0x17EF)
│ │ │ Install Duration: 15 seconds
│ │ │ GUIDs: 35199e34-cf82-5b09-9287-622d225056e4
│ │ │ 8ee94f0e-9b44-596a-bdd9-6f90401664cc
│ │ │ 0987e3c9-b1ee-5763-ac6e-51329b034e4b
│ │ │ c7def18d-66ae-5531-924b-2020c3638181
│ │ │ 163cea66-5a78-58af-80ba-21be960aae5c
│ │ │ Device Flags: • Updatable
│ │ │ • Cryptographic hash verification is available
│ │ │ • Device stages updates
│ │ │ • Device can recover flash failures
│ │ │
│ │ └─USB2.0 Hub:
│ │ Device ID: 0b3c94fad31628e8adddaad723b8b6b5e24a9665
│ │ Summary: USB 3.x hub
│ │ Current version:51.33
│ │ Vendor: VIA Labs, Inc. (USB:0x17EF)
│ │ Install Duration:15 seconds
│ │ GUIDs: a023c536-1f42-5215-9b66-1d330c939426
│ │ 8ee94f0e-9b44-596a-bdd9-6f90401664cc
│ │ 1e96bd9e-b77e-5eb1-ba44-9c04a3d7c288
│ │ 62a3d808-c2b1-541c-911c-ebfaab1d3d86
│ │ 163cea66-5a78-58af-80ba-21be960aae5c
│ │ Device Flags: • Updatable
│ │ • Cryptographic hash verification is available
│ │ • Device stages updates
│ │ • Device can recover flash failures
│ │
│ └─USB3.1 Hub:
│ │ Device ID: 7e452eb6c025449c23b67d34f76de2b1fdf4c815
│ │ Summary: USB 3.x hub
│ │ Current version: 51.63
│ │ Vendor: VIA Labs, Inc. (USB:0x17EF)
│ │ Install Duration: 15 seconds
│ │ GUIDs: 8ee94f0e-9b44-596a-bdd9-6f90401664cc
│ │ 82aae1d4-67be-54c0-8256-ed2a7108650b
│ │ 8aab7e9b-2ae8-559b-9be0-49bf5a647a2a
│ │ a9866465-e1ec-5ce0-855d-162d817aeca2
│ │ 582b7d56-075b-511a-8f78-50d3b308b541
│ │ 11d69fae-4edd-5acf-be32-e66e07904f3c
│ │ Device Flags: • Updatable
│ │ • Cryptographic hash verification is available
│ │ • Device stages updates
│ │ • Device can recover flash failures
│ │
│ ├─USB3.1 Hub:
│ │ │ Device ID: e487b5ff307494d6ff44d1b6dc1312bb69b0fe90
│ │ │ Summary: USB 3.x hub
│ │ │ Current version:51.33
│ │ │ Vendor: VIA Labs, Inc. (USB:0x17EF)
│ │ │ Install Duration:15 seconds
│ │ │ GUIDs: 8ee94f0e-9b44-596a-bdd9-6f90401664cc
│ │ │ 3e9ec9de-6c88-520b-b768-d3839446d508
│ │ │ 8aab7e9b-2ae8-559b-9be0-49bf5a647a2a
│ │ │ 672d37eb-2a8c-54fd-88f2-0faecea5f5e6
│ │ │ 0ef1275a-7d21-566d-9bca-322ca7dbea53
│ │ │ 11d69fae-4edd-5acf-be32-e66e07904f3c
│ │ │ Device Flags: • Updatable
│ │ │ • Cryptographic hash verification is available
│ │ │ • Device stages updates
│ │ │ • Device can recover flash failures
│ │ │
│ │ └─ThinkPad Thunderbolt 3 Dock USB Audio:
│ │ Device ID: caee8370381dbe658ef9193b4948eb9ed1a25f8d
│ │ Summary: CX20985 USB audio device
│ │ Current version:04-0E-92
│ │ Bootloader Version:02.00.00.00
│ │ Vendor: Lenovo (USB:0x17EF)
│ │ Install Duration:3 seconds
│ │ GUIDs: effe6afa-9e41-5ed0-b66e-dad13853a7bb
│ │ 1d987aa4-e89a-5bd3-b78c-5ec8bdc6e213
│ │ d66bf84b-c3ba-508c-bc55-0d445413d3d4
│ │ 7083139e-9fec-5fc3-9e1a-a0fb3ae1bccf
│ │ Device Flags: • Updatable
│ │
│ └─MSP430:
│ Device ID: 3281dd62e64cfca4eec0492d675e1d4deb1b1cea
│ Summary: I²C dock management device
│ Current version:0.30
│ Vendor: VIA Labs, Inc. (USB:0x17EF)
│ GUID: 7a810ce4-928e-5a4a-b0cd-564f46cfe3a7
│ Device Flags: • Updatable

├─Thunderbolt host controller:
│ Device ID: 1a84e663d287b66053c440d9b417d36f0ce2c0a8
│ Summary: Unmatched performance for high-speed I/O
│ Current version: 59.00
│ Vendor: Lenovo (THUNDERBOLT:0x0109, TBT:0x0109)
│ GUIDs: b595a681-7c5b-5842-bba7-1d448c261a6e
│ b510dc43-dc5d-5449-9ccc-5edd80338954
│ 10216d57-c796-5f3c-83d3-21baf70bfc54
│ f8543f13-e164-5332-8681-4d5ef3ffbff0
│ Device Flags: • Internal device
│ • Updatable
│ • System requires external power source
│ • Device stages updates

├─UEFI Device Firmware:
│ Device ID: f95c9218acd12697af946874bfe4239587209232
│ Summary: UEFI ESRT device
│ Current version: 16842757
│ Minimum Version: 1
│ Vendor: DMI:LENOVO
│ Update State: Success
│ Update Error: Cannot install update when the lid is closed
│ GUIDs: 92ecc37d-8271-47c0-b4b3-c28a3924f7e2
│ 8cecc454-9f1c-5154-986e-94f8b664e7a0
│ Device Flags: • Internal device
│ • System requires external power source
│ • Needs a reboot after installation
│ • Device is usable for the duration of the update
│ • Updatable

├─UEFI Device Firmware:
│ Device ID: d96de5c124b60ed6241ebcb6bb2c839cb5580786
│ Summary: UEFI ESRT device
│ Current version: 65794
│ Minimum Version: 65794
│ Vendor: DMI:LENOVO
│ Update State: Success
│ Update Error: Cannot install update when the lid is closed
│ GUIDs: 3fb9a55d-d7f1-4d1b-b216-74e328e28f51
│ fa397613-68af-5c18-aea0-012f7bd9cc97
│ Device Flags: • Internal device
│ • System requires external power source
│ • Needs a reboot after installation
│ • Device is usable for the duration of the update
│ • Updatable

└─UEFI Device Firmware:
Device ID: f37fb01122dd62c773f4e84ec89737e059712d59
Summary: UEFI ESRT device
Current version: 22552
Minimum Version: 1
Vendor: DMI:LENOVO
Update State: Success
Update Error: Cannot install update when the lid is closed
GUIDs: 6255bb23-b2a8-469a-9161-bb9e1348ca23
8bb113aa-3089-57c1-9539-5c9c1b4470c6
Device Flags: • Internal device
• System requires external power source
• Needs a reboot after installation
• Device is usable for the duration of the update
• Updatable

Additional questions

Fedora 35

@kdj0c kdj0c added the bug label Feb 14, 2022
@hughsie
Copy link
Member

hughsie commented Feb 14, 2022

[drm] ERROR mstb 0000000057b5b857 port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed

It's pretty harmless tho, right? I'm using a ThinkPad Thunderbolt 3 Dock Gen 2 right now and it seems to work fine -- although I see the same error in dmesg.

So I think the logic should be to first read at 0x500, and if the vendor is synaptic, then it is safe to read at 0x4b0.

Yes, that sounds sane. Would you be able to do a PR to make this change? Thanks!

@hughsie
Copy link
Member

hughsie commented Feb 14, 2022

@superm1 you might be able to remember some of the original logic for doing it this way perhaps?

@kdj0c
Copy link
Author

kdj0c commented Feb 14, 2022

Yes the print is harmless, but it's still better to not have it ;)

I've looked a bit more at DP specification, and it says that even when reading proprietary section of 0x40C to 0x4FF, the device must ACK and return 0x00. So maybe the real fix is on Lenovo's firmware ?

I can make a PR, but I can't remove the read to 0x4b0 without potentially breaking some devices.

@hughsie
Copy link
Member

hughsie commented Feb 14, 2022

the device must ACK and return 0x00

This is what I thought too, so I was surprised to see the error too. Maybe we need to open an issue (with a lot of explanation!) here https://github.com/fwupd/firmware-lenovo/issues so that @mrhpearson can open an internal issue.

@kdj0c
Copy link
Author

kdj0c commented Feb 15, 2022

I've made a small program to read /dev/drm_dp_aux4, and reading to all addresses lead to this error. (even 0x00, 0x400 or 0x500).

So I think when nothing is connected to the MST port, the devices /dev/drm_dp_aux[456] should not be created by the kernel.
I will see if that make sense, and follow-up on dri-devel.

@hughsie
Copy link
Member

hughsie commented Feb 15, 2022

and follow-up on dri-devel

Many thanks!

@superm1
Copy link
Member

superm1 commented Feb 15, 2022

So I think when nothing is connected to the MST port, the devices /dev/drm_dp_aux[456] should not be created by the kernel.

Don't the nodes in devfs reflect the CRTCs the GPU has and can address? I would think it makes sense for them to continue to exist, but maybe an open() should fail on them or something when nothing is connected.

@kdj0c
Copy link
Author

kdj0c commented Feb 16, 2022

I started a discussion on dri-devel:
https://lists.freedesktop.org/archives/dri-devel/2022-February/342423.html
As you can see, I also provided your proposal.

At this point, I'm closing this issue, because fwupd can't guess if the device is "readable" without attempting to read it.

Thanks,

@kdj0c kdj0c closed this as completed Feb 16, 2022
@project-administrator
Copy link

I get same errors on a Dell laptop with a monitor connected through the Dell WD15 dock. Did not realize it's related to fwupd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants