X11 messed up - how to change color depth and available color map
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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'.
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)?
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)
Awesome, thanks man! Most people ignore me when I ask them to use code tags..... I love you for that, I really do.....
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.....
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...
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.