weston exits with non-zero exit code and no obvious error log
When running weston
from a tty with a minimal weston.ini
(or no configuration file), it begins initialization and then exits with a non-zero status code and reports no obvious errors. If I add the --log
argument, the logfile records an error not initially displayed on stderr: Output 'DP-5': No available CRTCs.
and Error: cannot enable output 'DP-5' without heads
.
The system is a Lenovo laptop attached to a dock via Lenovo's proprietary OneLink+ connector. The laptop itself has a built-in display (eDP-1), an HDMI port, and a mini-Display-Port. The dock has two DisplayPort connectors and a VGA connector. At the time of the error, the laptop lid is closed so eDP-1 is dark, all connectors on the laptop are not plugged in, and the three connectors on the dock are attached.
The exact invocation is: weston --log=/tmp/weston.log --backend=drm --shell=desktop
$ cat ~/.config/weston.ini
[output]
name=DP-1
mode=preferred
[output]
name=DP-2
mode=preferred
[output]
name=DP-3
mode=preferred
$ ls -l /sys/class/drm
total 0
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-1
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-DP-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-2
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-DP-3 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-3
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-DP-4 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-4
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-DP-5 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-5
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-eDP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root 0 Dec 15 10:14 card1-HDMI-A-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-2
lrwxrwxrwx 1 root root 0 Dec 15 10:14 renderD128 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD128
-r--r--r-- 1 root root 4096 Dec 15 12:38 version
$ sudo dmesg | grep -Ei 'drm|i915|fb0|framebuffer'
[ 0.368507] ACPI: bus type drm_connector registered
[ 0.368972] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0
[ 0.379204] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[ 73.804567] systemd[1]: Starting Load Kernel Module drm...
[ 76.101945] i915 0000:00:02.0: enabling device (0006 -> 0007)
[ 76.139931] i915 0000:00:02.0: vgaarb: deactivate vga console
[ 76.146150] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=mem
[ 76.148034] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)
[ 77.669841] i915 0000:00:02.0: [drm] Reducing the compressed framebuffer size. This may lead to less power savings than a non-reduced-size. Try to increase stolen memory size if available in BIOS.
[ 77.691007] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 1
[ 77.711776] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 77.745794] fbcon: i915drmfb (fb0) is primary device
[ 77.777660] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
$ cat /sys/devices/pci0000:00/0000:00:02.0/{vendor,device}
0x8086
0x1916
$ grep DP-5 /tmp/weston.log
[12:36:04.590] DRM: head 'DP-5' found, connector 133 is connected, EDID make 'PLN', model 'PXL2780MW', serial '16843009'
[12:36:04.595] Output 'DP-5' attempts EOTF mode: SDR
[12:36:04.595] Output 'DP-5' using color profile: built-in default sRGB SDR profile
[12:36:04.595] Output 'DP-5': No available CRTCs.
[12:36:04.595] Enabling output "DP-5" failed.
[12:36:04.595] Error: cannot enable output 'DP-5' without heads.
Full log is attached.