With the standard "vga" driver, with -depth 1 or -depth 4 (parameter to the /usr/bin/X server), the X server fails to load the "xf1bpp" module with an error and quit. dlopen: /usr/lib/xorg/modules//libxf1bpp.so: undefined symbol: xf1bppDoBitbltCopy Reproducible: Always Steps to Reproduce: 1. Create a Device section in xorg.conf with "vga" as Driver module, a Screen section using this display device, and a "VgaLayout" ServerLayout section using this screen. 2. xinit -- -layout VgaLayout -depth 1 Actual Results: xinit fails, with the following error message: dlopen: /usr/lib/xorg/modules//libxf1bpp.so: undefined symbol: xf1bppDoBitbltCopy (EE) Failed to load /usr/lib/xorg/modules//libxf1bpp.so (EE) VGA: Failed to load module "xf1bpp" (loader failed, 7) (EE) Screen(s) found, but none have a usable configuration. Fatal server error: no screens found Expected Results: The X server should start without error and display a bichrome desktop on the display. It looks like /usr/lib/xorg/modules/libxf1bpp.so (as seen with objdump -t) imports some symbols (xf1bpp*) such as xf1bppDoBitbltCopy but exports them with a different name (mfb*) such as mfbDoBitbltCopy. There seems to be some transition in naming conventions that hasn't been consistently applied to the source code, making some modules use one name, and other modules use the other name. The relevant sources files are: ./hw/xfree86/xf1bpp/mfbmap.h Which contains #define mfbDoBitbltCopy xf1bppDoBitbltCopy #define mfbDoBitbltCopyInverted xf1bppDoBitbltCopyInverted ... And tons of similar #defines This mfbmap.h isn't properly included in some files using these symbols, such as ./mfb/mfbbitblt.c ./mfb/mfbbstore.c ./mfb/mfbimage.c and a few others. All these files #include a common "mfb.h" (./mfb/mfb.h). Then, I added a line: #include <../xf1bpp/mfbmap.h> /* added by me */ in ./mfb/mfb.h (./hw/xfree86/os-support is in the include path when xorg-server is built) There were undefined symbol errors related to two symbols remapped in mfbmap.h: xf1bppendtab and xf1bppmask. The relevant mfbmap.h lines are: #define endtab xf1bppendtab #define mask xf1bppmask Commenting out these two lines + including mfbmap.h in mfb.h, makes the compilation process successful and seems to fixes the bug. X.org can be successfully started with 1 and 4 bits color depth. I'll attach the patch. It's just a ugly hack given as a pointer to problem's direction.
Created attachment 179827 [details, diff] An ugly patch that seems to fix the bug but might not (due to the endtab and mask issue) There might be an issue due to the removal of the endtab and mask #defines, but, looking at objdump -t on libxf1bpp.so, xf1bppendtab and xf1bppmask don't appear, so, I guess it's ok, unless some third-party modules use them... BTW, endtab and mask are global variables (in .data). I think a proper patch should replace instances of mask and endtab with xf1bppmask and xf1bppendtab in the source code.
Sorry, but we won't include any more patches for 1.3. Feel free to keep it in a local overlay. And in any case, the vga driver is now deprecated in favor of the vesa driver, and the mfb/ subdirectory has been completely removed from xorg-server in git. Thanks for understanding.