mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 18:02:44 +00:00
Add new kern.vt.slow_down tunable.
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
On a laptop with no other console devices than the screen, things scroll of the screen faster than eye or camera can capture it. This tunable slows the console down and makes it update synchronously, so console output continues when timers or interrupts do not. Differential Revision: https://reviews.freebsd.org/D47710
This commit is contained in:
parent
e012d79c9c
commit
7749de2440
@ -50,6 +50,7 @@ In
|
||||
.Cd kern.vt.color.<colornum>.rgb="<colorspec>"
|
||||
.Cd kern.vt.fb.default_mode="<X>x<Y>"
|
||||
.Cd kern.vt.fb.modes.<connector>="<X>x<Y>"
|
||||
.Cd kern.vt.slow_down=<delay>"
|
||||
.Cd screen.font="<X>x<Y>"
|
||||
.Pp
|
||||
In
|
||||
@ -266,6 +267,16 @@ It will contain a list of connectors and their associated tunables.
|
||||
This is currently only supported by the
|
||||
.Cm vt_fb
|
||||
backend when it is paired with a KMS video driver.
|
||||
.It Va kern.vt.slow_down
|
||||
When debugging the kernel on modern laptops, the screen is often
|
||||
the only available console, and relevant information will scroll
|
||||
out of view before it can be captured by eye or camera.
|
||||
.Pp
|
||||
Setting
|
||||
.Va kern.vt.slow_down
|
||||
to a non-zero number will make console output synchronous (ie:
|
||||
not dependent on timers and interrupts) and slow it down in proportion
|
||||
to the number.
|
||||
.It Va screen.font
|
||||
Set this value to the base name of the desired font file located in
|
||||
.Pa /boot/fonts .
|
||||
|
@ -132,6 +132,9 @@ static VT_SYSCTL_INT(debug, 0, "vt(9) debug level");
|
||||
static VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode");
|
||||
static VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend");
|
||||
|
||||
/* Slow down and dont rely on timers and interrupts */
|
||||
static VT_SYSCTL_INT(slow_down, 0, "Non-zero make console slower and synchronous.");
|
||||
|
||||
/* Allow to disable some keyboard combinations. */
|
||||
static VT_SYSCTL_INT(kbd_halt, 1, "Enable halt keyboard combination. "
|
||||
"See kbdmap(5) to configure.");
|
||||
@ -1657,6 +1660,12 @@ vtterm_done(struct terminal *tm)
|
||||
}
|
||||
vd->vd_flags &= ~VDF_SPLASH;
|
||||
vt_flush(vd);
|
||||
} else if (vt_slow_down > 0) {
|
||||
int i, j;
|
||||
for (i = 0; i < vt_slow_down; i++) {
|
||||
for (j = 0; j < 1000; j++)
|
||||
vt_flush(vd);
|
||||
}
|
||||
} else if (!(vd->vd_flags & VDF_ASYNC)) {
|
||||
vt_flush(vd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user