Re: xcb_randr_set_screen_size_checked error
Andrey Af <[email protected]> Fri, 3 Sep 2021 14:52:40 +0000
| Newsgroups | gmane.comp.freedesktop.xcb |
|---|---|
| Message-ID | <CAGusqHLcmPo0=GocBen0rf6pysT=ZE84LbmHMo5keSEMWwV8hQ@mail.gmail.com> |
Hi, Your manual is helped me a lot! I did it xcb_randr_get_screen_info + xcb_randr_set_screen_config and everything worked out, Thank you! 2021-09-03 11:56 GMT, Uli Schlachter <[email protected]>: > 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 >