Skip to content

Fix for xrandr: failed request: BadMatch (invalid param attr) #2159#2288

Open
artist4xlibre wants to merge 1 commit intoX11Libre:masterfrom
artist4xlibre:master
Open

Fix for xrandr: failed request: BadMatch (invalid param attr) #2159#2288
artist4xlibre wants to merge 1 commit intoX11Libre:masterfrom
artist4xlibre:master

Conversation

@artist4xlibre
Copy link
Copy Markdown

Fix for xrandr: failed request: BadMatch (invalid parameter attributes) #2159

@metux metux requested a review from a team April 20, 2026 11:35
Comment thread randr/rrscreen.c
pixman_f_transform_bounds(&crtc->f_transform, &display_box);

if (display_box.x2 > stuff->width || display_box.y2 > stuff->height)
if (crtc->x + mode->mode.width > stuff->width ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't handle rotation now

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a build from 01e3bbf with this patch applied and a test shows the rotate to work fine without errors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still, the check doesn't look right.
It may work sometimes, but I don't think it is correct.
As I understand the code, it is supposed to take a rectangle, apply a (translated) linear transformation, and compare with what is requested.

If we're reverting, we should revert the entire commit, not just this line: e2550d0

I'm not sure why this breaks though.
Perhaps we should take MAX(display_box.x2, display_box.x1) and MAX(display_box.y2, display_box.y1)?
@metux @cepelinas9000 ping

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAX cannot work as one of the values already is larger.
I tested with MIN but even that fails.

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.

2 participants