You are not logged in.

#1 2024-07-04 09:36:59

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

External monitor issue via USB4

My setup includes a P14S AMD (7840U) laptop and a USB4 hub which is connected to two 4k monitors. Things work fine when running arch kernel, e.g. `6.9.7-arch-1`. However when trying `6.10` from mainline the setup no longer works as expected. Perhaps the issue needs to be reported on the kernel bugzilla but I thought perhaps there is something I'm missing and I could get some help/feedback here.

What works and what the expected behavior is:
USB4 hub/dock is connected to the laptop and it's possible to run two external 4k monitors at 60 HZ. This setup works fine on Arch with `6.9` kernels, it works fine in KDE and in GNOME. It also works fine my minipc with 7640HS that runs Ubuntu 22.04.

What is observed with `6.10-rc` kernels:
- If I run `6.10-rc[4-6]-1-mainline` then both monitors are recognized by the system, in the graphical settings they are both configured to 4k/60 HZ but one of the monitors stay black and does not show anything on screen, the virtual space is still there as I can move the mouse pointer on the screen and depending on how deep I go it takes different time to come back, I can drag the windows to that screen but nothing is properly displayed.
- Upon reconnecting the hub sometimes the other monitor starts to work fine while the first one switches to be staying black.
- I tried two different docks from Ugreen and one from Lenovo. All work fine with stable kernel and exhibit faulty behavior with `6.10-rc` kernels.
- If I lower the resolution to 1080p then it's possible to have both monitors working fine. I think that if I go from 60 HZ down to 30 HZ both monitors also work fine but I would need to double check that.
- If I connect one external monitor via USB4 dock and one via HDMI port on the laptop it works fine so it's not like the system can't support the configuration at all, it fails only when both external monitors are connected via USB4 dock.
- I do not see anything in the logs that is relevant to the issue

Based on these findings it appears that the problem is caused by `6.10` kernel. Since I have not tested older vanilla kernels I can't exclude the possibility of special tweaks in Arch and Ubuntu kernels.

Does anyone have any advice what else to try? Does it make sense to submit it to the kernel bugtracker?

Offline

#2 2024-07-04 19:32:19

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: External monitor issue via USB4

Could you share the dmesg output? Also are you loading any external modules (i.e. nvidia stuff)?

Offline

#3 2024-07-05 11:01:41

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Re: External monitor issue via USB4

This is what I see upon plugging in the dock with just two HDMI cables inserted, nothing else. The monitors are set to 30 Hz and both work fine:

> Jul 05 12:40:50 p14s-nest kernel: [drm] DM_MST: starting TM on aconnector: 000000002c1261a7 [id: 113]                                        
> Jul 05 12:40:50 p14s-nest kernel: [drm] DM_MST: DP14, 2-lane link detected
> Jul 05 12:40:50 p14s-nest kernel: [drm] Downstream port present 1, type 2
> Jul 05 12:40:50 p14s-nest kernel: usb 7-1: new high-speed USB device number 2 using xhci_hcd
> Jul 05 12:40:50 p14s-nest kernel: [drm] Downstream port present 1, type 2
> Jul 05 12:40:50 p14s-nest kernel: usb 7-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 6.56
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1: Product: USB2.1 Hub
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1: Manufacturer: GenesysLogic 
> Jul 05 12:40:51 p14s-nest kernel: hub 7-1:1.0: USB hub found
> Jul 05 12:40:51 p14s-nest kernel: hub 7-1:1.0: 4 ports detected
> Jul 05 12:40:51 p14s-nest kernel: usb 8-1: new SuperSpeed USB device number 2 using xhci_hcd                                                 
> Jul 05 12:40:51 p14s-nest kernel: usb 8-1: New USB device found, idVendor=05e3, idProduct=0626, bcdDevice= 6.56
> Jul 05 12:40:51 p14s-nest kernel: usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Jul 05 12:40:51 p14s-nest kernel: usb 8-1: Product: USB3.1 Hub
> Jul 05 12:40:51 p14s-nest kernel: usb 8-1: Manufacturer: GenesysLogic 
> Jul 05 12:40:51 p14s-nest kernel: hub 8-1:1.0: USB hub found
> Jul 05 12:40:51 p14s-nest kernel: hub 8-1:1.0: 4 ports detected
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1.1: new full-speed USB device number 3 using xhci_hcd
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1.1: New USB device found, idVendor=1d5c, idProduct=7102, bcdDevice= 1.00
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1.1: Product: Generic Billboard Device
> Jul 05 12:40:51 p14s-nest kernel: usb 7-1.1: Manufacturer: Fresco Logic, Inc
> Jul 05 12:40:51 p14s-nest kernel: [drm] Send DSC enable to synaptics
> Jul 05 12:40:51 p14s-nest kernel: [drm] Send DSC enable to synaptics

If I switch both monitors to 60 HZ then one of them goes black and reports no signal. In dmesg one line appears:

> Jul 05 12:41:50 p14s-nest kernel: [drm] Send DSC disable to synaptics

I'm not using any extra modules. The laptop has an AMD CPU/APU: 7840U+780M, no other videocards are present.

Offline

#4 2024-07-06 13:04:20

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: External monitor issue via USB4

Are you confident in bisecting the issue? It would be good to know which exact commit broke your setup ..

If you want I can also supply you with prebuilt packages to test and we can write a but report together smile

Offline

#5 2024-07-06 17:36:38

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Re: External monitor issue via USB4

I've never done it before but sounds like potentially something worth exploring. I'll get back here if I realize I need assistance in bisecting.

In the meantime I also stumbled upon an issue that the system is unable to output 10 bit color to an external 4k monitor unless it's set to 30 Hz which also seems a bit odd. It feels like in some cases the system fails to correctly calculate the bandwidth needed to output to a display. But I need to do more testing first.

I suppose opening an issue here could be more pertinent?

Offline

#6 2024-07-06 18:53:31

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: External monitor issue via USB4

Yeah but since the upstream developers get a multitude of issues its good if you're able to name a cause for the issue.

If you want you can probably use a build or two I already did here:
https://pkgbuild.com/~gromit/linux-bisection-kernels/

Offline

#7 2024-07-09 11:37:54

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Re: External monitor issue via USB4

Thank you for sharing the link. I checked and things work fine with the latest `6.9.8-arch1-1` and `6.9-1-mainline` and do not work with `6.10rc1-1` and `6.10rc1-2`, not sure which one has fewer changes. To narrow it down further I'll need to do more myself, I hope to find some time in the near future.

Offline

#8 2024-07-10 09:28:37

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Re: External monitor issue via USB4

I think I'm missing some steps to properly build a bisected version of the mainline kernel. I got an error:

.../6.10-rc1-test-bisect/pkg/linux-mainline/usr/lib/modules/6.10.0-rc4-1-mainline/build

That's because PKGBUILD and .SRCINFO are currently configured for 6.10-rc4 version. I can adjust it to 6.9.0 but I don't know how take the suffix -06694-gdb5d28c0bfe5 into account.
Instead the following directory is created during build process:

pkg/linux-mainline/usr/lib/modules/6.9.0-1-mainline-06694-gdb5d28c0bfe5/

What I did prior to that is I went to src/linux-mainline, then

git bisect start
git bisect good v6.9
git bisect bad v6.10-rc1
cd ../..
makepkg -efsi

What changes does one need to make in PKGBUILD and .SRCINFO and perhaps somewhere else for package builder to process the correct version?

Offline

#9 2024-07-10 12:23:46

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: External monitor issue via USB4

Well that sounds about right, now you just need to build the kernel at the checked out version smile

I'm doing it a little different, I used a modified PKGBUILD that checks out the kernel sources at "#commit=<commitsha>", skips the docs and executes a pkgver() function each time, but this will not give you the desired build caching effects.

For the versions stored at the previously mentioned https://pkgbuild.com/~gromit/linux-bisection-kernels/ you can check with "git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'" if there is a version already built for what your currently looking at and then install it with "pacman -U". I plan to make this a proper tool in the future, but so far I didn't get there wink

Also regarding your question, I don't think the suffix should be causing trouble.

Offline

#10 2024-07-16 11:28:04

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Re: External monitor issue via USB4

After a lot of kernel compilation the culprit seems to be the following commit

Thank you for providing all the tips!

Offline

Board footer

Powered by FluxBB