drm error on dual 4K@60Hz - one screen off and CRTC refresh not correct

Bug #2069511 reported by iMac
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

Updated (6/17/24). The scenario is two identical 4K-HDR@60Hz DP1.2 monitors, one plugged into a TB3 dock, plugged into one TB4 port, and the second plugged into a DP-Alt-Mode dock on a 2nd TB4 port on my laptop, with a closed laptop lid (eDP off)

The expected behavior is for both my monitors to enumerate on boot, with mirrored kernel consoles to appear on boot, or after drm correctly initializes during boot, and then for gdm to present a login screen on one of the two monitors as part of an extended desktop across both screens side-by-side.

Since the end monitors are DP1.2, they are limited to HBR2, simplifying the expected protocol configuration on either TB3 or TB4 ports, as each 4K@60Hz HDR monitor will use 4x5.4Gbps lanes (21.6Gbps) to deliver the required 16Gbps using TB3 or TB4.

It works perfectly, in the same configuration on my Dell XPS 9380 (WhiskeyLake-U GT2 [UHD Graphics 620]) using two Alpine Ridge TB3/JHL6540 ports.

On my Lenovo X1 Yoga G6 (TigerLake GT2 [Iris Xe Graphics]) using Tiger Lake LP TB4 ports, one monitor remains off during the boot process, and then they switch, and the opposite monitor remains off during the gdm3/mutter/wayland startup. (Used to file this bug report)

The workaround is to toggle the display refresh (switching from 60Hz, to 30Hz (monitor wakes up), then back to 60Hz). (I log in blindly as the gdm3 prompt is on the screen that is off, and then right click to "Display Settings" once logged in)

This results in my functioning extended desktop across both screens @HDR-4K-60Hz.

Even in the final working state, there are obvious issues I can see. The first is the drm_info reports that one of the monitors is still running at 30Hz, which is not the case.

imac@imac-X1-Yoga:~$ cat drm.txt | grep -A8 "CRTC 1"
485:│ ├───CRTC 1
486-│ │ ├───Object ID: 167
487-│ │ ├───Legacy info
488-│ │ │ ├───Mode: 3840x2160@30.00 driver phsync nvsync
489-│ │ │ └───Gamma size: 256
490-│ │ └───Properties
491-│ │ ├───"ACTIVE" (atomic): range [0, 1] = 1
492-│ │ ├───"MODE_ID" (atomic): blob = 389
493-│ │ │ └───3840x2160@30.00 driver phsync nvsync

The second is gnome shell messages, I assume are from mutter, which repeat periodically, but are shown here from the journal log captured between starting up with one screen off, and fixing it by toggling the refresh as described above.

Jun 17 09:34:04 imac-X1-Yoga gnome-shell[3795]: Page flip failed: Failed to set mode 3840x2160 on CRTC 167: Invalid argument

Jun 17 09:34:04 imac-X1-Yoga gnome-shell[3795]: Failed to post KMS update: Failed to set mode 3840x2160 on CRTC 167: Invalid argument

Inspecting xrandr, wayland_info and drm_info shows that drm_info does not align with the other two outputs. I have attached the full outputs as xrandr.txt, wayland.txt and drm.txt respectively.

I am trying to figure out how to get more debug from these errors, as it looks like drm is making an error as to how the port and monitors line up, if I was to just guess.

3689:Jun 15 13:21:22 imac-X1-Yoga gnome-shell[3006]: Page flip failed: Failed to set mode 3840x2160 on CRTC 167: Invalid argument
3690:Jun 15 13:21:22 imac-X1-Yoga gnome-shell[3006]: Failed to post KMS update: Failed to set mode 3840x2160 on CRTC 167: Invalid argument
3695:Jun 15 13:21:22 imac-X1-Yoga gnome-shell[3006]: Page flip failed: Page flip of 167 failed, and no mode set available

There are a lot of unused ports to possibly confuse DRM.

imac@imac-X1-Yoga:~/ownCloud/tmp/Monitors/Yoga$ for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
DP-10: disconnected
DP-1: disconnected
DP-2: disconnected
DP-3: disconnected
DP-4: disconnected
DP-5: connected
DP-6: disconnected
DP-7: disconnected
DP-8: disconnected
DP-9: connected
eDP-1: connected
HDMI-A-1: disconnected
HDMI-A-2: disconnected
HDMI-A-3: disconnected

I am looking hard at i915/xe/drm as the culprit, especially given the conflicting output from drm_info after I toggle the monitors into the correct working configuration manually.

Any help appreciated

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: linux-image-6.8.0-35-generic 6.8.0-35.35+1
ProcVersionSignature: Ubuntu 6.8.0-35.35-generic 6.8.4
Uname: Linux 6.8.0-35-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Jun 15 14:07:15 2024
EcryptfsInUse: Yes
HibernationDevice: #RESUME=UUID=57cb4898-6884-49ba-a5ba-74ac837dd3e7
InstallationDate: Installed on 2017-12-08 (2382 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
MachineType: LENOVO 20XY0027US
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-6.8.0-35-generic root=UUID=55cd97c8-08cc-4c11-8fb2-a7e0e7b10386 ro intel_iommu=igfx_off acpi_enforce_resources=lax mitigations=off
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-6.8.0-35-generic N/A
 linux-backports-modules-6.8.0-35-generic N/A
 linux-firmware 20240318.git3b128b60-0ubuntu2.1
SourcePackage: linux
UpgradeStatus: Upgraded to noble on 2024-05-06 (40 days ago)
dmi.bios.date: 02/02/2024
dmi.bios.release: 1.67
dmi.bios.vendor: LENOVO
dmi.bios.version: N32ET91W (1.67 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20XY0027US
dmi.board.vendor: LENOVO
dmi.board.version: SDK0K17763 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 31
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.ec.firmware.release: 1.36
dmi.modalias: dmi:bvnLENOVO:bvrN32ET91W(1.67):bd02/02/2024:br1.67:efr1.36:svnLENOVO:pn20XY0027US:pvrThinkPadX1YogaGen6:rvnLENOVO:rn20XY0027US:rvrSDK0K17763WIN:cvnLENOVO:ct31:cvrNone:skuLENOVO_MT_20XY_BU_Think_FM_ThinkPadX1YogaGen6:
dmi.product.family: ThinkPad X1 Yoga Gen 6
dmi.product.name: 20XY0027US
dmi.product.sku: LENOVO_MT_20XY_BU_Think_FM_ThinkPad X1 Yoga Gen 6
dmi.product.version: ThinkPad X1 Yoga Gen 6
dmi.sys.vendor: LENOVO

Revision history for this message
iMac (imac-netstatz) wrote :
Revision history for this message
iMac (imac-netstatz) wrote :
Revision history for this message
iMac (imac-netstatz) wrote :
iMac (imac-netstatz)
description: updated
description: updated
summary: - drm on dual 4K@60Hz blank on one screen
+ drm error on dual 4K@60Hz - blank screen and CRTC refresh not correct
iMac (imac-netstatz)
description: updated
description: updated
summary: - drm error on dual 4K@60Hz - blank screen and CRTC refresh not correct
+ drm error on dual 4K@60Hz - one screen off and CRTC refresh not correct
Revision history for this message
iMac (imac-netstatz) wrote :
Download full text (12.9 KiB)

I enabled KMS debug for mutter, and captured some additional info.

Notabley the monitors on CRTC 167 and 236 are initially shown active: 0 and CRTC 98 (laptop screen) is shown active: 1

Startup Event:
Jun 17 11:21:03 imac-X1-Yoga gnome-shell[2977]: Running GNOME Shell (using mutter 46.0) as a Wayland display server
Jun 17 11:21:03 imac-X1-Yoga gnome-shell[2977]: Made thread 'KMS thread' realtime scheduled
Jun 17 11:21:04 imac-X1-Yoga gnome-shell[2977]: Device '/dev/dri/card1' prefers shadow buffer
Jun 17 11:21:04 imac-X1-Yoga gnome-shell[2977]: KMS: Read CRTC 98 state: active: 1, mode: 3840x2400, changed: yes
Jun 17 11:21:04 imac-X1-Yoga gnome-shell[2977]: KMS: Read CRTC 167 state: active: 0, mode: (nil), changed: no
Jun 17 11:21:04 imac-X1-Yoga gnome-shell[2977]: KMS: Read CRTC 236 state: active: 0, mode: (nil), changed: no
Jun 17 11:21:04 imac-X1-Yoga gnome-shell[2977]: KMS: Read CRTC 305 state: active: 0, mode: (nil), changed: no
Jun 17 11:21:04 imac-X1-Yoga gnome-shell[2977]: Added device '/dev/dri/card1' (i915) using non-atomic mode setting.

Both monitors and the panel have their color profiles setup
Jun 17 11:21:05 imac-X1-Yoga gnome-shell[2977]: COLOR: Created new color device 'xrandr-LG Electronics-LG HDR 4K-0x00064f1f' for monitor DP-5
Jun 17 11:21:05 imac-X1-Yoga gnome-shell[2977]: COLOR: Created new color device 'xrandr-LG Electronics-LG HDR 4K-0x00064f20' for monitor DP-9
Jun 17 11:21:05 imac-X1-Yoga gnome-shell[2977]: COLOR: Created new color device 'xrandr-California Institute of Technology-0x1403-0x00000000' for monitor eDP-1

The mouse appears on both monitors (even though one, CRTC 167 is off from a user perspective)
Jun 17 11:21:05 imac-X1-Yoga gnome-shell[2977]: KMS: Realizing HW cursor for cursor sprite for CRTC 167 (/dev/dri/card1)
Jun 17 11:21:05 imac-X1-Yoga gnome-shell[2977]: KMS: Realizing HW cursor for cursor sprite for CRTC 236 (/dev/dri/card1)

Things look fine with mode setting
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [simple] Setting plane 169 (/dev/dri/card1) rotation to 1
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [simple] Setting mode of CRTC 236 (/dev/dri/card1) to 3840x2160
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [simple] Setting plane 100 (/dev/dri/card1) rotation to 1
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [simple] Setting mode of CRTC 167 (/dev/dri/card1) to 3840x2160

GDM fires up, and we see the first mode set error from mutter
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: Registering session with GDM
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: Swap buffers: 1 frames pending (double-buffering)
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: Assigning buffer to primary plane update on CRTC (167) with src rect 0.000000,0.000000 3840.000000x2160.000000 and dst rect 0,0 38>
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: Posting primary plane composite update for CRTC 167 (/dev/dri/card1)
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [simple] Processing update
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [simple] Setting CRTC 167 (/dev/dri/card1) gamma, size: 256
Jun 17 11:21:06 imac-X1-Yoga gnome-shell[2977]: KMS: [sim...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.