Found when investigating a report on FreeBSD-current[1], setting the history size via vidcontrol -h does not work with vt(4). sys/dev/vt/vt_buf.c implements vtbuf_sethistory_size() [1] https://lists.freebsd.org/pipermail/freebsd-current/2016-June/062015.html
When vidcontrol -h <history size> in rc.conf and boot time console driver is "sc" this causes a ioctl warning message to occur sometimes. Sometime around 7.x or 8.x the environment variable "history" and "savehist" was introduced which pretty much made the vidcontrol -h obsolete. See the .cshrc file in any user home directory for set command of "history" and "savehist". The -h option of vidcontrol needs to be made comparable with "history" and "savehist" usage or removed all together.
A commit references this bug: Author: emaste Date: Tue Dec 5 22:20:00 UTC 2017 New revision: 326599 URL: https://svnweb.freebsd.org/changeset/base/326599 Log: Implement "vidcontrol -h <history_size>" for vt(4) PR: 210415 Submitted by: Siva Mahadevan Reviewed by: ray (earlier) MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11814 Changes: head/sys/dev/vt/vt.h head/sys/dev/vt/vt_buf.c head/sys/dev/vt/vt_core.c
A commit references this bug: Author: eadler Date: Thu Mar 8 07:57:27 UTC 2018 New revision: 330641 URL: https://svnweb.freebsd.org/changeset/base/330641 Log: MFC r326599: Implement "vidcontrol -h <history_size>" for vt(4) PR: 210415 Changes: _U stable/11/ stable/11/sys/dev/vt/vt.h stable/11/sys/dev/vt/vt_buf.c stable/11/sys/dev/vt/vt_core.c
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved. Thanks