1

My system uses vidcontrol to change video mode, and I'd like to set a tighter video mode from boottime, for all console windows/devices. man vidcontrol says to do this by editing it into rc or rc.local. My question is that when I do this at boot time, the usual informative boot log display is cleared upon mode change. I know it could trivially be got back using dmesg during my first interactive session, but I'd like it not to be lost during the actual boot process, if it's easy to do.

I guess I could get round this either by manually echoing back the scrollback buffer just after the mode change, perhaps also by capturing it manually just before the mode change, but what's the best way to do this, and is there a cleaner way to do it?

Stilez
  • 1,221
  • 14
  • 28
  • Wont this work for you? https://unix.stackexchange.com/questions/361270/determining-efi-text-modes-supported-by-notebook/361271 Those text modes translate into graphic modes in frame buffer mode too. – Rui F Ribeiro Jun 10 '17 at 20:54

1 Answers1

3

Use vt(4) instead of sc(4) (append "kern.vty=vt" to /boot/loader.conf and reboot). It doesn't lose the scrollback buffer upon mode change. Additionally you might need an appropriate driver loaded, though (eg :i915kms_load="YES" in the same place).

GAD3R
  • 63,407
  • 31
  • 131
  • 192
  • I didn't know about vt preserving the buffer - that would solve it neatly. If for any reason I can't use vt though, what is the best I can do with sc, to minimise or at least visually appear to work around it? – Stilez Jun 08 '17 at 07:04