Bug 202288 - vt: doesn't clear borders outside of centered text
Summary: vt: doesn't clear borders outside of centered text
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Jung-uk Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-13 12:26 UTC by Jakob Alvermark
Modified: 2018-03-08 08:03 UTC (History)
3 users (show)

See Also:


Attachments
After boot (198.78 KB, image/jpeg)
2015-08-13 12:26 UTC, Jakob Alvermark
no flags Details
ttyv1 (166.78 KB, image/jpeg)
2015-08-13 12:27 UTC, Jakob Alvermark
no flags Details
r317323 crash on 1366x768 (774.06 KB, image/png)
2017-04-23 15:10 UTC, Jakob Alvermark
no flags Details
output of show registers (861.99 KB, image/png)
2017-04-27 17:58 UTC, Jakob Alvermark
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Alvermark 2015-08-13 12:26:35 UTC
Created attachment 159835 [details]
After boot

Setting kern.vt.splash_cpu=1 in loader.conf, when finished booting a litte piece remains on top of the screen, see attached image.
It also does not give back "its space" on other vt's, image attached.
Comment 1 Jakob Alvermark 2015-08-13 12:27:17 UTC
Created attachment 159836 [details]
ttyv1
Comment 2 Conrad Meyer freebsd_committer 2015-08-13 18:03:21 UTC
Both of these jpegs seem to be corrupt and won't display. Maybe bugzilla thinks they are text and is mangling "newlines"?
Comment 3 Ed Maste freebsd_committer 2015-08-13 18:21:53 UTC
Works fine for me (Firefox and Chrome); I've copied the first one to https://people.freebsd.org/~emaste/images/20150813_133005_scaled.jpg in case that might work.

Jakob, what resolution are you using? I suspect that this happens when the screen height isn't an integer multiple of the font height, and the border is never cleared.
Comment 4 Jakob Alvermark 2015-08-13 18:49:47 UTC
(In reply to Ed Maste from comment #3)
That's what I thought. Should be easy to fix?

The resolution is 1680x1050.

On my laptop (1366x768) it doesn't happen. But if I start X and then switch back to ttyv0 there is remains from X on the side borders.

The second issue is interesting; If I switch from ttyv0 to ttyv1 the top portion of the screen of ttyv0 remains. If I switch from X to ttyv1, the top portion of the screen of whatever was visible in X is still visible. Switchin to ttyv0 I get all the screen real estate (minus the borders).
Comment 5 Conrad Meyer freebsd_committer 2015-08-13 18:50:42 UTC
The image "https://people.freebsd.org/~emaste/images/20150813_133005_scaled.jpg" cannot be displayed because it contains errors.

Odd that it works for you...
Comment 6 Jakob Alvermark 2015-08-13 18:54:24 UTC
(In reply to Conrad Meyer from comment #5)
I took the pictures with my phone and scaled them down with 'jpegtran -scale 1/8'
Comment 7 Conrad Meyer freebsd_committer 2015-08-15 00:40:50 UTC
This fixes one of the two issues described (the giving back its space one):
https://reviews.freebsd.org/D3388
Comment 8 Jakob Alvermark 2015-08-15 12:30:35 UTC
(In reply to Conrad Meyer from comment #7)
Tested on my laptop. It works.
Comment 9 commit-hook freebsd_committer 2015-08-21 15:22:28 UTC
A commit references this bug:

Author: cem
Date: Fri Aug 21 15:21:57 UTC 2015
New revision: 286997
URL: https://svnweb.freebsd.org/changeset/base/286997

Log:
  vt_cpulogos: Resize all terms/windows when tearing down logos

  PR:		202288 (partial)
  Tested by:	Jakob Alvermark
  Reviewed by:	ed
  Approved by:	markj (mentor)
  Sponsored by:	EMC / Isilon Storage Division
  Differential Revision:	https://reviews.freebsd.org/D3388

Changes:
  head/sys/dev/vt/vt.h
  head/sys/dev/vt/vt_core.c
  head/sys/dev/vt/vt_cpulogos.c
Comment 10 Ed Maste freebsd_committer 2015-10-02 21:48:01 UTC
cem: The area outside of the addressable console area based on the font isn't being cleared, when the logos disappear and when switching between vtys.
Comment 11 Conrad Meyer freebsd_committer 2015-10-07 03:05:53 UTC
https://reviews.freebsd.org/D3834
Comment 12 Jakob Alvermark 2015-12-15 09:35:44 UTC
Waking up this again.
New laptop, different resolution (1920x1080). Broadwell, so using xf86-video-scfb.
When switching to a vt from X11 there are uncleared borders on top and bottom of the screen.
Comment 13 Conrad Meyer freebsd_committer 2015-12-15 16:38:36 UTC
D3834 (comment #11) has a fix for just the bug as-filed.  It wouldn't fix switching from X to vt, though.  Changed the Summary to reflect the desired fix.
Comment 14 Dave Cottlehuber freebsd_committer 2016-06-20 07:33:25 UTC
I suspect BZ#210382 may fix this for you. I'd add a `depends on` but it seems mere mortal users can't do this.
Comment 15 Kubilay Kocak freebsd_committer freebsd_triage 2016-06-20 08:52:01 UTC
Issue has a commit -> In Progress.

Bug 210382 may resolve this issue.

@Conrad, please remove the dependency if that's not the case
Comment 16 Conrad Meyer freebsd_committer 2016-07-19 19:19:20 UTC
I don't see how 210382 fixes this.  For example, this has been observed on 1920x1080 (comment #12), but vt already supported 2048x1200.
Comment 17 Jakob Alvermark 2016-07-25 09:47:11 UTC
(In reply to Conrad E. Meyer from comment #16)
It does not fix this.
Comment 18 commit-hook freebsd_committer 2017-04-13 23:00:37 UTC
A commit references this bug:

Author: jkim
Date: Thu Apr 13 23:00:26 UTC 2017
New revision: 316796
URL: https://svnweb.freebsd.org/changeset/base/316796

Log:
  Attempt to clear logos more thoroughly.

  PR:		202288
  Reviewed by:	cem

Changes:
  head/sys/dev/vt/vt_cpulogos.c
Comment 19 Jung-uk Kim freebsd_committer 2017-04-13 23:03:02 UTC
We may try to completely clear all borders from vt_flush() if necessary.
Comment 20 Jakob Alvermark 2017-04-18 08:34:02 UTC
(In reply to commit-hook from comment #18)
> A commit references this bug:
> 
> Author: jkim
> Date: Thu Apr 13 23:00:26 UTC 2017
> New revision: 316796
> URL: https://svnweb.freebsd.org/changeset/base/316796
> 
> Log:
>   Attempt to clear logos more thoroughly.
> 
>   PR:		202288
>   Reviewed by:	cem
> 
> Changes:
>   head/sys/dev/vt/vt_cpulogos.c

This fixed the clear borders after boot problem (so far only tested on the 1920x1080 screen). Thanks!

Borders remain "dirty" when switching from X to vt.
Comment 21 Conrad Meyer freebsd_committer 2017-04-18 08:39:02 UTC
(In reply to Jakob Alvermark from comment #20)
> Borders remain "dirty" when switching from X to vt.

Maybe the vt_flush invalidate method would solve that issue.
Comment 22 commit-hook freebsd_committer 2017-04-19 22:42:22 UTC
A commit references this bug:

Author: jkim
Date: Wed Apr 19 22:41:24 UTC 2017
New revision: 317173
URL: https://svnweb.freebsd.org/changeset/base/317173

Log:
  Always clear borders when the terminal is flushed.

  PR:		202288

Changes:
  head/sys/dev/vt/vt_core.c
Comment 23 Jung-uk Kim freebsd_committer 2017-04-19 22:45:06 UTC
(In reply to Jakob Alvermark from comment #20)
Please try r317173 or later.
Comment 24 Jakob Alvermark 2017-04-20 08:03:40 UTC
(In reply to Jung-uk Kim from comment #23)
> (In reply to Jakob Alvermark from comment #20)
> Please try r317173 or later.

Almost! There is still a one pixel high line on the bottom of the screen when I switch from X11 to vt. This is on the 1920x1080 screen.

I haven't tested on the other machine (that has a 1366x768 screen).
Comment 25 Jakob Alvermark 2017-04-23 15:10:16 UTC
Created attachment 182018 [details]
r317323 crash on 1366x768
Comment 26 Jakob Alvermark 2017-04-23 15:11:41 UTC
(In reply to Jakob Alvermark from comment #24)
> (In reply to Jung-uk Kim from comment #23)
> > (In reply to Jakob Alvermark from comment #20)
> > Please try r317173 or later.
> 
> Almost! There is still a one pixel high line on the bottom of the screen
> when I switch from X11 to vt. This is on the 1920x1080 screen.
> 
> I haven't tested on the other machine (that has a 1366x768 screen).

Tested r317323 on the other machine (with 1366x768 resolution) and it crashes on boot. Attached screenshot of crash.
Comment 27 Jung-uk Kim freebsd_committer 2017-04-24 21:31:12 UTC
(In reply to Jakob Alvermark from comment #26)
> Tested r317323 on the other machine (with 1366x768 resolution) and it crashes on
> boot. Attached screenshot of crash.

Can you please do "show registers" and show us the output?
Comment 28 Jakob Alvermark 2017-04-27 17:58:27 UTC
Created attachment 182133 [details]
output of show registers
Comment 29 commit-hook freebsd_committer 2017-04-28 16:40:13 UTC
A commit references this bug:

Author: jkim
Date: Fri Apr 28 16:39:09 UTC 2017
New revision: 317560
URL: https://svnweb.freebsd.org/changeset/base/317560

Log:
  Fix end coordinate of the drawable area of border.  Although the name tr_end
  suggests it is the end coordinate, tr_end.tp_row is width and tr_end.tp_col
  is height of the drawable area in reality.

  PR:		202288

Changes:
  head/sys/dev/vt/vt_core.c
Comment 30 Jung-uk Kim freebsd_committer 2017-04-28 16:46:29 UTC
(In reply to Jakob Alvermark from comment #28)
It should be fixed in r317560.  Please try.
Comment 31 Jakob Alvermark 2017-05-01 20:30:10 UTC
(In reply to Jung-uk Kim from comment #30)
> (In reply to Jakob Alvermark from comment #28)
> It should be fixed in r317560.  Please try.

Yes! Verified on both machines. No more borders with leftovers from X when switching back to vt.
Comment 32 commit-hook freebsd_committer 2017-05-18 23:53:17 UTC
A commit references this bug:

Author: jkim
Date: Thu May 18 23:52:29 UTC 2017
New revision: 318506
URL: https://svnweb.freebsd.org/changeset/base/318506

Log:
  MFC:	r317171, r317173, r317560, r317561, r318326

  Always clear borders when the terminal is flushed.

  PR:		202288

Changes:
_U  stable/11/
  stable/11/sys/dev/vt/vt_core.c
Comment 33 Jung-uk Kim freebsd_committer 2017-05-18 23:55:29 UTC
Fixed and merged to stable/11.
Comment 34 commit-hook freebsd_committer 2018-03-08 08:03:17 UTC
A commit references this bug:

Author: eadler
Date: Thu Mar  8 08:02:51 UTC 2018
New revision: 330642
URL: https://svnweb.freebsd.org/changeset/base/330642

Log:
  MFC r316796:

  Attempt to clear logos more thoroughly.

  PR:		202288

Changes:
_U  stable/11/
  stable/11/sys/dev/vt/vt_cpulogos.c