Originally Published: Thursday, 5 October 2000 Author: Mike Baker
Published to: interact_articles_irc_recap/IRC Recap Page: 1/1 - [Printable]

Best of IRC for Thursday, October 5th!

It's time once again for another edition of Best of IRC. As always, we'll be taking an indepth look at some of the questions asked on #Linuxhelp. If you haven't already been to #Linuxhelp, you'll find instructions on how to get there at the bottom of the Live! page; feel free to stop by and ask questions or possibly even answer a few!

   Page 1 of 1  

It's time once again for another edition of Best of IRC. As always, we'll be taking an indepth look at some of the questions asked on #Linuxhelp. If you haven't already been to #Linuxhelp, you'll find instructions on how to get there at the bottom of the Live! page; feel free to stop by and ask questions or possibly even answer a few!

XF86Config

Ok, who can tell me how to switch from 256 colors to 16 bit in the XF86Config file?
<allen> Ok, who can tell me how to switch from 256 colors to 16 bit in the XF86Config file?
<[MbM]> allen: DefaultColorDepth 16
<[MbM]> allen: goes in the screen section, read man XF86Config
<allen> awesome, thanks mbm. Is there a way to ensure that I can support it?
<allen> already read the man for that thru and thru
<[MbM]> try startx -- -bpp 16.. if that works then add it
<allen> I'm pretty sure that it's in there already, I had a heck of a time disabling the virtual desktop
<[MbM]> just put your resultions i the rigth order and the virtaul desktop goes away
<allen> what is the right order for the resolution?
<[MbM]> allen: X always boots with the first resolution listed and the desktop the size of the largest resolution listed
<[MbM]> allen: so you want to list the resolutions in order from largest to smallest
<allen> Well I'll be, I tried for forever to get that info earlier. :)

This is a question that gets asked alot around #Linuxhelp. Bits Per Pixel (bpp) or Color depth, as most people know it, sets the maximum number of colors that can be used by the X server at a single time. The number of colors available to the server is 2^bpp, where bpp is one of {1,4,8,16,24,32}. When you're running in 8bpp, your X server is either dithering the colors or using palette swapping. For those of you that have never seen palette swapping, it's where the palette is adjusted to give the current window the best range of colors with total disregard to any of the other windows. In short, your desktop looks horrible.

So how do you change your color depth? There are two ways. The first way I'll show you is a temporary method, useful for testing if your X server and video card can handle the depth correctly.

startx -- -bpp 16

If you're not already in X, this command will start up an X server with the desired bpp; no changes will be made to your XF86Config. If you're in X and you get an error about "Server is already active for display 0," you can either exit out of your current X session or try:

startx -- -bpp 16 :1

All this does is start a new X using a different screen number, meaning you can have multiple copies of X running at once. Nifty trick, eh?

If all seems to be going well with the startx command and you decide you want a more permanent change, then it's time to edit XF86Config. Depending on your distribution, XF86Config is probably in either /etc or /etc/X11. Find the screen section of your XF86Config file and add a "DefaultColorDepth" with the desired bpp. eg:

Section "Screen"
Driver "Accel"
Device "My Video Card"
Monitor "My Monitor"
DefaultColorDepth 16
BlankTime 0
SuspendTime 0
OffTime 0
SubSection "Display"
Depth 8
...

Once done, save the file and try out your new settings.

How high of a bpp value can I use?

The answer to that question depends mostly on which video card you have -- more precisely, how much memory your video card has. The higher the bpp, the more more memory you'll use. This basically means that if you want the highest bpp your card offers, you might have to use a lower resolution.

Help, my desktop pans around as I move the mouse!

The X server has the ability to handle resolutions larger than your card can display, known as a virtual desktop. The effect of a virtual desktop is like looking at a closeup of small portion of a much larger desktop. If we look back in our XF86Config just a few lines after where we added the DefaultColorDepth, we'll find a Display section. There's one display section for every bpp that your server is configured for.

SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "768x576" "640x480" "640x400"
ViewPort 0 0
EndSubSection
Note both the resolution order and the ViewPort. The X server will start in the first resolution listed, and can be changed with CTRL-ALT-PLUS / MINUS. The virtual desktop is either the size of the largest resolution or the size specified by ViewPort, whichever is larger. To disable the virtual desktop, set ViewPort 0 0 and make sure your resolutions are in descending order.

Redhat 7.0

Why does Redhat have issues compiling the kernel?
<joeyjoey> hey guys I know linux very well but am having some problems recompiling my kernel on my redhat 7.0 box
<joeyjoey> I downloaded the source and i keep getting errors when doing a make bzImage
<joeyjoey> ....well 2.2.16 from the default install...then i downloaded the source from ftp.kernel.org for 2.2.16....and then I tried 2.2.17 but all of them give the same error
<joeyjoey> make[2]: Entering directory `/usr/src/linux/arch/i386/lib'
<joeyjoey> gcc -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__ -traditional -c checksum.S -o checksum.o
<joeyjoey> checksum.S:231: badly punctuated parameter list in #define
<joeyjoey> checksum.S:237: badly punctuated parameter list in #define
<joeyjoey> make[2]: *** [checksum.o] Error 1
<joeyjoey> make[2]: Leaving directory `/usr/src/linux/arch/i386/lib'
<joeyjoey> make[1]: *** [first_rule] Error 2
<joeyjoey> make[1]: Leaving directory `/usr/src/linux/arch/i386/lib'
<joeyjoey> make: *** [_dir_arch/i386/lib] Error 2
<e-fudd> joeyjoey: make CC=kgcc bzImage
<joeyjoey> e-fudd is that new for redhat 7.0?
<e-fudd> joeyjoey: yep
<BlckPhnx> e-fudd: What's the actual problem with RedHat 7.0 that prevents the default compiler compiling the kernel?
<VortX> BlckPhnx: the c compiler is totally screwed
<joeyjoey> I am guessing that is a known issue

Red Hat has a history of including the including alpha software with new releases. Red Hat 7.0 includes version 2.96 of the gnu c compiler (better known as gcc). Unfortunately, the latest stable release of gcc is 2.95.2 and 2.96 has compatibility isses with the Linux kernel. These issues are kernel-related and will be fixed in later kernel versions. The solution for now is to either use kgcc to compile the kernel or to downgrade to gcc 2.95.2. You can force the kernel compile to use kgcc by adding CC=kgcc to your make command line as shown above. RPMs of gcc 2.95.2 should be available at rpmfind.net.

You may recall this same issue being discussed when gcc 2.95 (formerly known as egcs) first came out.





   Page 1 of 1