Page MenuHomeFreeBSD

D47710.id146860.diff
No OneTemporary

D47710.id146860.diff

diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4
--- a/share/man/man4/vt.4
+++ b/share/man/man4/vt.4
@@ -50,6 +50,7 @@
.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 @@
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 .
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -132,6 +132,9 @@
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 @@
}
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);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 9, 12:00 AM (11 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31122923
Default Alt Text
D47710.id146860.diff (1 KB)

Event Timeline