# 24 bit color depth problems with xfree86 4.3.0 savage driver

## Jaime_T

Hi all.

I've just installed Gentoo on my IBM T21 laptop, and everything's fantastic apart from a strange problem with X: when I set the color depth to 16 bit, everything works as expected, but when I set it 24 bit, the color palette appears to be greatly reduced. To try to describe the problem as accurately as possible, if I set my desktop background style to be "horizontal gradient" from black to white, it appears as 64 vertical bars of grey, rather than a smooth gradient. What's even stranger is that I've taken a screenshot of my desktop using gnome-panel-screenshot, and it appears perfect when I view the .png file on win2k on the same machine! As I'm new to Linux, I've spent a few days reading around, and I've found that someone's already logged the same problem for Redhat 9:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=88264

I've searched Gentoo's bug database, and read every bug matching "savage" and nothing's suitable. I've also read every bug matching "savage" on xfree's bug database, and I did find these:

http://bugs.xfree86.org/show_bug.cgi?id=75

http://bugs.xfree86.org/show_bug.cgi?id=358

They basically have this problem marked as CLOSED-FIXED, but I'm still getting the same problem on the latest Gentoo (I note that the bug hasn't been closed on the Redhat bug list, either!)

My drivers report:

# strings /usr/X11R6/lib/modules/drivers/savage_drv.o | grep version

driver (version 1.1.27t) for S3 Savage chipsets

which, if I'm correct, are the latest available from Tim Roberts' web page:

http://www.probo.com/timr/savage40.html

(I assume the xfree ebuild uses these instead of those located in the xfree sources, but I don't understand exactly how ebuilds work yet!) Just to see if it's been fixed in the latest cvs drivers, I've also tried those available from:

http://www.xfree86.org/~alanh/

and they too still have the same problem. Could I be making some fundamental mistake somewhere - is this not really a bug in the savage driver at all, but rather a problem with my install? Should I submit another bug straight to the xfree86 team, or should I submit a bug to Gentoo's database first?

If anybody could give me an idea of what to do next, I'd really appreciate it. I'll happily test this out with as many different versions as is required to find the problem, and I've got a lot of xdpyinfo output and X logs!

TIA, Jaime

----------

## chizu

Which card is this? I've got a S3 SuperSavage 16mb and it doesn't support 24-bit color. I don't think S3 makes many cards that actually support anything above 16-bit color.

----------

## Jaime_T

According to lspci, the card is:

S3 Inc 86C270-294 Savage/IX-MV (rev 13)

I think the card _is_ capable of 24 bit depth for two reasons:

a) I can get 24 bit under win2k (but it's best not to mention that os here!), and

b) xdpyinfo tells me it's running in 24 bit mode (even though it looks much worse than 8 bit mode!). Here's the xdpyinfo output:

name of display:    :0.0

version number:    11.0

vendor string:    Gentoo Linux (XFree86 4.3.0, revision r3)

vendor release number:    40300000

XFree86 version: 4.3.0

maximum request size:  4194300 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 0x1e00008, revert to Parent

number of extensions:    30

    BIG-REQUESTS

    DEC-XTRAP

    DOUBLE-BUFFER

    DPMS

    Extended-Visual-Information

    FontCache

    GLX

    LBX

    MIT-SCREEN-SAVER

    MIT-SHM

    MIT-SUNDRY-NONSTANDARD

    RANDR

    RECORD

    RENDER

    SECURITY

    SGI-GLX

    SHAPE

    SYNC

    TOG-CUP

    X-Resource

    XC-APPGROUP

    XC-MISC

    XFree86-Bigfont

    XFree86-DGA

    XFree86-Misc

    XFree86-VidModeExtension

    XInputExtension

    XKEYBOARD

    XTEST

    XVideo

default screen number:    0

number of screens:    1

screen #0:

  dimensions:    1400x1050 pixels (287x215 millimeters)

  resolution:    124x124 dots per inch

  depths (7):    24, 1, 4, 8, 15, 16, 32

  root window id:    0x40

  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:    0xfa2033

    KeyPressMask             KeyReleaseMask           EnterWindowMask          

    LeaveWindowMask          ButtonMotionMask         StructureNotifyMask      

    SubstructureNotifyMask   SubstructureRedirectMask FocusChangeMask          

    PropertyChangeMask       ColormapChangeMask       

  number of visuals:    8

  default visual id:  0x23

  visual:

    visual id:    0x23

    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:    0x24

    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:    0x25

    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:    0x26

    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:    0x27

    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:    0x28

    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:    0x29

    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:    0x2a

    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

Both the xdpyinfo output and the screenshot trick tell me the card is working perfectly, but from where I'm sitting I can see a big problem! I'm not too sure which direction I should go next: gentoo bugzilla, Tim Roberts (www.probo.com) or xfree bugzilla...!

Jaime

----------

## yeags_1001

Just to weigh in I'm having the same problem with my thinkpad T22.  Running lspci gives me the same info that Jaime_T posted for hardware.

I'm running X.org 6.7.0 rev r2-1.3, and my color depth looks fine when running gensplash at 1024x768-32@70

yeags_1001

----------

## Jaime_T

If anyone's still interested in this bug, it's just been fixed in xorg's savage driver in cvs (yippee!!) - please see:

https://bugs.freedesktop.org/show_bug.cgi?id=3127

HTH, Jaime

----------

