[Xcb] How can I increase the maximum request length?

Uli Schlachter psychon at znc.in
Wed Jan 30 12:24:39 UTC 2019


On 19.01.19 03:51, paul ewing wrote:
> Ah, I think the previous email I linked to may have simply been wrong. It
> states that BIG-REQUESTS increases the max request size to 16GB from 256KB but
> I think the maximum is actually only 16MB.

The maximum request length is determined by the X11 server. Without
BIG-REQUESTS, the X11 server can announce support for at most 256 KiB,
but it can also support less. BIG-REQUESTS only changes this so that the
X11 server *can* support bigger requests. However, the limit is still
imposed by the X11 server and any overly large requests cause the
connection to be terminated. So no, you cannot increase the limit.

Also, XCB automatically uses the BIG-REQUESTS extension to query the
maximum supported request size. So, you can just use
xcb_get_maximum_request_length() to query the limit that the X11 server
announces. Splitting huge requests into smaller chunks is something that
libxcb does not do for you.

> I'll split up the image in the application code for now and see if I can come
> up with a clean implementation before submitting a pull request to xcb.

Possibly helpful pointer:

> ________________________________
> From: Bart Massey <bart at cs.pdx.edu>
> Sent: Friday, January 18, 2019 5:39 PM
> To: paul ewing
> Cc: xcb at lists.freedesktop.org
> Subject: Re: [Xcb] How can I increase the maximum request length?
> Offhand, looks like your bigger display is too big to use a single PutImage request even with BIG-REQUESTS enabled. Looks like xcb_image_put() doesn't break the request into pieces for you (maybe it should? pull requests welcome) so you'll have to put the image a piece at a time: break it into bands and use the y offset.

>From a quick look: xcb_image_put() does not break requests into smaller
chunks. It just calls xcb_put_image() with some values it got out of the

Worse, it cannot (easily) support splitting up huge requests. It returns
the void cookie that is used by the request. If it generates multiple
requests, which of the cookies should be returned?


Homophobia - The fear that another man will treat you the way you treat

More information about the Xcb mailing list