Subject: xsrc/30451: XDM won't start on 8 bit framebuffer
To: None <xsrc-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <holger@jhweiss.de>
List: netbsd-bugs
Date: 06/07/2005 02:35:00
>Number:         30451
>Category:       xsrc
>Synopsis:       XDM won't start on 8 bit framebuffer
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 07 02:35:00 +0000 2005
>Originator:     Holger Weiss
>Release:        NetBSD 2.0_STABLE
>Organization:
Individual Network Berlin e.V.
>Environment:
System: NetBSD Hops.ZEDAT.FU-Berlin.DE 2.0_STABLE NetBSD 2.0_STABLE (GENERIC) #0: Mon May 23 01:05:33 CEST 2005 holger@Hops.ZEDAT.FU-Berlin.DE:/usr/pkg/build/obj/sys/arch/sparc64/compile/GENERIC sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	Since XDM uses the NetBSD logo pixmap by default, XDM will
refuse to start (at least) when using a cgsix (8 bit) framebuffer on
NetBSD/sparc64 running Xsun:

| X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
|   Major opcode of failed request:  14 (X_GetGeometry)
|   Resource id in failed request:  0x0
|   Serial number of failed request:  293
|   Current serial number in output stream:  293

This happens because NetBSD.xpm uses more than 256 colors.  Telling XDM
to use NetBSDbw.xpm won't help, as this is a 256 color (grayscale)
pixmap.
>How-To-Repeat:
	At least on sparc/sparc64, when using an 8 bit framebuffer:
$ echo xdm=YES >> /etc/rc.conf
$ /etc/rc.d/xdm start
>Fix:
	Either revert to using the XFree86 logos or reduce the number of
colors used in xsrc/xfree/xc/programs/xdm/config/NetBSD.xpm to less than
256.  Apart from that, NetBSDbw.xpm should probably be converted to an 1
bit pixmap.  For example:

ftp://ftp.in-berlin.de/pub/users/weiss/NetBSD.xpm
ftp://ftp.in-berlin.de/pub/users/weiss/NetBSDbw.xpm