NetBSD Problem Report #59485

From www@netbsd.org  Tue Jun 24 23:03:59 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EB0671A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 24 Jun 2025 23:03:58 +0000 (UTC)
Message-Id: <20250624230357.B006C1A923A@mollari.NetBSD.org>
Date: Tue, 24 Jun 2025 23:03:57 +0000 (UTC)
From: uwe@stderr.spb.ru
Reply-To: uwe@stderr.spb.ru
To: gnats-bugs@NetBSD.org
Subject: sysinst unusable on smaller framebuffer resolutions
X-Send-Pr-Version: www-1.0

>Number:         59485
>Category:       install
>Synopsis:       sysinst unusable on smaller framebuffer resolutions
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 24 23:05:00 +0000 2025
>Last-Modified:  Thu Jun 26 04:40:01 +0000 2025
>Originator:     Valery Ushakov
>Release:        NetBSD 10.1
>Organization:
>Environment:
>Description:
I was trying to install netbsd on an old intel mac mini.  Since x86
doesn't have the usual comforts of a serial console, like most
civilized machines, I had to use a monitor.  I don't have much space
on my table, but luckily I have a cute little 10" monitor that can do
1024x768, so I am using that when I need a monitor for something.

NetBSD install USB boots and attaches intelfb0 and uses it with the
8x16 font for kernel messages.  When it comes to the userland though,
it switches to a font twice as large, b/c of proliferation of hi-res
displays, but at 1024x768 it's only 64x24 terminal and that is not
enough for larger sysinst menus (e.g. paritioning), so sysinst fails
eventually, when you reach one of those.

>How-To-Repeat:
Try to use sysinst on a lower resolution monitor.
>Fix:
May be hi-res workaround in the driver should not be applied if the
resulting terminal will be less than 80 columns?

One can always drop to the shell prompt and do

    wsconsctl -dw font=...

and use either that 8x16 font or may be use appropriately sized
Terminus, so that you get large enough characters, but still at least
80 columns.  So it's not insurmountable for someone familiar with
NetBSD.  But potentially quite confusing to someone new.

>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/59485: sysinst unusable on smaller framebuffer resolutions
Date: Wed, 25 Jun 2025 05:19:05 -0000 (UTC)

 uwe@stderr.spb.ru writes:

 >>How-To-Repeat:
 >Try to use sysinst on a lower resolution monitor.
 >>Fix:
 >May be hi-res workaround in the driver should not be applied if the
 >resulting terminal will be less than 80 columns?


 Maybe this:

 Index: sys/dev/wsfb/genfb.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/wsfb/genfb.c,v
 retrieving revision 1.92
 diff -p -u -r1.92 genfb.c
 --- sys/dev/wsfb/genfb.c	29 Apr 2025 12:20:36 -0000      1.92
 +++ sys/dev/wsfb/genfb.c	25 Jun 2025 05:15:49 -0000
 @@ -781,12 +781,14 @@ static int
  genfb_calc_cols(struct genfb_softc *sc, struct rasops_info *ri)
  {
  	const int hsize = genfb_calc_hsize(sc);
 +	const int cols = hsize ? hsize / GENFB_CHAR_WIDTH_MM : RASOPS_DEFAULT_WIDTH;

 -	if (hsize != 0) {
 +	if (hsize != 0 &&
 +	    cols > 2 * RASOPS_DEFAULT_WIDTH) {
 		ri->ri_flg |= RI_PREFER_WIDEFONT;
 	}

 -	return MAX(RASOPS_DEFAULT_WIDTH, hsize / GENFB_CHAR_WIDTH_MM);
 +	return MIN(cols, hsize / GENFB_CHAR_WIDTH_MM);
  }

  static int

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: Michael van Elst <mlelstv@serpens.de>
Subject: Re: install/59485: sysinst unusable on smaller framebuffer
 resolutions
Date: Thu, 26 Jun 2025 02:25:34 +0300

 Thanks.

 This seems to help in my case, the font is not changed and the
 terminal is large enough.  Though from just looking at it I wonder
 ... afaiu it will now return 0 when hsize is 0.  I haven't checked the
 caller to see what it does in that case.

 As an aside - when the font is not changed the visual jitter still
 happens on the monitor.  I wonder if that can be avoided.

 -uwe

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/59485: sysinst unusable on smaller framebuffer
 resolutions
Date: Thu, 26 Jun 2025 03:22:29 +0300

 On Wed, Jun 25, 2025 at 23:30:02 +0000, Valery Ushakov via gnats wrote:

 >  ... afaiu it will now return 0 when hsize is 0.  I haven't checked the
 >  caller to see what it does in that case.

 Ah, it becomes wantcols and 0 is the "don't particularly care" value,
 so it's fine.

 -uwe

From: Michael van Elst <mlelstv@serpens.de>
To: Valery Ushakov <uwe@stderr.spb.ru>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/59485: sysinst unusable on smaller framebuffer
 resolutions
Date: Thu, 26 Jun 2025 06:36:22 +0200

 On Thu, Jun 26, 2025 at 02:25:34AM +0300, Valery Ushakov wrote:
 > Thanks.
 > 
 > This seems to help in my case, the font is not changed and the
 > terminal is large enough.  Though from just looking at it I wonder
 > ... afaiu it will now return 0 when hsize is 0.  I haven't checked the
 > caller to see what it does in that case.

 It's passed to rasops_init, which then uses the default.

 	if (wantcols == 0)
 		wantcols = RASOPS_DEFAULT_WIDTH;

 But you are right, genfb_calc_cols should return that itself when
 hsize is zero.


 > As an aside - when the font is not changed the visual jitter still
 > happens on the monitor.  I wonder if that can be avoided.

 Visual jitter is usually caused by a video signal that doesn't
 match what the monitor expects. I also have a system like that,
 but assumed that it's just a bad VGA cable, also because it also
 affects the BIOS/UEFI display.


 Greetings,
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.