~emersion/kanshi#117: 
Conflicting profiles?

i'm working on a laptop and i'm trying to use a profile which enables 4 external monitors while disabling my integrated monitor. This is the related config:

#  (clamshell)
output "Philips Consumer Electronics Company PHL 273V7 0x00004291" alias $noc_c_dl
output "Philips Consumer Electronics Company PHL 273V7 0x00003EC3" alias $noc_c_ur
output "Philips Consumer Electronics Company PHL 273V7 0x000041A7" alias $noc_c_ul
output "Philips Consumer Electronics Company PHL 273V7 0x00003E75" alias $noc_c_dr
profile noc-c-clam {
    output $laptop disable
    output $noc_c_ur enable position 1920,0
    output $noc_c_dl enable position 0,1080
    output $noc_c_ul enable position 0,0
    output $noc_c_dr enable position 1920,1080
    exec wpctl set-default 165
}

Given that, when disconnecting the external monitors, my main screen wouldn't turn back on, i added a "default" config profile like this:

profile default {
	output $laptop enable
	exec wpctl set-default 165
}

Problem is, now the noc-c-clam won't be activated, as you can see by the logs:

└─$ kanshi
applying profile 'noc-c-clam'
applying profile output 'eDP-1' on connected head 'eDP-1'
applying profile output 'Philips Consumer Electronics Company PHL 273V7 0x000041A7' on connected head 'DP-5'
applying profile output 'Philips Consumer Electronics Company PHL 273V7 0x00004291' on connected head 'DP-6'
applying profile output 'Philips Consumer Electronics Company PHL 273V7 0x00003EC3' on connected head 'DP-7'
applying profile output 'Philips Consumer Electronics Company PHL 273V7 0x00003E75' on connected head 'HDMI-A-1'
failed to apply configuration for profile 'noc-c-clam'

Is there something wrong in how i implemented the config, or do you think it's a bug?

Thanks in advance!

Status
REPORTED
Submitter
~savagebutcher
Assigned to
No-one
Submitted
3 months ago
Updated
3 months ago
Labels
No labels applied.

~savagebutcher 3 months ago

Here's the complete logs: https://pastebin.com/FxGkHLyf

~emersion 3 months ago*

The compositor refuses to apply the new configuration. Compositor debug logs would tell more.

~savagebutcher 3 months ago*

here's the logs sway outputted (in this specific case laptop display was shut, so it appears as disabled):

00:01:14.065 [DEBUG] [sway/config/output.c:867] Committing 5 outputs
00:01:14.065 [DEBUG] [sway/config/output.c:631] Output state for HDMI-A-1
00:01:14.065 [DEBUG] [sway/config/output.c:633]     enabled:       yes
00:01:14.065 [DEBUG] [sway/config/output.c:637]     render_format: XR24
00:01:14.065 [DEBUG] [sway/config/output.c:645]     mode:          1920x1080@60000mHz (preferred)
00:01:14.065 [DEBUG] [sway/config/output.c:655]     scale:         1.000000
00:01:14.065 [DEBUG] [sway/config/output.c:658]     subpixel:      unknown
00:01:14.065 [DEBUG] [sway/config/output.c:631] Output state for DP-4
00:01:14.065 [DEBUG] [sway/config/output.c:633]     enabled:       yes
00:01:14.065 [DEBUG] [sway/config/output.c:637]     render_format: XR24
00:01:14.065 [DEBUG] [sway/config/output.c:645]     mode:          1920x1080@60000mHz (preferred)
00:01:14.065 [DEBUG] [sway/config/output.c:655]     scale:         1.000000
00:01:14.065 [DEBUG] [sway/config/output.c:658]     subpixel:      unknown
00:01:14.065 [DEBUG] [sway/config/output.c:631] Output state for DP-3
00:01:14.065 [DEBUG] [sway/config/output.c:633]     enabled:       yes
00:01:14.065 [DEBUG] [sway/config/output.c:637]     render_format: XR24
00:01:14.065 [DEBUG] [sway/config/output.c:645]     mode:          1920x1080@60000mHz (preferred)
00:01:14.065 [DEBUG] [sway/config/output.c:655]     scale:         1.000000
00:01:14.065 [DEBUG] [sway/config/output.c:658]     subpixel:      unknown
00:01:14.065 [DEBUG] [sway/config/output.c:631] Output state for DP-2
00:01:14.066 [DEBUG] [sway/config/output.c:633]     enabled:       yes
00:01:14.066 [DEBUG] [sway/config/output.c:637]     render_format: XR24
00:01:14.066 [DEBUG] [sway/config/output.c:645]     mode:          1920x1080@60000mHz (preferred)
00:01:14.066 [DEBUG] [sway/config/output.c:655]     scale:         1.000000
00:01:14.066 [DEBUG] [sway/config/output.c:658]     subpixel:      unknown
00:01:14.066 [DEBUG] [sway/config/output.c:631] Output state for eDP-1
00:01:14.066 [DEBUG] [sway/config/output.c:633]     enabled:       no
00:01:14.066 [DEBUG] [wlr] [types/wlr_output_swapchain_manager.c:160] Preparing test commit for 5 outputs with explicit modifiers
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1319] Reallocating CRTCs
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector eDP-1 (connected, needs CRTC): CRTC 100 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector HDMI-A-1 (connected, needs CRTC): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-1 (disconnected): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector HDMI-A-2 (disconnected): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-2 (connected, needs CRTC): CRTC 170 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-3 (connected, needs CRTC): CRTC 240 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-4 (connected, needs CRTC): CRTC 310 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:973] connector HDMI-A-1: Failed to find free CRTC
00:01:14.066 [ERROR] [wlr] [types/output/output.c:879] Failed to get primary display formats
00:01:14.066 [DEBUG] [wlr] [types/output/render.c:176] Output doesn't support format 0x34325258
00:01:14.066 [DEBUG] [wlr] [types/wlr_output_swapchain_manager.c:160] Preparing test commit for 5 outputs with implicit modifiers
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1319] Reallocating CRTCs
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector eDP-1 (connected, needs CRTC): CRTC 100 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector HDMI-A-1 (connected, needs CRTC): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-1 (disconnected): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector HDMI-A-2 (disconnected): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-2 (connected, needs CRTC): CRTC 170 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-3 (connected, needs CRTC): CRTC 240 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-4 (connected, needs CRTC): CRTC 310 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:973] connector HDMI-A-1: Failed to find free CRTC
00:01:14.066 [ERROR] [wlr] [types/output/output.c:879] Failed to get primary display formats
00:01:14.066 [DEBUG] [wlr] [types/output/render.c:176] Output doesn't support format 0x34325258
00:01:14.066 [ERROR] [sway/config/output.c:884] Requested backend configuration failed, searching for valid fallbacks
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1319] Reallocating CRTCs
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector eDP-1 (connected, needs CRTC): CRTC 100 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector HDMI-A-1 (connected, needs CRTC): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-1 (disconnected): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector HDMI-A-2 (disconnected): no CRTC (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-2 (connected, needs CRTC): CRTC 170 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-3 (connected, needs CRTC): CRTC 240 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:1382]   Connector DP-4 (connected, needs CRTC): CRTC 310 (no change)
00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:973] connector HDMI-A-1: Failed to find free CRTC
00:01:14.066 [ERROR] [wlr] [types/output/output.c:879] Failed to get primary display formats
00:01:14.066 [ERROR] [sway/config/output.c:893] Search for valid config failed
00:01:14.066 [DEBUG] [sway/input/seat.c:698] Applying input mapping to 1267:12652:ELAN0733:00_04F3:316C_Touchpad
00:01:14.066 [DEBUG] [sway/input/seat.c:698] Applying input mapping to 1267:12652:ELAN0733:00_04F3:316C_Mouse
00:01:14.066 [DEBUG] [sway/input/seat.c:698] Applying input mapping to 9610:268:BY_Tech_Gaming_Keyboard_Consumer_Control
00:01:14.066 [DEBUG] [sway/input/seat.c:698] Applying input mapping to 9610:268:BY_Tech_Gaming_Keyboard_Mouse
00:01:14.066 [DEBUG] [sway/input/seat.c:698] Applying input mapping to 1133:49733:Logitech_Gaming_Mouse_G400

~emersion 3 months ago

Seems like you're trying to enable more outputs than your GPU supports?

00:01:14.066 [DEBUG] [wlr] [backend/drm/drm.c:973] connector HDMI-A-1: Failed to find free CRTC

~savagebutcher 3 months ago

My GPU supports up to 4 outputs: i usually work with 3 external monitors and the integrated one, and in some cases (like if i turn on my laptop with 4 monitors connected and shut immediately the lid) i've been able to make a 4 external monitors configuration work. My feeling is that it (kanshi? sway?) does not properly disable eDP-1 (integrated monitor) and therefore can't apply my config 'cause it'd result in 5 active monitors.