[i915] Using gnome-shell with a USB-C dock causes the kernel to log "adding CRTC not allowed without modesets" and crashes in drm_atomic_check_only

Bug #2003031 reported by beadon
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNOME Shell
New
Unknown
Linux
Unknown
Unknown
kwin (Ubuntu)
New
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned
mutter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

GJS crashes - here's the crashdump. I saw the crash occur after a screensaver had been running, and the screens had gone blank. I assume this means they were turned off by the sleep timer. When I worke the machine, I was presented with a prompt, I *quickly* entered my login credentials and momentarily saw the desktop and all open programs on it. Then, the screens (3) flickered and I saw the login prompt again. I logged in (again), and all applications had been shut down.

I checked /var/log/syslog and saw the following details -- see (log). Uploaded file, and the crashdump.

ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: xorg 1:7.7+23ubuntu2
ProcVersionSignature: Ubuntu 5.19.0-29.30-generic 5.19.17
Uname: Linux 5.19.0-29-generic x86_64
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: pass
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Mon Jan 16 20:52:55 2023
DistUpgraded: 2023-01-14 21:42:30,924 DEBUG Running PostInstallScript: '/usr/lib/ubuntu-advantage/upgrade_lts_contract.py'
DistroCodename: kinetic
DistroVariant: ubuntu
DkmsStatus:
 8812au/5.6.4.2_35491.20191025, 5.15.0-58-generic, x86_64: installed
 8812au/5.6.4.2_35491.20191025, 5.19.0-29-generic, x86_64: installed
 nvidia/470.161.03, 5.19.0-29-generic, x86_64: installed
 virtualbox/6.1.38, 5.15.0-58-generic, x86_64: installed
 virtualbox/6.1.38, 5.19.0-29-generic, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) (prog-if 00 [VGA controller])
   Subsystem: Lenovo TigerLake-LP GT2 [Iris Xe Graphics] [17aa:22d4]
InstallationDate: Installed on 2023-01-09 (7 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
MachineType: LENOVO 20XY0027US
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.19.0-29-generic root=UUID=1cae8af8-977f-4853-9106-9169f34c4bc2 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
Title: Xorg crash
UpgradeStatus: Upgraded to kinetic on 2023-01-15 (1 days ago)
dmi.bios.date: 07/27/2022
dmi.bios.release: 1.55
dmi.bios.vendor: LENOVO
dmi.bios.version: N32ET79W (1.55 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20XY0027US
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40697 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.33
dmi.modalias: dmi:bvnLENOVO:bvrN32ET79W(1.55):bd07/27/2022:br1.55:efr1.33:svnLENOVO:pn20XY0027US:pvrThinkPadX1YogaGen6:rvnLENOVO:rn20XY0027US:rvrSDK0J40697WIN: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
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.113-2
version.libgl1-mesa-dri: libgl1-mesa-dri 22.2.1-1ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 22.2.1-1ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:21.1.4-2ubuntu1.3
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-3
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20210115-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-2build1

Revision history for this message
beadon (bryant-eadon) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

The biggest issue here seems to be a kernel crash:

Jan 16 19:40:28 semiauto kernel: [84513.834489] adding CRTC not allowed without modesets: requested 0x4, affected 0x7
Jan 16 19:40:28 semiauto kernel: [84513.834564] WARNING: CPU: 4 PID: 2041 at drivers/gpu/drm/drm_atomic.c:1403 drm_atomic_check_only+0x40c/0x450 [drm]

But it sounds like the kernel is complaining that gnome-shell is to blame. To work around that, please try adding:

  MUTTER_DEBUG_FORCE_KMS_MODE=simple

to /etc/environment and then reboot.

But there are three different crashes here and we need separate bugs opened for each. The other two crashes are of 'gjs-console' and I can see 'gnome-shell' also crashed according to the log. Please open new bugs about each of those by following https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

summary: - gjs crash crashes gnome session
+ gnome-shell crashes in the kernel at drm_atomic_check_only and the
+ kernel says "adding CRTC not allowed without modesets: requested 0x4,
+ affected 0x7"
affects: xorg (Ubuntu) → mutter (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: gnome-shell crashes in the kernel at drm_atomic_check_only and the kernel says "adding CRTC not allowed without modesets: requested 0x4, affected 0x7"

There is an upstream kernel bug suggesting it is triggered by using a USB-C or Thunderbolt dock. That's what it sounds like to me too...

https://gitlab.freedesktop.org/drm/intel/-/issues/6728

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This *might* relate to bug 2003042.

Revision history for this message
beadon (bryant-eadon) wrote :

Spelling error : "When I woke the machine..."

Revision history for this message
beadon (bryant-eadon) wrote :

Yes, there is a USB-C "port extender" (dock) attached to this Lenovo laptop. The model is the MUC-0501B. It is this exact device : https://amzn.to/3XA5u5N -- "USB C Adapters for MacBook Pro/Air,Mac Dongle with 3 USB Port,USB C to HDMI, USB C to RJ45 Ethernet,MOKiN 9 in 1 USB C to HDMI Adapter,100W Pd Charging, USB C to SD/TF Card Reader USB C Hub".

I also have noticed occassional flickering. What's interesting is that either the display controlled via this, or via the direct HDMI port will "drop out" for a second or 2 when the mouse moves between the screens. If I move the mouse back to the alternate screen, the display comes back.

Revision history for this message
beadon (bryant-eadon) wrote :

I have applied the workaround for mutter :
  MUTTER_DEBUG_FORCE_KMS_MODE=simple

I am seeing no further logs at the moment. I will continue to monitor for issues.

To address any low-level issues I also have applied the system firmware update, available via ISO from the Lenovo support site "n32ur20w.iso". the release date on this was Jan 02 , 2023, so only about 2 weeks ago.

I expect the issue to re-occur.

Reference for anyone following along at home : https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-yoga-6th-gen-type-20xy-20y0/20xy/20xy0027us/downloads/driver-list/component?name=BIOS%2FUEFI

Release notes for this firmware update included here too :

Revision history for this message
beadon (bryant-eadon) wrote :

Ok, I am getting a slightly different, but perhaps related problem with another USB-C / eGPU encapsulation (PCIE tunneles over USB-C basically) device.

I've done some testing with the Razer Core X Chroma, a USB-C connected Thunderbolt 3 eGPU enclosure. Reference to hardware is here : https://www.razer.com/gaming-egpus/Razer-Core-X/RC21-01430100-R3U1

I have 2x displays now connected to the internal PCIE nVidia TU117 [GeForce GTX 1650] loaded in the unit. The BIOS seems to work fine, , but when I get to the gnome login screen things hang. I am narrowing it down, but just like the display blanking on the Intel based on cursor location, I am seeing the same behavior with this enclosure - if at boot time the enclosure is connected, then the displays will lock up. If, I move the mouse to the right edge of the screen , the desktop will also lock up.

Attached are the logs of the attachment, then detachment of this enclosure. Note that on re-attaching the enclosure the USB devices which previously worked fine attached to the enclosure no longer function (perhaps not deregistered properly?).

Details for HW info

beadon@semiauto:~$ hwinfo --gfxcard --short
graphics card:
                       nVidia TU117 [GeForce GTX 1650]
                       Intel TigerLake-LP GT2 [Iris Xe Graphics]

Primary display adapter: #26

Revision history for this message
beadon (bryant-eadon) wrote :

Should I open this as a different issue with the Core X Chroma Thunderbolt 3 enclosure ? It's very similar.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please report all issues not relating to "adding CRTC not allowed without modesets" as new bugs.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #8 is a crash in the 'nouveau' kernel driver unrelated to this bug. Although you should technically report a new bug for that, 'nouveau' is not very well maintained and we would always just recommend using the 'Additional Drivers' app to install one of the official Nvidia drivers instead.

Revision history for this message
beadon (bryant-eadon) wrote :

I have blacklisted this now using:

sudo vim /etc/modprobe.d/blacklist-nouveau.conf

adding:

blacklist nouveau
options nouveau modeset=0

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That's probably not as good as sticking to nouveau because it will fall back to software rendering instead. But the third and best option is to install an Nvidia driver using the 'Additional Drivers' app.

summary: gnome-shell crashes in the kernel at drm_atomic_check_only and the
- kernel says "adding CRTC not allowed without modesets: requested 0x4,
- affected 0x7"
+ kernel says "adding CRTC not allowed without modesets"
summary: - gnome-shell crashes in the kernel at drm_atomic_check_only and the
- kernel says "adding CRTC not allowed without modesets"
+ Using gnome-shell with a USB-C dock crashes the kernel at
+ drm_atomic_check_only and logs "adding CRTC not allowed without
+ modesets"
summary: - Using gnome-shell with a USB-C dock crashes the kernel at
- drm_atomic_check_only and logs "adding CRTC not allowed without
- modesets"
+ Using gnome-shell with a USB-C dock causes the kernel to log "adding
+ CRTC not allowed without modesets" and crashes in drm_atomic_check_only
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Using gnome-shell with a USB-C dock causes the kernel to log "adding CRTC not allowed without modesets" and crashes in drm_atomic_check_only

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
tags: added: i915
summary: - Using gnome-shell with a USB-C dock causes the kernel to log "adding
- CRTC not allowed without modesets" and crashes in drm_atomic_check_only
+ [i915] Using gnome-shell with a USB-C dock causes the kernel to log
+ "adding CRTC not allowed without modesets" and crashes in
+ drm_atomic_check_only
Changed in gnome-shell:
status: Unknown → New
Revision history for this message
Ghadi Rahme (ghadi-rahme) wrote :

This issue might be kernel related and not mutter related. I am running kubuntu 23.04 with kde plasma 5.27.4 with kwin under wayland and when plugging in to a usbc to HDMI adapter I received the kernel warning: "adding CRTC not allowed without modesets: requested 0x2, affected 0x3".

Machine: Dell XPS 17 9720 (2022)
CPU: intel core i9 12900HK
GPU: RTX 3060 6GB + intel Xe graphics
Nvidia driver: 535.54.03-0ubuntu1 (proprietary)
OS: Kubuntu 23.04 (Lunar)
Desktop environment: Plasma 5.27.4
Compositor: Wayland
Window manager: Kwin
kernel: 6.2.0-25-generic

Attached is my dmesg output.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think this sounds like it could still be a common bug to both mutter and kwin so let's keep that open. Certainly the circumstances agree with the error message and it sounds logical to me that the compositor could be to blame.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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