LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   X11 messed up - how to change color depth and available color map (https://www.linuxquestions.org/questions/linux-newbie-8/x11-messed-up-how-to-change-color-depth-and-available-color-map-915081/)

Hydrazin 11-23-2011 06:22 AM

X11 messed up - how to change color depth and available color map
 
Hi!

I was trying to work-around for more than two days now and probably this is a very easy task for an expert.

I need a very old software to analyze some (new :) data. It requests this output after
'xdpyinfo':
> number of visuals: 6
> default visual id: 0x21
> visual:
> visual id: 0x21
> class: PseudoColor
> depth: 8 planes
> available colormap entries: 256
> red, green, blue masks: 0x0, 0x0, 0x0
> significant bits in color specification: 8 bits

I am working on a Fedora release 10(Cambridge)
Kernel Linux 2.6.27.41-170.2.117.fc10.i686
GNOME 2.24.3 and a Intel Pentium 4 CPU 3.2GHz


I did not have a xorg.conf so I did:
# Xorg -configure
to copy the configure file from the one created there into /etc/X11/xorg.conf.

If I do xdpyinfo, I get (now):

Code:

name of display:    :0.0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    10503000
X.Org version: 1.5.3
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x1001ec0, revert to Parent
number of extensions:    27
    BIG-REQUESTS
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    Extended-Visual-Information
    GLX
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RANDR
    RENDER
    SGI-GLX
    SHAPE
    SYNC
    TOG-CUP
    VNC-EXTENSION
    X-Resource
    XC-MISC
    XFIXES
    XFree86-DGA
    XFree86-Misc
    XFree86-VidModeExtension
    XINERAMA
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x1024 pixels (338x270 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    8, 1, 4, 15, 16, 24, 32
  root window id:    0x7f
  depth of root window:    8 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 1
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xfa8033
    KeyPressMask            KeyReleaseMask          EnterWindowMask         
    LeaveWindowMask          ExposureMask            StructureNotifyMask     
    SubstructureNotifyMask  SubstructureRedirectMask FocusChangeMask         
    PropertyChangeMask      ColormapChangeMask     
  number of visuals:    6
  default visual id:  0x21
  visual:
    visual id:    0x21
    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:    0x22
    class:    GrayScale
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x23
    class:    StaticColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x24
    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:    0x25
    class:    DirectColor
    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:    0x26
    class:    StaticGray
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits



I guess, that I want the visual id: 0x26 to run (it looks similar to what I need...). Does anyone know how to change that? This is my actual xorg.conf
and I added the line 'DefaultDepth 8'.



Code:

Section "ServerLayout"
        Identifier    "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath  "/usr/lib/xorg/modules"
        FontPath    "catalogue:/etc/X11/fontpath.d"
        FontPath    "built-ins"
EndSection

Section "Module"
        Load  "vnc"
        Load  "extmod"
        Load  "dbe"
        Load  "glx"
        Load  "dri"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option            "Protocol" "auto"
        Option            "Device" "/dev/input/mice"
        Option            "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        #DisplaySize          340  270        # mm
        Identifier  "Monitor0"
        VendorName  "HWP"
        ModelName    "hp L1730"
        HorizSync    30.0 - 83.0
        VertRefresh  56.0 - 76.0
        Option            "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option    "NoAccel"                    # [<bool>]
        #Option    "SWcursor"                  # [<bool>]
        #Option    "Dac6Bit"                    # [<bool>]
        #Option    "Dac8Bit"                    # [<bool>]
        #Option    "BusType"                    # [<str>]
        #Option    "CPPIOMode"                  # [<bool>]
        #Option    "CPusecTimeout"              # <i>
        #Option    "AGPMode"                    # <i>
        #Option    "AGPFastWrite"              # [<bool>]
        #Option    "AGPSize"                    # <i>
        #Option    "GARTSize"                  # <i>
        #Option    "RingSize"                  # <i>
        #Option    "BufferSize"                # <i>
        #Option    "EnableDepthMoves"          # [<bool>]
        #Option    "EnablePageFlip"            # [<bool>]
        #Option    "NoBackBuffer"              # [<bool>]
        #Option    "DMAForXv"                  # [<bool>]
        #Option    "FBTexPercent"              # <i>
        #Option    "DepthBits" :                    8
#        "DepthBits" 8
        #Option    "PCIAPERSize"                # <i>
        #Option    "AccelDFS"                  # [<bool>]
        #Option    "IgnoreEDID"                # [<bool>]
        #Option    "DisplayPriority"            # [<str>]
        #Option    "PanelSize"                  # [<str>]
        #Option    "ForceMinDotClock"          # <freq>
        #Option    "ColorTiling"                # [<bool>]
        #Option    "VideoKey"                  # <i>
        #Option    "RageTheatreCrystal"        # <i>
        #Option    "RageTheatreTunerPort"        # <i>
        #Option    "RageTheatreCompositePort"        # <i>
        #Option    "RageTheatreSVideoPort"        # <i>
        #Option    "TunerType"                  # <i>
        #Option    "RageTheatreMicrocPath"        # <str>
        #Option    "RageTheatreMicrocType"        # <str>
        #Option    "ScalerWidth"                # <i>
        #Option    "RenderAccel"                # [<bool>]
        #Option    "SubPixelOrder"              # [<str>]
        #Option    "ShowCache"                  # [<bool>]
        #Option    "DynamicClocks"              # [<bool>]
        #Option    "VGAAccess"                  # [<bool>]
        #Option    "ReverseDDC"                # [<bool>]
        #Option    "LVDSProbePLL"              # [<bool>]
        #Option    "AccelMethod"                # <str>
        #Option    "DRI"                        # [<bool>]
        #Option    "ConnectorTable"            # <str>
        #Option    "DefaultConnectorTable"        # [<bool>]
        #Option    "DefaultTMDSPLL"            # [<bool>]
        #Option    "TVDACLoadDetect"            # [<bool>]
        #Option    "ForceTVOut"                # [<bool>]
        #Option    "TVStandard"                # <str>
        #Option    "IgnoreLidStatus"            # [<bool>]
        #Option    "DefaultTVDACAdj"            # [<bool>]
        #Option    "Int10"                      # [<bool>]
        #Option    "EXAVSync"                  # [<bool>]
        #Option    "ATOMTVOut"                  # [<bool>]
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName  "Radeon RV100 QY [Radeon 7000/VE]"
        BusID      "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device    "Card0"
        Monitor    "Monitor0"
        DefaultDepth        8
        SubSection "Display"
                Viewport  0 0
                Depth    8
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    4
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    8
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    15
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    16
        EndSubSection
        SubSection "Display"
                Viewport  0 0
                Depth    24
        EndSubSection
EndSection


For reasons I do not understand, the color mode changed after the screensaver was activated. I do now have still a good resolution but less colors, there is no light green color and everything seems to be messed up.
Is there a way to change to the color-mode I wanted (in the beginning of the meassage)?

Thanks a lot for your help,
Christoph

corp769 11-23-2011 06:41 AM

You do know that Fedora 10 is completely unsupported? I highly suggest you upgrade to the latest version, which is Fedora 16. And I also highly recommend that you edit your post, and use code tags, as such - [code ] [/code ] (without the spaces)

Hydrazin 11-23-2011 06:50 AM

thanks first of all and sorry for the messy message.
OK, I'll upgrade first

corp769 11-23-2011 06:55 AM

Awesome, thanks man! Most people ignore me when I ask them to use code tags..... I love you for that, I really do..... :p

Anyway, versions up to Fedora 13 are not supported anymore. Fedora 16 just came out not that long ago, and is the freshest version. Upgrading will be your best bet, since you will be running the latest "Fedora" kernel, and all security related bug fixes will be installed. This is for your safety.....

Hydrazin 12-02-2011 04:27 AM

Here I am again...

I upgraded to fedora 16 now.

I need an old scientific software to analyze my data. It's about 15-20 years old but still the fastest,
easiest and most convenient way to work and it would save me months (!) if I could use it.
It needs an 8-bit display and 256 colors in order to display correctly.

my pdpyinfo looks like this:

Code:

[nmr@04-PM023 ~]$ xdpyinfo
name of display:    :0.0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    10503000
X.Org version: 1.5.3
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x4200008, revert to Parent
number of extensions:    28
    BIG-REQUESTS
    Composite
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    Extended-Visual-Information
    GLX
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RANDR
    RENDER
    SGI-GLX
    SHAPE
    SYNC
    TOG-CUP
    X-Resource
    XC-MISC
    XFIXES
    XFree86-DGA
    XFree86-DRI
    XFree86-Misc
    XFree86-VidModeExtension
    XINERAMA
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x1024 pixels (338x270 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x74
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xfa8033
    KeyPressMask            KeyReleaseMask          EnterWindowMask         
    LeaveWindowMask          ExposureMask            StructureNotifyMask     
    SubstructureNotifyMask  SubstructureRedirectMask FocusChangeMask         
    PropertyChangeMask      ColormapChangeMask     
  number of visuals:    3
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x22
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x62
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits

Now, I would expect to have something like visual id: with depth 8 and 256 colors but anyway...

The software I want to use tells me the following:
1. Make sure there is not a current X server running on :1
2. /usr/X11R6/bin/X :1 -depth 8 -auth any vt8
3. /usr/X11R6/bin/twm -display :1
4. Use Control-Alt-F8 to switch to :1 display

Following these steps gives me a color-error message of the program I want to use, but at least the windows of it open,
so at least it seems to start. Thats why I guess its a color-issue 'only'.

If I do as told, the screen freezes if I follow the 2nd instruction as a root user.
without root, I get this here:
Code:

Build ID: xorg-x11-server 1.5.3-18.fc10
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Fri Dec  2 11:11:08 2011
(EE) Unable to locate/open config file

New driver is "ati"
(==) Using default built-in configuration (30 lines)

(EE) open /dev/fb0: No such file or directory

NTSC PAL PAL-M
finished output detect: 0


finished output detect: 1
finished output detect: 2
finished all detect
before xf86InitialConfiguration

in RADEONProbeOutputModes
after xf86InitialConfiguration
Entering TV Save
Save TV timing tables
saveTimingTables: reading timing tables
TV Save done
(EE) RADEON(0): Value for Option "DepthBits" must be 16 or 24
(EE) RADEON(0): [dri] RADEONInitVisualConfigs failed (depth 8 not supported).  Disabling DRI.
init memmap
init common
init crtc1
init pll1
freq: 108000000
best_freq: 108000000
best_feedback_div: 16
best_ref_div: 2
best_post_div: 2
restore memmap
restore common
restore crtc1
restore pll1
finished PLL1
restore FP
init memmap
init common
init crtc1
init pll1
freq: 108000000
best_freq: 108000000
best_feedback_div: 16
best_ref_div: 2
best_post_div: 2
restore memmap
restore common
restore crtc1
restore pll1
finished PLL1
restore FP


The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                  Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server


The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                  Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                  Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server



Entering Restore TV
Restore TV PLL
Restore TVHV
Restore TV Restarts
Restore Timing Tables
Restore TV standard
Leaving Restore TV

I guess that [text] '(EE) RADEON(0): Value for Option "DepthBits" must be 16 or 24
(EE) RADEON(0): [dri] RADEONInitVisualConfigs failed (depth 8 not supported). Disabling DRI.'
[/text] is at least one source of error...

If I then follow 3. and 4., my program gives me the error. Anyway, if I do xdpyinfo in the new environment, I get
Code:

name of display:    :1.0
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    10503000
X.Org version: 1.5.3
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x400008, revert to Parent
number of extensions:    26
    BIG-REQUESTS
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    Extended-Visual-Information
    GLX
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RANDR
    RENDER
    SGI-GLX
    SHAPE
    SYNC
    TOG-CUP
    X-Resource
    XC-MISC
    XFIXES
    XFree86-DGA
    XFree86-Misc
    XFree86-VidModeExtension
    XINERAMA
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x1024 pixels (338x270 millimeters)
  resolution:    96x96 dots per inch
 depths (7):    8, 1, 4, 15, 16, 24, 32
  root window id:    0x7f
  depth of root window:    8 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 1
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xd2001d
    KeyPressMask            ButtonPressMask          ButtonReleaseMask
    EnterWindowMask          StructureNotifyMask      SubstructureRedirectMask
    PropertyChangeMask      ColormapChangeMask
  number of visuals:    6
  default visual id:  0x21
  visual:
    visual id:    0x21
    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:    0x22
    class:    GrayScale
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x23
    class:    StaticColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x24
    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:    0x25
    class:    DirectColor
    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:    0x26
 class:    StaticGray
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits

And here, the 8 planes depth option is available and seems to be set correctly?

Is there a way to fix this? My program gives me:
SetColor: Unable to allocate 16 or 3 color cells from ColorMap

Could it be that there is a problem with the monitor?
Or that there is a general problem with the software I want to use and it does not depend on the X11 settings?

I do not have a X11.conf file.
I am using gnome-terminal within twm.
I tried to use Xephyr and Xnest to create 8-bit windows but both methods did not work...

Thanks a lot for any help,
Christoph

Hydrazin 12-02-2011 06:39 AM

Okay, I wanted to run 'pipp' to assign NMR spectra and I am still having the same problems on Fedora 16 (as on 10 and 13).
Tried also on Ubuntu 10.4, RedHat 3.x but still had similar issues with sometimes white-on-white shells.

On an old Opensuse 2.6 the program (pipp) runs right away using the 000_INSTALL instructions
and setting the 'sentenv BYTE_SWAP_RD_ACQ 1'
and having nmrpipe installed for proper fonts.

cheers
Christoph

paz9 12-11-2013 08:38 AM

8-bit color using open-source video drivers
 
Not sure if you ever got this working, but for the record, I was able to get 8-bit color using the open-source graphics card drivers. You have to remove the proprietary driver. The proprietary drivers (from Matrox and ATI anyway) do not support 8-bit. That seems to be evident from your error messages also. The open-source drivers have other limitations though.
Also, under 8-bit color you only have 256 entries in the system colormap, so unless your application uses a private colormap, you will have issues even with a window manager like Gnome using up all the entries. This makes you application look weird. I used Mwm and had pretty good results, since it uses a lot fewer colors and is easier to configure.


All times are GMT -5. The time now is 11:52 AM.