<table><tr><td style="">bshah added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24112">View Revision</a></tr></table><br /><div><div><p>Some more debugging with master branch,</p>
<p>I added following debug in doAtomicCommit</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">qCDebug(KWIN_DRM) << "BSHAH " << m_mode.hdisplay << m_mode.hsync_start << m_mode.hsync_end << m_mode.htotal << m_mode.hskew << m_mode.vdisplay << m_mode.vsync_start << m_mode.vsync_end << m_mode.vtotal << m_mode.vscan << m_mode.vrefresh << m_mode.flags << m_mode.type << m_mode.name << really << flags; //really is whether commit is real or test</pre></div>
<p>And ran following to capture relevant output in kwin log.</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kscreen-doctor output.2.rotation.left && sleep 2 && kscreen-doctor output.2.rotation.normal</pre></div>
<p>Which results in following,</p>
<p>At startup we have set following mode, and it all is correctly, first is test commit and next is final commit</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 1280
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 1 1025
kwin_wayland_drm: Atomic Modeset successful.</pre></div>
<p>After that it's mostly repaint/pageflip commits</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><snip>
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 256
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 1 513
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 256
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 1 513
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 256
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 1 513
</snip></pre></div>
<p>Now once kscreen-doctor command is executed, it commits the test commit,</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 1280
kwin_wayland_drm: Atomic request failed to commit: No space left on device
kwin_wayland_drm: Atomic test commit failed. Aborting present.</pre></div>
<p>Which fails with no space left on device. (ENOSPC).. Sleeping for 2 seconds continues same spam loop, with same mode set, despite in test commit fallback code we trying to set previous mode and transformation.</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kwin_wayland_drm: Atomic test commit failed. Aborting present.
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 1280
kwin_wayland_drm: Atomic request failed to commit: No space left on device
kwin_wayland_drm: Atomic test commit failed. Aborting present.
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 0 1280
kwin_wayland_drm: BSHAH 1920 1968 2000 2082 0 1080 1082 1087 1144 0 0 9 0 1 1025
kwin_wayland_drm: Atomic Modeset successful.</pre></div>
<p>After 2 seconds, setting normal rotation make it send same test commit and it passes :/ It is quite weird because despite we setting same transformation back in "if test commit fails" code base, it doesn't actually manage to set that, but later works fine.</p>
<p>Next I'll enable LIBGL_DEBUG=verbose and see if this makes any sense or provides me with reasoning why it does this.</p>
<p>PS: any simple way or function to transform mode to string rather then looong debug I have? :P</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24112">https://phabricator.kde.org/D24112</a></div></div><br /><div><strong>To: </strong>romangg, KWin<br /><strong>Cc: </strong>bshah, zzag, apol, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, mart<br /></div>