Fixing Keyboard Problems in Unix/Linux

August 13, 2002


Symptom - When running Artwork's Motif-based programs on Ultra 5/10 workstations under Solaris 2.6/2.7 the screen buttons are completely black.

Reason - It appears that these new machines ship with built in PGX24 graphics and are set to True Color with 24 bit planes by default. This is a relatively new color mode and Artwork's screen drivers seem to be confused by this setting.

Solution - the solution is to add a setting to your Xservers configuration file so that the graphics mode defaults to 8 plane color depth instead of 24 plane color depth.

example of black buttons in GDSPLOT fill pattern dialog

Details - First you must determine what different color modes your machine supports. This can be determined by issuing the following command:

$ xdpyinfo   [enter]
This command will return lots of information about your graphics adaptor and screen. Scroll down until you see the section that looks like the one below:
default visual id:  0x28             (this shows your default setting ....)
   visual:
     visual id:    0x20
     class:    PseudoColor
     depth:    8 planes
     available colormap entries:    256
     red, green, blue masks:    0x0, 0x0, 0x0
     significant bits in color specification:    8 bits

   visual:
     visual id:    0x25
     class:    TrueColor
     depth:    8 planes
     available colormap entries:    8 per subfield
     red, green, blue masks:    0x7, 0x38, 0xc0
     significant bits in color specification:    8 bits

   visual:
     visual id:    0x28              (this entry matches your default)
     class:    TrueColor
     depth:    24 planes
     available colormap entries:    256 per subfield
     red, green, blue masks:    0xff, 0xff00, 0xff0000
     significant bits in color specification:    8 bits
.
.
.
We see that for the machine above, the current default setting 0x28 is class:True Color with 24 planes of depth. Artwork's screen drivers don't support this depth. But they do support:

0x25  True Color     8 planes
0x20  Pseudo Color   8 planes

So our task is to change the default setting to a supported visual mode - in this case let's use True Color 8 planes.


Modifying the X Server Configuration

In the directory

/usr/dt/config
you will find a file called
 Xservers
. To control the number of planes add the following line at the end of the file:
   :0   Local /usr/openwin/bin/X -dev /dev/fb defdepth 8 
Then exit Openwindows and log back in. This will force the change to take affect. After doing so the same screen that had black buttons will now look like:

GDSPLOT fill pattern screen after reducing color planes to 8 from 24.


Comments
Alternate Syntax:
:0   Local /usr/openwin/bin/X -dev /dev/fb defclass PseudoColor defdepth 8
:0   Local /usr/openwin/bin/X -dev /dev/fb defclass TrueColor defdepth 8
  1. There may be better ways to set the default visual mode.    Edits to the Xservers file will be lost if the Solaris OS is upgraded or reinstalled.
  2. Other applications we have tested only support PseudoColor 8 plane. For example, AutoCAD 13 and RSI programs. More modern programs are starting to support the newer visual modes.
  3. Artwork's programs will support the True Color 24 bit plane in the future.  It is a matter of learning more about this and how our X-Motif development tools must be set.
  4. TrueColor 24 bit visual mode should result in less flashing of colors when changing focus between programs.  Flashing is related to the color palette problem we encounter when Netscape is running simultaneously with one of Artwork's applications. Whether changing our programs to support other visual modes will automatically fix the palette conflict problem with Netscape is unknown at this time.