.text_background does not palette color correctly

Bug #257181 reported by red_team316
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usplash (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: usplash

"text background" does not palette properly. By changing the palette colors to all the same color shows this bug when you test it. Just don't set them all to zero(black) as for some reason that actually worked. It should give you a rectangle of color where the text box is but it doesn't! I shows white text on light pink. See the attached screenshot. It's really noticeable especially when using 3's or some other low palette number. Typically, the first several palette indexes in an image will be the darkest colors and so close to black that it's really hard to tell the difference I.E. 0x000000 = black, 0x020202 = very close to black. But these colors show up as mildly bright greens or magenta or some other weird color.

/* Palette indexes, use these or replace with another palette index, say 3 */
.background = 254,
.progressbar_background = 254,
.progressbar_foreground = 254,
.text_background = 254,
.text_foreground = 254,
.text_success = 254,
.text_failure = 254,

See bug #66760 for other info:
https://bugs.launchpad.net/ubuntu/+source/usplash/+bug/66760

Revision history for this message
red_team316 (redteam316) wrote :
Revision history for this message
red_team316 (redteam316) wrote :
Revision history for this message
Hernando Torque (htorque) wrote :

I too had this problem until setting the framebuffer resolution to the resolution set in /etc/usplash.conf [4:3].

I had created a test theme where the shown color wasn't even in the palette, so I guess it has nothing to do with the theme.

Revision history for this message
red_team316 (redteam316) wrote :

Can you explain exactly what you did as far as setting the framebuffer resolution. . .
Do you mean you re-enabled vesafb and fbcon framebuffer modules, as well as set the vga=xxx line in your grub?
I know gutsy and later the vesafb is disabled by default.

Also what resolution is in your usplash.conf?

And I have to agree, I think that it has nothing to do with the theme itself. I believe it has to do with other low-level code, but now that you got me thinking, it may be expecting vesafb to be enabled...

Revision history for this message
Hernando Torque (htorque) wrote :

I just properly set up uvesafb like mentioned here as workaround:

https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/246269

Ubuntu's v86d didn't work for me and I installed the latest version available here:

http://dev.gentoo.org/~spock/projects/uvesafb/

To install:

1. Extract
2. Open Makefile and replace
KDIR ?= /lib/modules/$(shell uname -r)/source
with
KDIR ?= /lib/modules/$(shell uname -r)/build
3. Install libklibc and libklibc-dev
4. ./configure --with-klibc && make && sudo make install

Reboot => Usplash and uvesafb working.

Resolutions (usplash and uvesafb) are 1024*768 for my 1280*768 laptop and 1280*1024 for my PC.

Revision history for this message
Luca Béla Palkovics (luca-bela-palkovics) wrote :

Here is the bug fix:

in usplash_svga.c it does changes the color-indices to 16Bit colors if the screen is in 16Bit mode.
At Ubuntu (9.10 Jaunty, don't know if it's on different versions too) the usplash runs at 16bit mode.

When you change the background-color or background-color of the text liek to 0xFF
It now should use the color with the index of 0xFF.
And Usplash will do this right if it runs at 8bit mode (but thats just a stupid workaround)

The original in usplash_svga.c
void usplash_svga_clear(int x1, int y1, int x2, int y2, int colour)
{
 gl_fillbox(x1, y1, x2 - x1, y2 - y1, colour);
}

I fixed this code to this:
void usplash_svga_clear(int x1, int y1, int x2, int y2, int colour)
{
 //BUG FIXED BY Luca Béla Palkovics
 //Original: gl_fillbox(x1, y1, x2 - x1, y2 - y1, colour);
 uint16_t value;
 if (bpp == 8)
  value=colour;
 else
 { //16 BIT MODE => GET COLOR FROM PALETTE !!
  value = vesa_palette[pixmap->data[i]].blue >> 3;
  value |=(vesa_palette[pixmap->data[i]].green >> 2) << 5;
  value |=(vesa_palette[pixmap->data[i]].red >> 3) << 11;
 }
 gl_fillbox(x1,y1,x2-x1,y2-y1,value)
}

now it will use the right color at 16Bit mode and 8Bit mode

Revision history for this message
Luca Béla Palkovics (luca-bela-palkovics) wrote :

Peeh made a debdiff ..

Revision history for this message
Luca Béla Palkovics (luca-bela-palkovics) wrote :

Change the change description

Revision history for this message
Luca Béla Palkovics (luca-bela-palkovics) wrote :

Har sorry.. but I used old source files.. they weren't finish ..
Sorr this is my first time doing this xD

Here is the correct file which

Revision history for this message
Kees Cook (kees) wrote :

Is there a theme this bugfix can be tested against?

Revision history for this message
Luca Béla Palkovics (luca-bela-palkovics) wrote :

Yeah.. just use the example of the package ibusplash-dev
okay the example is buggy too xD you need to change this:
 .background = 0x0,
   .progressbar_background = 0x7,
   .progressbar_foreground = 0x156,
 .text_background = 0x15,
 .text_foreground = 0x31,
 .text_success = 0x171,
 .text_failure = 0x156,

this can be .. palette only goes till 0xFF xD
I will attach a fixed version here.

In this example the background color of the text-box should be #58451b (color index: 34)
And without the fixed usplash version it will use the color #000034 Blue

But only at 16Bit mode

Revision history for this message
Luca Béla Palkovics (luca-bela-palkovics) wrote :

Ah forget to write
#58451b is a dark olive color (a little bit more brown)

Revision history for this message
Phillip Susi (psusi) wrote :

The usplash package has been superseded by plymouth and has been removed from the Ubuntu archive. Closing all related bugs.

Changed in usplash (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.