[Xcb] xcb_randr_set_screen_size_checked error
Uli Schlachter
psychon at znc.in
Fri Sep 3 11:56:00 UTC 2021
Hi,
Am 02.09.21 um 02:57 schrieb Andrey Af:
> Hi,
> I'm trying to use this function but I get an error:
> error code: 8, major: 0x8c, minor: 0x07, sequence: 4
Error 8 is BadMatch / XCB_MATCH. But perhaps even better...
[...]
> auto _conn = xcb_connect(":0", nullptr);
[...]
I changed the above ":0" to nullptr and ran your code under xtrace [1].
The result is lots of output which ends with:
000:<:0004: 20: RANDR-Request(140,7): SetScreenSize window=0x00000761
width=1680 height=1050 width[mm]=477 height[mm]=268
000:<:0005: 4: Request(43): GetInputFocus
000:>:0004:Error 8=Match: major=140, minor=7, bad=0x00000761, seq=0004
000:>:0005:32: Reply to GetInputFocus: revert-to=PointerRoot(0x01)
focus=0x02a00009
main: error code: 8, major: 0x8c, minor: 0x07, sequence: 4
The "0004" before the error is the sequence number. Your error output
also says "sequence: 4". With this output, we see that the SetScreenSize
request has the same sequence number, so this is the one generating the
error.
Next, I looked at [2] and found for RRSetScreenSize:
All active monitors must be configured to display a
subset of the specified size, else a Match error results.
My current setup looks like this:
$ xrandr | grep ' connected'
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x
axis y axis) 477mm x 268mm
DP-2 connected 1280x1024+1920+0 (normal left inverted right x axis y
axis) 376mm x 301mm
My DP-2 would be outside of the screen size that your program tries to
set and hence the X11 server refused this request.
Are you sure that SetScreenSize is the request that you actually want to
send? I would guess that you are more interested in SetCrtcConfig.
To be sure, I would recommend running something like "xtrace xrandr
--output FOO --right-of BAR" and investigating the output (where this is
just an example xrandr invocation and you should replace it with what
you are actually trying to achieve).
Hope this helps,
Uli
[1]: https://packages.debian.org/bullseye/xtrace
[2]:
https://gitlab.freedesktop.org/xorg/proto/randrproto/-/blob/master/randrproto.txt
--
"Do you know that books smell like nutmeg or some spice from a foreign
land?"
-- Faber in Fahrenheit 451
More information about the Xcb
mailing list