Skip to contentSkip to conversation

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

drm Jocelyn Falempe 3 participants 5 messages Feb 16, 2022 – Feb 22, 2022

lore
Share & tools
lore
#0 lore raw

Hi,

When using a Lenovo dock, I often get this error message on dmesg:

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

It's caused by fwupd which tries to read from /dev/drm_dp_aux4

I opened an issue on fwupd:
https://github.com/fwupd/fwupd/issues/4284

But it turns out, it's probably an issue in the drm mst code instead.

When I connect my Dock (Lenovo Thinkpad Thunderbold 3 Gen 2), I get 3 drm_dp_aux[] created:

/dev/drm_dp_aux[456]

Reading from this devices at any address will always get the NAKed error above, unless there is an actual DP monitor connected (HDMI monitor or nothing connected gives a NAK)

Each time I connect or disconnect a monitor on the dock, this 3 /dev/drm_dp_aux[] are destroyed and recreated.

So I think the device /dev/drm_dp_aux[] should be created only if there is an actual monitor connected that can reply to it.
What's the purpose of providing userspace a device which can't be read or written ? (or maybe just fail the open() call, like Mario suggested on the fwupd issue, so the devices are still there with the same numbering)

On the other hand, we can also consider that it's expected to get NAck in drm_dp_send_dpcd_read() and replace drm_err() with drm_dbg()

what do you think ?

Signature · 1 line
Jocelyn
#1 lore raw
Quoted 19 lines · Jocelyn Falempe

Hi,

When using a Lenovo dock, I often get this error message on dmesg:

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

It's caused by fwupd which tries to read from /dev/drm_dp_aux4

I opened an issue on fwupd:
https://github.com/fwupd/fwupd/issues/4284

But it turns out, it's probably an issue in the drm mst code instead.

When I connect my Dock (Lenovo Thinkpad Thunderbold 3 Gen 2), I get 3 drm_dp_aux[] created:

/dev/drm_dp_aux[456]

Reading from this devices at any address will always get the NAKed error above, unless there is an actual DP monitor connected (HDMI monitor or nothing connected gives a NAK)

Quoted 9 lines

Each time I connect or disconnect a monitor on the dock, this 3 /dev/drm_dp_aux[] are destroyed and recreated.

So I think the device /dev/drm_dp_aux[] should be created only if there is an actual monitor connected that can reply to it.
What's the purpose of providing userspace a device which can't be read or written ? (or maybe just fail the open() call, like Mario suggested on the fwupd issue, so the devices are still there with the same numbering)

On the other hand, we can also consider that it's expected to get NAck in drm_dp_send_dpcd_read() and replace drm_err() with drm_dbg()

what do you think ?

Adding Lyude, AFAIK she's looked into this before.

Signature · 2 lines
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer
#2 lore raw

Hi! Sorry for the late reply, I had to take some time off work unexpectedly. This is normal (although not great TBH, I'm not sure we should be printing an error message for that), it's the result of fwupd trying to probe the MST hub to see if it's a specific Dell dock that can receive updates over DP aux, but it's not smart enough to know it doesn't need to poke the DP aux ranges of downstream branches or non-MST ports in general.

Would definitely accept patches to make this a non-error, or at least make this a non-error when the read/writes come from userspace

Quoted 42 lines · Michel Dänzer
Quoted 32 lines · Jocelyn Falempe

Hi,

When using a Lenovo dock, I often get this error message on dmesg:

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

It's caused by fwupd which tries to read from /dev/drm_dp_aux4

I opened an issue on fwupd:
https://github.com/fwupd/fwupd/issues/4284

But it turns out, it's probably an issue in the drm mst code instead.

When I connect my Dock (Lenovo Thinkpad Thunderbold 3 Gen 2), I get 3 drm_dp_aux[] created:

/dev/drm_dp_aux[456]

Reading from this devices at any address will always get the NAKed error above, unless there is an actual DP monitor connected (HDMI monitor or nothing connected gives a NAK)

Each time I connect or disconnect a monitor on the dock, this 3 /dev/drm_dp_aux[] are destroyed and recreated.

So I think the device /dev/drm_dp_aux[] should be created only if there is an actual monitor connected that can reply to it.
What's the purpose of providing userspace a device which can't be read or written ? (or maybe just fail the open() call, like Mario suggested on the fwupd issue, so the devices are still there with the same numbering)

Quoted 5 lines

On the other hand, we can also consider that it's expected to get NAck in drm_dp_send_dpcd_read() and replace drm_err() with drm_dbg()

what do you think ?

Adding Lyude, AFAIK she's looked into this before.

Signature · 3 lines
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat
#3 lore raw
Quoted 6 lines · Lyude Paul

Hi! Sorry for the late reply, I had to take some time off work unexpectedly. This is normal (although not great TBH, I'm not sure we should be printing an error message for that), it's the result of fwupd trying to probe the MST hub to see if it's a specific Dell dock that can receive updates over DP aux, but it's not smart enough to know it doesn't need to poke the DP aux ranges of downstream branches or non-MST ports in general.

I think MST topology is not exposed to userspace, so it would be hard for fwupd to be smarter than that.

Quoted 3 lines

Would definitely accept patches to make this a non-error, or at least make this a non-error when the read/writes come from userspace

I will try to provide a patch for this.

Thanks,

Signature · 1 line
Jocelyn
#4 lore raw
Quoted 11 lines · Jocelyn Falempe
Quoted 10 lines · Lyude Paul

Hi! Sorry for the late reply, I had to take some time off work unexpectedly.
This is normal (although not great TBH, I'm not sure we should be printing an
error message for that), it's the result of fwupd trying to probe the MST hub
to see if it's a specific Dell dock that can receive updates over DP aux, but
it's not smart enough to know it doesn't need to poke the DP aux ranges of downstream branches or non-MST ports in general.

Quoted 2 lines

I think MST topology is not exposed to userspace, so it would be hard for fwupd to be smarter than that.

We actually do expose a connector prop called "path" (or something like that) that can be used to determine this. although the format for that is admittedly a bit strange, but it should work

Quoted 9 lines
Quoted 4 lines

Would definitely accept patches to make this a non-error, or at least make this a non-error when the read/writes come from userspace

I will try to provide a patch for this.

Thanks,

Signature · 3 lines
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat