Bug 210446

Summary: vt(4) when switching between virtual consoles there is a 4 second hesitation in graph mode.
Product: Base System Reporter: joeb1
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Many People CC: emaste, portmaster, sblachmann
Priority: --- Keywords: vt
Version: CURRENT   
Hardware: Any   
OS: Any   

Description joeb1 2016-06-21 21:35:45 UTC
Running 11.0-ALPHA4-i386-20160617-r301975
vt defaults to graph mode.
When switching between virtual consoles there is a 4 second hesitation.
In text mode no hesitation when switching between virtual consoles.
Hardware details follow.

CPU: Intel(R) Celeron(R) CPU 2.66GHz (2660.05-MHz 686-class CPU)
  Origin="GenuineIntel"  Id=0xf41  Family=0xf  Model=0x4  Stepping=1
  TSC: P-state invariant
real memory  = 1073741824 (1024 MB)
avail memory = 1023901696 (976 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <DELL   3000   >
random: <Software, Yarrow> initialized
ioapic0: Changing APIC ID to 1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
acpi0: <DELL 3000   > on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x7f irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x5f irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_button0: <Power Button> on acpi0
vgapci0: <VGA-compatible display> port 0xefa8-0xefaf mem 0xe8000000-0xefffffff,0xfeb80000-0xfebfffff irq 16 at device 2.0 on pci0
agp0: <Intel 82865G (865G GMCH) SVGA controller> on vgapci0
agp0: aperture size is 128M, detected 892k stolen memory
vgapci0: Boot video device
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
orm0: <ISA Option ROMs> at iomem 0xc0000-0xca7ff,0xca800-0xcbfff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
random: unblocking device.
Comment 1 Chris Hutchinson 2017-03-21 01:38:59 UTC
I can also confirm this to be true in:

FreeBSD trump.whitehouse.gov.test 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r314700: Sun Mar 5 09:01:30 PST 2017 root@trump.whitehouse.gov.test:/usr/obj/usr/src/sys/TESTKERN amd64



Hardware as reported by Xorg:
(II) NVIDIA(0): NVIDIA GPU GeForce GT 730 (GF108) at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 4194304 kBytes
(--) NVIDIA(0): VideoBIOS: 70.08.ae.00.02
(II) NVIDIA(0): Detected PCI Express Link width: 16X
(--) NVIDIA(0):     CRT-1 (boot)
(--) NVIDIA(GPU-0): CRT-1: connected
(--) NVIDIA(GPU-0): CRT-1: 400.0 MHz maximum pixel clock

I also experience some 10 second delay getting to a console after
bailing from X (logging out of X).


Comment 2 Stefan B. 2017-12-04 04:27:30 UTC
I also confirm that bug.

The setvideomode stuff is unnecessarily called.
Highly annoying, because mode gets reset, with sync stopping, monitor blanking and taking some time to lock in its PLL again.
One reason why I use sc.

When changing from one vt to another, do NOT do an unnecessary call to setvideomode BIOS function. This is ONLY necessary when switching between X and vts.
Just blit the framebuffer with the contents of the newly selected VT.