Failed to post KMS update: drmModeAtomicCommit: Invalid argument - When using fractional scaling and vertically rotated monitor
When using one of my monitors rotated and with fractional scaling applied, I was always getting this error (on amdgpu).
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'FB_ID' (17) to 150
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'CRTC_ID' (20) to 83
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'SRC_X' (9) to 0,00
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'SRC_Y' (10) to 0,00
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'SRC_W' (11) to 3840,00
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'SRC_H' (12) to 2160,00
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'CRTC_X' (13) to 0
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'CRTC_Y' (14) to 0
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'CRTC_W' (15) to 3840
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'CRTC_H' (16) to 2160
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane (52, /dev/dri/card1) rotation to 1
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'rotation' (57) to 1
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting 3 damage clips on 52
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'FB_DAMAGE_CLIPS' (21) to 196
libmutter-Message: 15:49:58.490: KMS: [atomic] Committing update 8873, flags: ATOMIC_NONBLOCK|PAGE_FLIP_EVENT
libmutter-Message: 15:49:58.490: KMS: [atomic] KMS update failed: drmModeAtomicCommit: Invalid arguments
libmutter-Message: 15:49:58.490: KMS: [atomic] Creating transient page flip data for (83, /dev/dri/card1): 0x561c8b823150
(gnome-shell:794841): libmutter-WARNING **: 15:49:58.490: Failed to post KMS update: drmModeAtomicCommit: Argomento non valido
The only difference from when using the rotated screen was this bit:
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting 3 damage clips on 52
libmutter-Message: 15:49:58.490: KMS: [atomic] Setting plane 52 (/dev/dri/card1) property 'FB_DAMAGE_CLIPS' (21) to 196
And.... Once I analyzed the content of the rects they included: swap rect 3819x2135 @ 6x-1
, so using a negative value here that wasn't really supported by the driver.
Reason for this was the rotation applied to the rectangle, that was orinally 2135x3819 @ 26x6, and so still bigger than the framebuffer size (3840x2160).