{"record":{"id":"74d7db2f0cc66f15","repo":"Yalantis/uCrop","slug":"init-fullscreen-xrandr-extension-not-supported","errorCode":null,"errorMessage":"init_fullscreen(): Xrandr extension not supported by the X server.","messagePattern":"init_fullscreen\\(\\): Xrandr extension not supported by the X server\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"ucrop/src/main/jni/CImg.h","lineNumber":10257,"sourceCode":"            const unsigned int\n              nw = (unsigned int)(X11_attr.resolutions[i].width),\n              nh = (unsigned int)(X11_attr.resolutions[i].height);\n            if (nw>=_width && nh>=_height &&\n                nw<=(unsigned int)(X11_attr.resolutions[X11_attr.curr_resolution].width) &&\n                nh<=(unsigned int)(X11_attr.resolutions[X11_attr.curr_resolution].height))\n              X11_attr.curr_resolution = i;\n          }\n          if (X11_attr.curr_resolution>0) {\n            XRRScreenConfiguration *config = XRRGetScreenInfo(dpy,DefaultRootWindow(dpy));\n            XRRSetScreenConfig(dpy,config,DefaultRootWindow(dpy),\n                               X11_attr.curr_resolution,X11_attr.curr_rotation,CurrentTime);\n            XRRFreeScreenConfigInfo(config);\n            XSync(dpy,0);\n          }\n        }\n      }\n      if (!X11_attr.resolutions)\n        cimg::warn(_cimgdisplay_instance\n                   \"init_fullscreen(): Xrandr extension not supported by the X server.\",\n                   cimgdisplay_instance);\n#endif\n\n      const unsigned int sx = screen_width(), sy = screen_height();\n      if (sx==_width && sy==_height) return;\n      XSetWindowAttributes attr_set;\n\n      attr_set.background_pixel = XBlackPixel(dpy,XDefaultScreen(dpy));\n      attr_set.override_redirect = 1;\n      _background_window = XCreateWindow(dpy,DefaultRootWindow(dpy),0,0,sx,sy,0,0,\n                                         InputOutput,CopyFromParent,CWBackPixel | CWOverrideRedirect,&attr_set);\n      XEvent event;\n      XSelectInput(dpy,_background_window,StructureNotifyMask);\n      XMapRaised(dpy,_background_window);\n      do XWindowEvent(dpy,_background_window,StructureNotifyMask,&event);\n      while (event.type!=MapNotify);\n","sourceCodeStart":10239,"sourceCodeEnd":10275,"githubUrl":"https://github.com/Yalantis/uCrop/blob/f788b534b48c144edf786c8cddbf0e029e637804/ucrop/src/main/jni/CImg.h#L10239-L10275","documentation":"CImgDisplay::init_fullscreen() uses the Xrandr extension to enumerate and switch X server display resolutions for fullscreen mode. When the X server does not support/report Xrandr, no resolutions list can be built and cimg::warn() emits this non-fatal warning; the code then falls back to simply resizing the window to the current screen size. Fullscreen still works, but native resolution switching is unavailable.","triggerScenarios":"Calling CImgDisplay::toggle_mode()/fullscreen on an X server without the RANDR extension (older servers, or servers with RANDR disabled), or linking against a CImg built without Xrandr support while the server also lacks it.","commonSituations":"Running on minimal/legacy X servers (Xvfb, old VNC, remote X), containers without xrandr support, X servers launched without the RANDR extension enabled.","solutions":["Verify Xrandr support with `xdpyinfo -ext RANDR` or `xrandr` and enable RANDR on the X server if possible","Accept the warning: fullscreen degrades gracefully to current-resolution fullscreen, which is usually fine","Use Xvfb/X servers with RANDR enabled, or run a compositor/desktop session that supports it","Upgrade the X server / graphics stack on headless or embedded systems"],"exampleFix":"// before (headless CI)\nXvfb :1 &  // older Xvfb without RANDR\n// after\nXvfb :1 -screen 0 1920x1080x24 +extension RANDR &","handlingStrategy":"fallback","validationCode":"// shell: verify Xrandr before enabling resolution-switching fullscreen\nxdpyinfo -ext RANDR | grep RANDR || echo \"Xrandr unavailable; use current-resolution fullscreen\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run X servers with the RANDR extension enabled (xrandr must work in the session)","For headless CI use Xvfb with +extension RANDR","Design fullscreen code to tolerate no resolution switching","Log the warning instead of failing the app; CImg falls back gracefully"],"tags":["x11","xrandr","fullscreen","display","cimg"],"backgroundTag":"unsupported-feature","analyzedSha":"f788b534b48c144edf786c8cddbf0e029e637804","analyzedAt":"2026-09-08T08:36:04.887Z","contentChangedAt":"2026-09-08T08:36:04.887Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}