colors are left on the screen after blanking with usplash enabled

Bug #139453 reported by Evan
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Medium
Colin Ian King
linux-meta (Ubuntu)
Invalid
Undecided
Unassigned
usplash (Ubuntu)
Invalid
High
Unassigned

Bug Description

Binary package hint: usplash

Screen blanking does not work properly when usplash is enabled. I have reproduced this on two physical machines and in VMWare.

Steps to reproduce:
1. switch to a virtual terminal.
2. download and run the attached script or just run a command that outputs colors.
3. wait for the screen to blank.

Result:
Some colors will be left on the screen while the rest of the screen remains blank.

Revision history for this message
Evan (ev) wrote :
Revision history for this message
Evan (ev) wrote :
Revision history for this message
Evan (ev) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

I have reproduced this bug report using the script provided on Gutsy Gibbon.

Changed in usplash:
status: New → Triaged
Evan (ev)
Changed in usplash:
importance: Undecided → High
Revision history for this message
Evan (ev) wrote :

Matthew Garrett believes this might be a kernel issue, so I'm filing it against linux-meta as well.

Revision history for this message
Brian Murray (brian-murray) wrote :

I am still able to recreate this using 2.6.24-10.16-generic on Hardy Heron.

Revision history for this message
Evan (ev) wrote :

I am also still able to recreate this using the 2.6.24-11.11-generic kernel.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Confirmed
Changed in linux:
status: Confirmed → Triaged
Changed in linux:
assignee: ubuntu-kernel-team → colin-king
status: Triaged → In Progress
Revision history for this message
Colin Ian King (colin-king) wrote :

Hi, just to confirm, this is a bug with the vga console driver with setting color palettes and hence it will be wrong on any VGA hardware with the VGA console driver.

It just so happens that screen blanking should set all the colors to black, but it fails to do so. One should be able to reproduce this bug using the following shell script which sets each color to black (colors 0..7) and then restores them.

#!/bin/bash

restore()
{
        echo -en "\033]P0000000"
        echo -en "\033]P1aa0000"
        echo -en "\033]P200aa00"
        echo -en "\033]P3aa5500"
        echo -en "\033]P40000aa"
        echo -en "\033]P5aa00aa"
        echo -en "\033]P600aaaa"
        echo -en "\033]P7aaaaaa"
}

blank()
{
        for i in 0 1 2 3 4 5 6 7
        do
                echo -en "\033]P${i}000000"
                sleep 1
        done
}

blank
sleep 1
restore

Run the original colortable16.sh script and then the one above. It will clear the colors in the color palette one by one, however the same colors are not cleared as in the screen blanking bug - this is because the vgacon driver is cannot set one particular color palette setting.

Please let me know if the script cannot clear the color as in the screen blanking bug. If it does reproduce the bug then I think I have a fix.

Thanks

Revision history for this message
Evan (ev) wrote :

Colin,

Your script reproduces the bug exactly. It cannot clear the orange color.

Thanks

Revision history for this message
Colin Ian King (colin-king) wrote :

Removing usplash from the boot line shows that the vga console does work correctly without usplash, the bug occurs if usplash is not removed.

I've gone through the tty and vgacon drivers and I am pretty certain it is setting up the VGA DAC and palette correctly, so I suspect usplash (or actually the svga or bogl graphics libraries) are interfering with the console colour settings in some way.

After further investigation it appears if usplash is probably not restoring the vga text mode correctly. Looking at the usplash sources:

1) in the svga usplash code usplash_svga_init() in usplash_svga.c does a vga_setchipset() but does not restore the original setting in usplash_svga_done().

2) usplash_svga_setmode() changes the mode but the original mode is not restored in usplace_svga_done() either.

3) In usplash_svga_init(), the current palette is fetched gl_getpalette() after the call to vga_setchipset(). Not sure if this is correct, since swapping chipset before getting the color palette may be the wrong order to get the current VGA palette. Also, the palette is malloc()'d buy the malloc is not checked for a NULL return.

4) As for the bogl library version of the usplash code, I could not see where the original palette is being restored, which concerns me as this will mess up the console colours.

In summary, I think usplash needs tidying up first to make sure it is restoring the screen back to it's correct chipset, mode and palette. Then the code can be checked with my script to see if it is restoring the color palette correctly.

I will mark this as a won't fix on the kernel as I believe this is a usplash specific bug - since the underlying libraries are tinkering with the vga palettes, modes and DAC. If the fixed usplash is still showing this bug, please resubmit this as a kernel bug.

Revision history for this message
Colin Ian King (colin-king) wrote :

Forgot to add that the screen blanking is performed by setting the first 16 palette colors to black. However, if the VGA text mode is not restored back to the correct text mode, then more of the palette colors need to be set to black for screen blanking to occur.

If one runs usplash on the console, more that 16 palette colors need setting to black to clear the screen. However, without running usplash, only 16 palette colors need to be set to black. This suggests that usplash is returning the console back to a incorrect/different mode/setting when usplash exits.

Changed in linux:
status: In Progress → Won't Fix
Rick Clark (dendrobates)
Changed in usplash:
milestone: none → ubuntu-8.04
Steve Langasek (vorlon)
Changed in linux-meta:
status: New → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

Missed the cutoff for 8.04, I'm not sure this is one we'll want to spend attention on for 8.04.1 either since it seems to be largely cosmetic and limited to the console. If a fix is found and you believe it should be considered for inclusion in hardy, please use the 'nominate for release' / 'target to release' option to propose an SRU.

Changed in usplash:
milestone: ubuntu-8.04 → none
Revision history for this message
J. Scott Berg (jsberg) wrote :

Does the code attached to:

https://bugs.launchpad.net/ubuntu/+source/usplash/+bug/60915/comments/17

fix your problem when run from the console (you need root privileges to run it)? If so, this is the same bug. Don't have a nice fix in usplash itself (I've tried in a couple obvious places and it didn't work!), but a sloppy fix would be to have the code run right after usplash.

Revision history for this message
David Wilson (mcs6502) wrote :

I just ran into this bug on 8.10 today (took me a while to work out the right keywords to find it was a known problem). Here are two screen shots from an 8.10 desktop system running on vmware - I was able to reproduce the orange cross with a similar program but what first attracted my attention was the color ls output.

Revision history for this message
David Wilson (mcs6502) wrote :
Revision history for this message
David Wilson (mcs6502) wrote :

Bug is still present in 9.04 (Jaunty) Alpha-4. Easy demo is "man man" and wait for 10-15min. All the bright white text remains un-blanked.

Revision history for this message
Norm Pierce (npierce-at2a) wrote :

While the initial description is a little different, I believe that this bug has the same root cause as LP:395374.

I submitted a couple of patches for that bug, which should also fix this one.

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: Triaged → 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.