Skip to content

SystemKit: fix framebuffer sizing so single-axis resolution changes a…#540

Open
armm77 wants to merge 1 commit into
trunkmaster:masterfrom
armm77:systemkit
Open

SystemKit: fix framebuffer sizing so single-axis resolution changes a…#540
armm77 wants to merge 1 commit into
trunkmaster:masterfrom
armm77:systemkit

Conversation

@armm77

@armm77 armm77 commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

…pply

applyDisplayLayout: enlarged the X framebuffer only when BOTH dimensions grew (&&) and shrank it only when one dimension got smaller (||). A change that altered a single axis - e.g. 1400x1050 -> 1680x1050, same height - matched neither branch, so the framebuffer stayed at the old size while a wider CRTC mode was requested. XRRSetCrtcConfig then failed with BadMatch, the mode never took effect, and the display showed a black band on the right (xrandr still reported the old 1400x1050 screen).

Grow the framebuffer up front to the per-axis maximum of the current and new sizes so the new mode always fits, then set it to the exact final size after all CRTCs are placed. This preserves the original VirtualBox BadMatch safeguard (the framebuffer is never shrunk below the still-current layout mid-transition) while covering single-axis and mixed grow/shrink changes.

…pply

applyDisplayLayout: enlarged the X framebuffer only when BOTH dimensions
grew (&&) and shrank it only when one dimension got smaller (||). A change
that altered a single axis - e.g. 1400x1050 -> 1680x1050, same height -
matched neither branch, so the framebuffer stayed at the old size while a
wider CRTC mode was requested. XRRSetCrtcConfig then failed with BadMatch,
the mode never took effect, and the display showed a black band on the
right (xrandr still reported the old 1400x1050 screen).

Grow the framebuffer up front to the per-axis maximum of the current and
new sizes so the new mode always fits, then set it to the exact final size
after all CRTCs are placed. This preserves the original VirtualBox BadMatch
safeguard (the framebuffer is never shrunk below the still-current layout
mid-transition) while covering single-axis and mixed grow/shrink changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant