2.6.26-rcX VC console scrolling regression - Kernel

This is a discussion on 2.6.26-rcX VC console scrolling regression - Kernel ; This change: commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b Author: Jan Engelhardt Date: Tue Apr 29 00:59:46 2008 -0700 vt: fix background color on line feed A command that causes a line feed while a background color is active, such as perl -e 'print "x" ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: 2.6.26-rcX VC console scrolling regression

  1. 2.6.26-rcX VC console scrolling regression


    This change:

    commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b
    Author: Jan Engelhardt
    Date: Tue Apr 29 00:59:46 2008 -0700

    vt: fix background color on line feed

    A command that causes a line feed while a background color is active,
    such as

    perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
    and
    perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'

    causes the line that was started as a result of the line feed to be completely
    filled with the currently active background color instead of the default
    color.

    When scrolling, part of the current screen is memcpy'd/memmove'd to the new
    region, and the new line(s) that will appear as a result are cleared using
    memset. However, the lines are cleared with vc->vc_video_erase_char, causing
    them to be colored with the currently active background color. This is
    different from X11 terminal emulators which always paint the new lines with
    the default background color (e.g. `xterm -bg black`).

    The clear operation (\e[1J and \e[2J) also use vc_video_erase_char, so a new
    vc->vc_scrl_erase_char is introduced with contains the erase character used
    for scrolling, which is built from vc->vc_def_color instead of vc->vc_color.

    Signed-off-by: Jan Engelhardt
    Cc: "Antonino A. Daplas"
    Cc: "H. Peter Anvin"
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Causes garbage characters to appear at the end of lines on my VCs when
    scrolling.

    They look like lowercase 'c' characters with a '.' above them, and they
    are colored light blue. The rest of the console text is fine.

    I think it might be because my VC gets put into a UTF8 mode or something
    like that via the init scripts? It seems to start happening right when
    the init scripts print "Setting up console font and keymap", which seems
    to come from /etc/init.d/console-setup which runs /bin/setupcon

    This is with a stock Ubuntu 7.10 installation.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: 2.6.26-rcX VC console scrolling regression

    On Wed, 07 May 2008 21:46:37 -0700 (PDT) David Miller wrote:

    >
    > This change:
    >
    > commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b
    > Author: Jan Engelhardt
    > Date: Tue Apr 29 00:59:46 2008 -0700
    >
    > vt: fix background color on line feed
    >
    > A command that causes a line feed while a background color is active,
    > such as
    >
    > perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
    > and
    > perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'
    >
    > causes the line that was started as a result of the line feed to be completely
    > filled with the currently active background color instead of the default
    > color.
    >
    > When scrolling, part of the current screen is memcpy'd/memmove'd to the new
    > region, and the new line(s) that will appear as a result are cleared using
    > memset. However, the lines are cleared with vc->vc_video_erase_char, causing
    > them to be colored with the currently active background color. This is
    > different from X11 terminal emulators which always paint the new lines with
    > the default background color (e.g. `xterm -bg black`).
    >
    > The clear operation (\e[1J and \e[2J) also use vc_video_erase_char, so a new
    > vc->vc_scrl_erase_char is introduced with contains the erase character used
    > for scrolling, which is built from vc->vc_def_color instead of vc->vc_color.
    >
    > Signed-off-by: Jan Engelhardt
    > Cc: "Antonino A. Daplas"
    > Cc: "H. Peter Anvin"
    > Cc: Alan Cox
    > Signed-off-by: Andrew Morton
    > Signed-off-by: Linus Torvalds
    >
    > Causes garbage characters to appear at the end of lines on my VCs when
    > scrolling.
    >
    > They look like lowercase 'c' characters with a '.' above them, and they
    > are colored light blue. The rest of the console text is fine.
    >
    > I think it might be because my VC gets put into a UTF8 mode or something
    > like that via the init scripts? It seems to start happening right when
    > the init scripts print "Setting up console font and keymap", which seems
    > to come from /etc/init.d/console-setup which runs /bin/setupcon
    >
    > This is with a stock Ubuntu 7.10 installation.


    Thanks, Dave. I queued the revert but I'll hold off for 48-odd hours if
    that's OK - it might just be something silly.


    If we continue in this way, patch-2.6.26 will consist solely of:

    --- a/Makefile
    +++ a/Makefile
    @@ -1,6 +1,6 @@
    VERSION = 2
    PATCHLEVEL = 6
    -SUBLEVEL = 25
    +SUBLEVEL = 26
    EXTRAVERSION =
    NAME = Funky Weasel is Jiggy wit it


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: 2.6.26-rcX VC console scrolling regression


    On Thursday 2008-05-08 06:46, David Miller wrote:
    >
    >Causes garbage characters to appear at the end of lines on my VCs when
    >scrolling.
    >
    >They look like lowercase 'c' characters with a '.' above them, and they
    >are colored light blue. The rest of the console text is fine.


    i386 or sparc64?

    In trying to reproduce it, Ubuntu already died on me (insert big rant
    here) and I have no idea how to fix that if I want to keep the
    stockness of the install:

    -->>>--
    sd 2:0:0:0: [sdb] Write Protect is off
    sd 2:0:0:0: [sdb] Cache data unavailable
    sd 2:0:0:0: [sdb] Assuming drive cache: write through
    sdb: sdb1 sdb2 < sdb5 >
    sd 2:0:0:0: [sdb] Attached SCSI disk
    sd 2:0:0:0: Attached scsi generic sg2 type 0
    Done.
    Begin: Running /scripts/local-premount ...
    Done.
    mount: Mounting /dev/sdb1 on /root failed: No such device
    Begin: Running /scripts/local-bottom ...
    Done.
    Done.
    Begin: Running /scripts/init-bottom ...
    mount: Mounting /root/dev on /dev/.static/dev failed: No such file or directory.
    Done.
    mount: Mounting /sys on /root/sys failed: No such file or directory
    mount: Mounting /proc on /root/proc failed: No such file or directory
    Target filesystem doesn't have /sbin/init


    BusyBox v1.1.3 (Debian 1:1.1.3-5ubuntu7) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    (initramfs)
    ---<<<---


    >I think it might be because my VC gets put into a UTF8 mode or something
    >like that via the init scripts?


    opensuse also switches to utf8 (though noting that the kernel starts
    with utf8 by default since 2.6.24) and I have not noticed anything bad.

    Are you using a serial console?

    > It seems to start happening right when
    >the init scripts print "Setting up console font and keymap", which seems
    >to come from /etc/init.d/console-setup which runs /bin/setupcon
    >
    >This is with a stock Ubuntu 7.10 installation.
    >

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: 2.6.26-rcX VC console scrolling regression

    From: Jan Engelhardt
    Date: Thu, 8 May 2008 11:13:37 +0200 (CEST)

    >
    > On Thursday 2008-05-08 06:46, David Miller wrote:
    > >
    > >Causes garbage characters to appear at the end of lines on my VCs when
    > >scrolling.
    > >
    > >They look like lowercase 'c' characters with a '.' above them, and they
    > >are colored light blue. The rest of the console text is fine.

    >
    > i386 or sparc64?


    sparc64.

    > Are you using a serial console?


    :-/ No, why would I report a VC console output bug if I were
    using a serial console?
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: 2.6.26-rcX VC console scrolling regression


    On Thursday 2008-05-08 06:46, David Miller wrote:
    >
    >Causes garbage characters to appear at the end of lines on my VCs when
    >scrolling.
    >

    (Gotten past the initramfs now..)
    >They look like lowercase 'c' characters with a '.' above them, and they
    >are colored light blue. The rest of the console text is fine.
    >I think it might be because my VC gets put into a UTF8 mode or something
    >like that via the init scripts? It seems to start happening right when
    >the init scripts print "Setting up console font and keymap", which seems
    >to come from /etc/init.d/console-setup which runs /bin/setupcon
    >This is with a stock Ubuntu 7.10 installation.


    I "reproduced" it this way on Ubuntu on i386 with fbcon (which you
    are likely to be using on sparc64), when switching from a 256 to
    512-glyph font. So far, only Ubuntu seems to exhibit this problem,
    I am going to test Fedora for its fitness now.

    # Right after boot...
    showconsolefont
    # Trigger
    setfont Arabic-VGA16
    showconsolefont

    # Resolve bug with 'reset'
    reset
    while $not_scrolled; do
    showconsolefont
    done;

    My guess is that you see the effects of incomplete font table/position
    switching, something along the lines a `cat /dev/urandom` would cause.
    Using the very same kernel and boot params (vga=791 or anything to
    switch it to fbcon), I cannot trigger the problem on opensuse.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: 2.6.26-rcX VC console scrolling regression



    On Wed, 7 May 2008, Andrew Morton wrote:
    >
    > If we continue in this way, patch-2.6.26 will consist solely of:
    >
    > --- a/Makefile
    > +++ a/Makefile
    > @@ -1,6 +1,6 @@
    > VERSION = 2
    > PATCHLEVEL = 6
    > -SUBLEVEL = 25
    > +SUBLEVEL = 26
    > EXTRAVERSION =
    > NAME = Funky Weasel is Jiggy wit it
    >
    >


    Why the frowny face. That would be beautiful

    Linus
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: 2.6.26-rcX VC console scrolling regression

    From: Jan Engelhardt
    Date: Thu, 8 May 2008 13:50:57 +0200 (CEST)

    > My guess is that you see the effects of incomplete font table/position
    > switching, something along the lines a `cat /dev/urandom` would cause.
    > Using the very same kernel and boot params (vga=791 or anything to
    > switch it to fbcon), I cannot trigger the problem on opensuse.


    Jan, there is code in drivers/video/console/fbcon.c:fbcon_do_set_font()
    which makes changes to vc->vc_video_erase_char, maybe that code needs
    to update the new vc->vc_scrl_erase_char you added?

    It would be nice if you could audit the tree to see if any other cases
    have been missed like this as well.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: 2.6.26-rcX VC console scrolling regression


    On Friday 2008-05-09 08:26, David Miller wrote:
    >> My guess is that you see the effects of incomplete font table/position
    >> switching, something along the lines a `cat /dev/urandom` would cause.
    >> Using the very same kernel and boot params (vga=791 or anything to
    >> switch it to fbcon), I cannot trigger the problem on opensuse.

    >
    >Jan, there is code in drivers/video/console/fbcon.c:fbcon_do_set_font()
    >which makes changes to vc->vc_video_erase_char, maybe that code needs
    >to update the new vc->vc_scrl_erase_char you added?
    >
    >It would be nice if you could audit the tree to see if any other cases
    >have been missed like this as well.
    >

    Try this patch please.

    ---
    drivers/video/console/fbcon.c | 10 +++++++++-
    1 files changed, 9 insertions(+), 1 deletions(-)

    diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
    index ca2a543..774f803 100644
    --- a/drivers/video/console/fbcon.c
    +++ b/drivers/video/console/fbcon.c
    @@ -2508,6 +2508,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
    c = vc->vc_video_erase_char;
    vc->vc_video_erase_char =
    ((c & 0xfe00) >> 1) | (c & 0xff);
    + c = vc->vc_def_color;
    + vc->vc_scrl_erase_char =
    + ((c & 0xFE00) >> 1) | (c & 0xFF);
    vc->vc_attr >>= 1;
    }
    } else if (!vc->vc_hi_font_mask && cnt == 512) {
    @@ -2538,9 +2541,14 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
    if (vc->vc_can_do_color) {
    vc->vc_video_erase_char =
    ((c & 0xff00) << 1) | (c & 0xff);
    + c = vc->vc_def_color;
    + vc->vc_scrl_erase_char =
    + ((c & 0xFF00) << 1) | (c & 0xFF);
    vc->vc_attr <<= 1;
    - } else
    + } else {
    vc->vc_video_erase_char = c & ~0x100;
    + vc->vc_scrl_erase_char = c & ~0x100;
    + }
    }

    }
    --
    1.5.5.1

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. Re: 2.6.26-rcX VC console scrolling regression

    From: Jan Engelhardt
    Date: Fri, 9 May 2008 21:24:20 +0200 (CEST)

    >
    > On Friday 2008-05-09 08:26, David Miller wrote:
    > >> My guess is that you see the effects of incomplete font table/position
    > >> switching, something along the lines a `cat /dev/urandom` would cause.
    > >> Using the very same kernel and boot params (vga=791 or anything to
    > >> switch it to fbcon), I cannot trigger the problem on opensuse.

    > >
    > >Jan, there is code in drivers/video/console/fbcon.c:fbcon_do_set_font()
    > >which makes changes to vc->vc_video_erase_char, maybe that code needs
    > >to update the new vc->vc_scrl_erase_char you added?
    > >
    > >It would be nice if you could audit the tree to see if any other cases
    > >have been missed like this as well.
    > >

    > Try this patch please.


    That seems to fix the bug, thanks Jan.

    Acked-by: David S. Miller
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. Re: 2.6.26-rcX VC console scrolling regression


    On Friday 2008-05-09 23:55, David Miller wrote:
    >> >

    >> Try this patch please.

    >
    >That seems to fix the bug, thanks Jan.
    >
    >Acked-by: David S. Miller
    >

    Signed-off-by: Jan Engelhardt
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread