Bug 276206

Summary: Setting kern.vty="sc" will hang the loader boot process, but vt(4) says we can do that
Product: Documentation Reporter: hym2209268914
Component: Manual PagesAssignee: Ed Maste <emaste>
Status: Closed FIXED    
Severity: Affects Only Me CC: concussious.bugzilla, darius, doc, emaste, kevans, maxim, swills
Priority: --- Keywords: vt
Version: Latest   
Hardware: amd64   
OS: Any   

Description hym2209268914 2024-01-08 20:53:27 UTC
From manpage vt(4), LOADER TUNABLES:

    kern.vty
	       Set this	value to `vt' or `sc' to choose	a specific system con-
	       sole,  overriding the default.  The GENERIC kernel uses vt when
	       this value is not set.

on my GENERIC kernel shipped with 14.0-RELEASE, adding a line to /boot/loader.conf 'kern.vty="sc"' will hang the loader while loading kernel and trying to boot.
Comment 1 Daniel O'Connor 2024-01-09 00:29:01 UTC
Can you upload a photo of where it hangs?
Comment 2 hym2209268914 2024-01-09 12:11:57 UTC
It hangs right after the loader loads the kernel, and prints the EFI framebuffer information as usual, where the kernel should clear the screen and print dmesg in a couple of seconds. There are no error message.
Comment 3 Maxim Konovalov freebsd_committer freebsd_triage 2024-01-09 16:21:23 UTC
Hi,

Probably not a solution but rather a workaround: give a try to "hw.vga.textmode=1"

Maxim
Comment 4 Kyle Evans freebsd_committer freebsd_triage 2024-01-09 18:07:13 UTC
syscons notably doesn't know at all how to find the efi framebuffer, so if you're booting via efi this is expected and the machine likely isn't actually hung (but just not drawing to the screen).
Comment 5 hym2209268914 2024-01-10 00:09:34 UTC
Maybe we should add a note to vt(4) pointing out which tunables are not available in UEFI booted systems?
Comment 6 hym2209268914 2024-01-10 00:10:29 UTC
(In reply to Maxim Konovalov from comment #3)
hw.vga.textmode=1 does not seem to work in uefi either.
Comment 7 Ed Maste freebsd_committer freebsd_triage 2024-05-24 21:26:33 UTC
Note that this is documented in syscons(4):

     Note that the syscons driver is not compatible with systems booted via
     UEFI(8).  Forcing use of syscons on such systems will result in no usable
     console.
Comment 8 Ed Maste freebsd_committer freebsd_triage 2024-05-24 21:49:34 UTC
https://reviews.freebsd.org/D45357 for a vt(4) man page update to note this
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-05-24 23:56:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f52481f3b8a377e336ecba1b5150023a344ec189

commit f52481f3b8a377e336ecba1b5150023a344ec189
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-24 21:45:14 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-24 23:55:10 +0000

    vt(4): add note about sc/UEFI incompatibility

    syscons is not compatible with UEFI boot.  This is noted in syscons(4),
    but not mentioned in vt(4) where the kern.vty tunable (used to select vt
    or sc) is documented.  Add a note so that if someone reads vt(4) but not
    sc(4) they are not surprised by having no usable console.

    PR:             276206
    Reviewed by:    brooks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45357

 share/man/man4/vt.4 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-05-27 15:25:20 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=03d3230d51529a38e0c90ff324145dbfe209307d

commit 03d3230d51529a38e0c90ff324145dbfe209307d
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-24 21:45:14 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-27 15:24:13 +0000

    vt(4): add note about sc/UEFI incompatibility

    syscons is not compatible with UEFI boot.  This is noted in syscons(4),
    but not mentioned in vt(4) where the kern.vty tunable (used to select vt
    or sc) is documented.  Add a note so that if someone reads vt(4) but not
    sc(4) they are not surprised by having no usable console.

    PR:             276206
    Reviewed by:    brooks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45357

    (cherry picked from commit f52481f3b8a377e336ecba1b5150023a344ec189)

 share/man/man4/vt.4 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-05-27 15:27:23 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=bbb6bfeaae460ae1be5218d4456e47dfd86fa62d

commit bbb6bfeaae460ae1be5218d4456e47dfd86fa62d
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-05-24 21:45:14 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-05-27 15:25:28 +0000

    vt(4): add note about sc/UEFI incompatibility

    syscons is not compatible with UEFI boot.  This is noted in syscons(4),
    but not mentioned in vt(4) where the kern.vty tunable (used to select vt
    or sc) is documented.  Add a note so that if someone reads vt(4) but not
    sc(4) they are not surprised by having no usable console.

    PR:             276206
    Reviewed by:    brooks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D45357

    (cherry picked from commit f52481f3b8a377e336ecba1b5150023a344ec189)
    (cherry picked from commit 03d3230d51529a38e0c90ff324145dbfe209307d)

 share/man/man4/vt.4 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)