1.\" 2.\" Copyright (c) 1999 3.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer as 11.\" the first lines of this file unmodified. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26.\" 27.\" $FreeBSD: src/share/man/man4/syscons.4,v 1.10.2.14 2003/04/25 21:21:36 brueffer Exp $ 28.\" 29.Dd August 11, 2015 30.Dt SYSCONS 4 31.Os 32.Sh NAME 33.Nm syscons , 34.Nm sc 35.Nd the console driver 36.Sh SYNOPSIS 37.Cd "options MAXCONS=N" 38.Cd "options SC_ALT_MOUSE_IMAGE" 39.Cd "options SC_DISABLE_DDBKEY" 40.Cd "options SC_DISABLE_REBOOT" 41.Cd "options SC_HISTORY_SIZE=N" 42.Cd "options SC_MOUSE_CHAR=C" 43.Cd "options SC_NO_CUTPASTE" 44.Cd "options SC_NO_FONT_LOADING" 45.Cd "options SC_NO_HISTORY" 46.Cd "options SC_NO_PALETTE_LOADING" 47.Cd "options SC_NO_SYSMOUSE" 48.Cd "options SC_PIXEL_MODE" 49.Cd "options SC_TWOBUTTON_MOUSE" 50.Cd "options SC_NORM_ATTR=_attribute_" 51.Cd "options SC_NORM_REV_ATTR=_attribute_" 52.Cd "options SC_KERNEL_CONS_ATTR=_attribute_" 53.Cd "options SC_KERNEL_CONS_REV_ATTR=_attribute_" 54.Cd "options SC_DFLT_FONT" 55.Cd "makeoptions SC_DFLT_FONT=_font_name_" 56.Cd "device sc0 at isa?" Op flags Ar flags 57.Sh DESCRIPTION 58The 59.Nm 60driver provides multiple virtual terminals. 61It resembles the SCO color console driver. 62.Pp 63The 64.Nm 65driver is implemented on top of the keyboard driver 66.Pq Xr atkbd 4 67and the video card drivers 68.Xr ( i915kms 4 , 69.Xr radeonkms 4 , 70or 71.Xr vga 4 ) . 72Please see 73.Sx DRIVER CONFIGURATION 74below on how to make the console work with 75.Xr i915kms 4 76or 77.Xr radeonkms 4 . 78.Pp 79There can be only one 80.Nm 81device defined in the system. 82.Ss Virtual Terminals 83The 84.Nm 85driver provides multiple virtual terminals which appear as if they were 86separate terminals. 87One virtual terminal is considered current and exclusively 88occupies the screen and the keyboard; the other virtual terminals 89are placed in the background. 90.Pp 91In order to use virtual terminals, they must be individually 92marked ``on'' in 93.Pa /etc/ttys 94so that 95.Xr getty 8 96will recognize them to be active and run 97.Xr login 1 98to let the user log in to the system. 99By default, only the first eight virtual terminals are activated in 100.Pa /etc/ttys . 101.Pp 102You press the 103.Dv Alt 104key and a switch key to switch between 105virtual terminals. 106The following table summarizes the correspondence between the switch 107key and the virtual terminal. 108.Bd -literal -offset indent 109Alt-F1 ttyv0 Alt-F7 ttyv6 Shift-Alt-F1 ttyv10 110Alt-F2 ttyv1 Alt-F8 ttyv7 Shift-Alt-F2 ttyv11 111Alt-F3 ttyv2 Alt-F9 ttyv8 Shift-Alt-F3 ttyv12 112Alt-F4 ttyv3 Alt-F10 ttyv9 Shift-Alt-F4 ttyv13 113Alt-F5 ttyv4 Alt-F11 ttyv10 Shift-Alt-F5 ttyv14 114Alt-F6 ttyv5 Alt-F12 ttyv11 Shift-Alt-F6 ttyv15 115.Ed 116.Pp 117You can also use the ``nscr'' key (usually the 118.Dv PrintScreen 119key on the AT Enhanced keyboard) to cycle available virtual terminals. 120.Pp 121The default number of available virtual terminals is 16. 122This can be changed with the kernel configuration option 123.Dv MAXCONS 124(see below). 125.Pp 126Note that the X server usually requires a virtual terminal for display 127purposes, so at least one terminal must be left unused by 128.Xr getty 8 129so that it can be used by the X server. 130.Ss Key Definitions and Function Key Strings 131The 132.Nm 133driver, in conjunction with the keyboard driver, allows the user 134to change key definitions and function key strings. 135The 136.Xr kbdcontrol 1 137command will load a key definition file (known as ``keymap'' file), 138dump the current keymap, and assign a string to a function key. 139See 140.Xr keyboard 4 141and 142.Xr kbdmap 5 143for the keymap file. 144.Pp 145You may want to set the 146.Ar keymap 147variable in 148.Pa /etc/rc.conf.local 149to the desired keymap file so that it will be automatically loaded 150when the system starts up. 151.Ss Software Font 152For most modern video cards, e.g. VGA, the 153.Nm 154driver and the video card driver allow the user to change 155the font used on the screen. 156The 157.Xr vidcontrol 1 158command can be used to load a font file from 159.Pa /usr/share/syscons/fonts . 160.Pp 161The font comes in various sizes: 8x8, 8x14 and 8x16. 162The 8x16 font is typically used for the VGA card in the 16380-column-by-25-line mode. 164Other video modes may require different font sizes. 165It is better to always load all three sizes of the same font. 166.Pp 167You may set 168.Ar font8x8 , 169.Ar font8x14 170and 171.Ar font8x16 172variables in 173.Pa /etc/rc.conf 174to the desired font files so that they will be automatically loaded 175when the system starts up. 176.Pp 177Optionally you can specify a particular font file as the default. 178See the 179.Dv SC_DFLT_FONT 180option below. 181.Ss Screen Map 182If your video card does not support software fonts, you may still be able 183to achieve a similar effect by re-mapping the font built into your video card. 184Use 185.Xr vidcontrol 1 186to load a screen map file which defines the mapping between character codes. 187.Ss Mouse Support and Copy-and-Paste 188You can use your mouse to copy text on the screen and paste it as if 189it was typed by hand. 190You must be running the mouse daemon 191.Xr moused 8 192and enable the mouse cursor in the virtual terminal via 193.Xr vidcontrol 1 . 194.Pp 195Pressing mouse button 1 (usually the left button) will start selection. 196Releasing button 1 will end the selection process. 197The selected text will be marked by inverting foreground and 198background colors. 199You can press button 3 (usually the right button) to extend 200the selected region. 201The selected text is placed in the copy buffer and can be pasted 202at the cursor position by pressing button 2 (usually the 203middle button) as many times as you like. 204.Pp 205If your mouse has only two buttons, you may want to use the 206.Dv SC_TWOBUTTON_MOUSE 207option below to make the right button to paste the text. 208Alternatively you can make the mouse daemon 209emulate the middle button. 210See the man page for 211.Xr moused 8 212for more details. 213.Ss Back Scrolling 214The 215.Nm 216driver allows the user to browse the output which has ``scrolled off'' 217the top of the screen. 218.Pp 219Press the ``slock'' key (usually 220.Dv ScrllLock 221/ 222.Dv Scroll Lock 223or 224.Dv Pause 225on many keyboards) and the terminal is 226in the ``scrollback'' mode. 227It is indicated by the 228.Dv Scroll Lock 229LED. 230Use the arrow keys, the 231.Dv Page Up/Down 232keys and the 233.Dv Home/End 234keys to scroll buffered terminal output. 235Press the ``slock'' key again to get back to the normal terminal mode. 236.Pp 237The size of the scrollback buffer can be set by the 238.Dv SC_HISTORY_SIZE 239option described below. 240.Ss Screen Saver 241The 242.Nm 243driver can be made to put up the screen saver if the current 244virtual terminal is idle, that is, the user is not typing 245on the keyboard nor moving the mouse. 246See 247.Xr splash 4 248and 249.Xr vidcontrol 1 250for more details. 251.Sh DRIVER CONFIGURATION 252.Ss Loader Tunables 253The following tunables are available and can be set in 254.Xr loader.conf 5 . 255.Bl -tag -width ".Va kern.kms_console" 256.It Va kern.kms_console 257Setting this tunable to 0 disables experimental framebuffer support 258in conjunction with the 259.Xr i915kms 4 260or 261.Xr radeonkms 4 262drivers. 263It is 1 by default. 264.It Va kern.kms_columns 265The number of columns to use in conjunction with the 266.Xr i915kms 4 267and 268.Xr radeonkms 4 269drivers. 270The font size is scaled to match the requested number of columns. 271This requires 272.Va kern.kms_console 273to be set to 1. 274By default, 275.Nm 276tries to find a more or less pleasant looking default. 277Setting 278.Va kern.kms_columns 279to a negative value turns off scaling. 280.El 281.Ss Sysctl Variables 282The following 283.Xr sysctl 8 284variable is available and can be either set via 285.Xr sysctl.conf 5 286or from the command line. 287.Bl -tag -width ".Va kern.syscons_async" 288.It Va kern.syscons_async 289Set to 1 to enable asynchronous bulk framebuffer updates. 290It is intended to help with 291.Xr sound 4 292stuttering when a high resolution 293.Nm 294scrolls during playback. 295It is not enabled by default because on certain machines it has lead to 296subtle issues with for example 297.Xr ddb 4 . 298.El 299.Ss Kernel Configuration Options 300The following kernel configuration options control the 301.Nm 302driver. 303.Bl -tag -width MOUSE 304.It Dv MAXCONS=N 305This option sets the number of virtual terminals to 306.Fa N . 307The default value is 16. 308.It Dv SC_ALT_MOUSE_IMAGE 309This option selects the alternative way of displaying the mouse cursor 310in the virtual terminal. 311It may be expensive for some video cards to draw the arrow-shaped 312cursor, and you may want to try this option. 313However, the appearance of the alternative mouse cursor may not be 314very appealing. 315Note that if you use the 316.Dv SC_NO_FONT_LOADING 317option then you must also use this option if you wish to be able to use 318the mouse. 319.It Dv SC_DISABLE_DDBKEY 320This option disables the ``debug'' key combination (by default, it is 321.Dv Alt-Esc , 322or 323.Dv Ctl-PrintScreen ) . 324It will prevent users from 325entering the kernel debugger (DDB) by pressing the key combination. 326DDB will still be invoked when the kernel panics or hits a break point 327if it is included in the kernel. 328.It Dv SC_DISABLE_REBOOT 329This option disables the ``reboot'' key (by default, it is 330.Dv Ctl-Alt-Del ) , 331so that the casual user may not accidentally reboot the system. 332.It Dv SC_HISTORY_SIZE=N 333Sets the size of back scroll buffer to 334.Fa N 335lines. 336The default value is 100. 337.It Dv SC_MOUSE_CHAR=C 338Unless the 339.Dv SC_ALT_MOUSE_IMAGE 340option above is specified, the 341.Nm 342driver reserves four consecutive character codes in order to display the 343mouse cursor in the virtual terminals in some systems. 344This option specifies the first character code to 345.Fa C 346to be used for this purpose. 347The default value is 0xd0. 348A good candidate is 0x03. 349.It Dv SC_PIXEL_MODE 350Adds support for pixel (raster) mode console. 351This mode is useful on some laptop computers, but less so on 352most other systems, and it adds substantial amount of code to 353.Nm . 354If this option is NOT defined, you can reduce the kernel size a lot. 355See the 356.Dv VESA800X600 357flag below. 358.It Dv SC_TWOBUTTON_MOUSE 359If you have a two button mouse, you may want to add this option 360to use the right button of the mouse to paste text. 361See 362.Sx Mouse Support and Copy-and-Paste 363above. 364.It Dv SC_NORM_ATTR=_attribute_ 365.It Dv SC_NORM_REV_ATTR=_attribute_ 366.It Dv SC_KERNEL_CONS_ATTR=_attribute_ 367.It Dv SC_KERNEL_CONS_REV_ATTR=_attribute_ 368These options will set the default colors. 369Available colors are defined in 370.In machine/pc/display.h . 371See 372.Sx EXAMPLES 373below. 374.It Dv SC_DFLT_FONT 375This option will specify the default font. 376Available fonts are: iso, iso2, koi8-r, koi8-u, cp437, cp850, cp865, 377cp866 and cp866u. 37816-line, 14-line and 8-line font data will be compiled in. 379Without this option, the 380.Nm 381driver will use whatever font is already loaded in the video card, 382unless you explicitly load a software font at startup. 383See 384.Sx EXAMPLES 385below. 386.El 387.Pp 388The following options will remove some features from the 389.Nm 390driver and save kernel memory. 391.Bl -tag -width MOUSE 392.It Dv SC_NO_CUTPASTE 393This option disables ``copy and paste'' operation in virtual 394terminals. 395.It Dv SC_NO_FONT_LOADING 396The 397.Nm 398driver can load software fonts on some video cards. 399This option removes this feature. 400Note that if you still wish to use 401the mouse with this option then you must also use the 402.Dv SC_ALT_MOUSE_IMAGE 403option. 404.It Dv SC_NO_HISTORY 405This option disables back-scrolling in virtual terminals. 406.\".It Dv SC_NO_PALETTE_LOADING 407.It Dv SC_NO_SYSMOUSE 408This option removes mouse support in the 409.Nm 410driver. 411The mouse daemon 412.Xr moused 8 413will fail if this option is defined. 414This option implies the 415.Dv SC_NO_CUTPASTE 416option too. 417.El 418.Ss Driver Flags 419The following driver flags can be used to control the 420.Nm 421driver. 422They can be set either in the kernel configuration file 423(see 424.Xr config 8 ) , 425or else in the User Configuration Menu at boot 426time 427(see 428.Xr boot 8 ) . 429.Bl -tag -width bit_0 430.\".It bit 0 (VISUAL_BELL) 431.\"Uses the ``visual'' bell. 432.\"The screen will blink instead of generating audible sound. 433.\".It bit 1,2 (CURSOR_TYPE) 434.\"This option specifies the cursor appearance. 435.\"Possible values are: 436.\".Bl -tag -width TYPE -compact 437.\".It Dv 0 438.\"normal block cursor 439.\".It Dv 2 440.\"blinking block cursor 441.\".It Dv 4 442.\"underline cursor 443.\".It Dv 6 444.\"blinking underline (aka destructive) cursor 445.\".El 446.\".It bit 6 (QUIET_BELL) 447.\"This option suppresses the bell, whether audible or visual, 448.\"if it is rung in a background virtual terminal. 449.It 0x0080 (VESA800X600) 450This option puts the video card in the VESA 800x600 pixel, 16 color 451mode. 452It may be useful for laptop computers for which the 800x600 mode 453is otherwise unsupported by the X server. 454Note that in order for this flag to work, the kernel must be 455compiled with the 456.Dv SC_PIXEL_MODE 457option explained above. 458.\"Note also that the ``copy-and-paste'' function is not currently supported 459.\"in this mode and the mouse pointer will not be displayed. 460.It 0x0100 (AUTODETECT_KBD) 461This option instructs the 462.Nm 463driver to periodically scan 464for a keyboard device if it is not currently attached to one. 465Otherwise, the driver only probes for a keyboard once during bootup. 466.El 467.Sh IOCTLS 468The following 469.Xr ioctl 2 470commands are defined for the 471.Nm 472driver in 473.In sys/consio.h . 474.Pp 475.Bl -tag -width CONS -compact 476.It Dv KDGETMODE Ar int *mode 477.It Dv KDSETMODE Ar int *mode 478Get or set the mode of the current (virtual) console. The 479.Dv mode 480can be one of: 481.Pp 482.Bl -tag -width KD_GRAPHICS -compact 483.It Dv KD_TEXT 484same as 485.Dv KD_TEXT0 486.It Dv KD_TEXT0 487Text mode, restore fonts and palette 488.It Dv KD_GRAPHICS 489Graphics mode 490.It Dv KD_TEXT1 491Text mode, don't restore fonts and palette 492.It Dv KD_PIXEL 493Raster (pixel) text mode 494.El 495.Pp 496.It Dv KDSBORDER Ar int *color 497Set the border color of the current (virtual) console. 498.Pp 499.It Dv KDRASTER Ar scr_size_t *sizes 500Set raster (pixel) text mode and adjust the current (virtual) console's 501geometry and font size. The 502.Vt scr_size_t 503argument structure is as follows: 504.Bd -literal 505struct _scr_size { 506 int scr_size[3]; 507}; 508.Ed 509.Pp 510.It Dv GIO_SCRNMAP Ar scrmap_t *map 511.It Dv PIO_SCRNMAP Ar scrmap_t *map 512Get or set the screen map for the current (virtual) console. The 513.Vt scrmap_t 514argument structure is defined as follows: 515.Bd -literal 516struct _scrmap { 517 char scrmap[256]; 518}; 519.Ed 520.Pp 521.It Dv GIO_ATTR Ar int *attr 522Get the current text attribute. 523.Pp 524.It Dv GIO_COLOR Ar int *color 525Get the current text color. 526.Pp 527.It Dv CONS_CURRENT Ar int *type 528Get the adapter type. This is equivalent to 529.Dv FBIO_ADPTYPE . 530.Pp 531.It Dv CONS_GET Ar int *mode 532Get the current video mode. This is equivalent to 533.Dv FBIO_GETMODE . 534.Pp 535.It Dv CONS_SET Ar int *mode 536Set the current video mode. This is equivalent to 537.Dv FBIO_SETMODE . 538.Pp 539.It Dv CONS_BLANKTIME Ar int *time 540Set the screen saver blank interval (in seconds). 541.Pp 542.It Dv CONS_CURSORTYPE Ar int *type 543Set the text cursor shape. The argument 544.Dv type 545can be one or more of the following: 546.Pp 547.Bl -tag -width CONS_BLINK_CURSOR -compact 548.It Dv CONS_BLINK_CURSOR 549Set for a blinking cursor, unset for a non-blinking cursor. 550.It Dv CONS_CHAR_CURSOR 551Set for an underscore-shaped cursor, unset for a rectangle. 552.El 553.Pp 554.It Dv CONS_BELLTYPE Ar int *type 555Set the bell type. The argument 556.Dv type 557is one or more of: 558.Pp 559.Bl -tag -width CONS_VISUAL_BELL -compact 560.It Dv CONS_VISUAL_BELL 561Set for a visual bell, unset for an audible bell. 562.It Dv CONS_QUIET_BELL 563Set to enable the bell, unset to disable it. 564.El 565.Pp 566.It Dv CONS_HISTORY Ar int *size 567Set the history (scroll back) buffer size (in lines). 568.Pp 569.It Dv CONS_CLRHIST 570Clear the history (scroll back) buffer. 571.Pp 572.It Dv CONS_IDLE Ar int *idle 573Check if the (virtual) console has been idle. 574.Pp 575.It Dv CONS_SAVERMODE Ar int *mode 576Set the screen saver mode. The argument 577.Dv mode 578can be one of: 579.Pp 580.Bl -tag -width CONS_LKM_SAVER -compact 581.It Dv CONS_NO_SAVER 582Disable screen saver 583.It Dv CONS_USR_SAVER 584Enable screen saver 585.It Dv CONS_LKM_SAVER 586Add a new screen saver 587.El 588.Pp 589.It Dv CONS_SAVERSTART Ar int *start 590Start or stop the screen saver. 591.Pp 592.It Dv PIO_FONT8x8 Ar fnt8_t *font 593.It Dv GIO_FONT8x8 Ar fnt8_t *font 594Get or set the 8x8 font. The 595.Vt fnt8_t 596argument structure is defined as follows: 597.Bd -literal 598struct fnt8 { 599 char fnt8x8[8*256]; 600}; 601.Ed 602.Pp 603.It Dv PIO_FONT8x14 Ar fnt14_t *font 604.It Dv GIO_FONT8x14 Ar fnt14_t *font 605Get or set the 8x14 font. The 606.Vt fnt14_t 607argument structure is defined as follows: 608.Bd -literal 609struct fnt14 { 610 char fnt8x14[14*256]; 611}; 612.Ed 613.Pp 614.It Dv PIO_FONT8x16 Ar fnt16_t *font 615.It Dv GIO_FONT8x16 Ar fnt16_t *font 616Get or set the 8x16 font. The 617.Vt fnt16_t 618argument structure is defined as follows: 619.Bd -literal 620struct fnt16 { 621 char fnt8x16[16*256]; 622}; 623.Ed 624.Pp 625.It Dv CONS_GETINFO Ar vid_info_t *info 626Get information about the current video mode. The 627.Vt vid_info_t 628structure is defined as follows: 629.Bd -literal 630struct vid_info { 631 short size; 632 short m_num; 633 u_short font_size; 634 u_short mv_row, mv_col; 635 u_short mv_rsz, mv_csz; 636 struct colors mv_norm, 637 mv_rev, 638 mv_grfc; 639 u_char mv_ovscan; 640 u_char mk_keylock; 641}; 642.Ed 643.Pp 644.It Dv CONS_GETVERS Ar int *version 645Get the version of the driver. 646.Pp 647.It Dv CONS_CURRENTADP Ar int *adapter 648Get the video adapter index. This is equivalent to 649.Dv FBIO_ADAPTER . 650.Pp 651.It Dv CONS_ADPINFO Ar video_adapter_info_t *info 652Get the video adapter information. This is equivalent to 653.Dv FBIO_ADPINFO . 654.Pp 655.It Dv CONS_MODEINFO Ar video_info_t *info 656Get the video mode information. This is equivalent to 657.Dv FBIO_MODEINFO . 658.Pp 659.It Dv CONS_FINDMODE Ar video_info_t *info 660Find a video mode. This is equivalent to 661.Dv FBIO_FINDMODE . 662.Pp 663.It Dv CONS_SETWINORG Ar u_int *origin 664Set the frame buffer window origin. This is equivalent to 665.Dv FBIO_SETWINORG . 666.Pp 667.It Dv CONS_SETKBD Ar int *kbd 668Set a new keyboard. 669.Pp 670.It Dv CONS_RELKBD 671Release the current keyboard. 672.Pp 673.It Dv CONS_SCRSHOT Ar scrshot_t *data 674Make a snapshot of the current video buffer. The 675.Vt scrshot_t 676structure is defined as: 677.Bd -literal 678struct scrshot { 679 int xsize; 680 int ysize; 681 u_int16_t* buf; 682}; 683.Ed 684.Pp 685.It Dv CONS_GETTERM Ar term_info_t *info 686.It Dv CONS_SETTERM Ar term_info_t *info 687Get or set terminal characteristics. The 688.Vt term_info_t 689structure is defined as: 690.Bd -literal 691struct term_info { 692 int ti_index; 693 int ti_flags; 694 u_char ti_name[TI_NAME_LEN]; 695 u_char ti_desc[TI_DESC_LEN]; 696}; 697.Ed 698.Pp 699.It Dv VT_OPENQRY Ar int *term 700Get the next available terminal. 701.Pp 702.It Dv VT_SETMODE Ar vtmode_t *mode 703.It Dv VT_GETMODE Ar vtmode_t *mode 704Get or set the terminal switching mode. The 705.Vt vtmode_t 706argument structure is defined as follows: 707.Bd -literal 708struct vt_mode { 709 char mode; 710 char waitv; 711 short relsig; 712 short acqsig; 713 short frsig; 714}; 715.Ed 716.Pp 717.It Dv VT_RELDISP Ar int *ack 718Acknowledge the release or acquisition of a terminal. The 719.Dv ack 720argument can be one of: 721.Pp 722.Bl -tag -width VT_ACKACQ -compact 723.It Dv VT_FALSE 724The user refuses to release the screen, abort 725.It Dv VT_TRUE 726The user has released the screen, go on 727.It Dv VT_ACKACQ 728Acquisition of the screen acknowledged, switch completed 729.El 730.Pp 731.It Dv VT_ACTIVATE Ar int *term 732Activate the specified terminal. 733.Pp 734.It Dv VT_WAITACTIVE Ar int *term 735Wait until the specified terminal is active. 736.Pp 737.It Dv VT_GETACTIVE Ar int *term 738Get the currently active terminal. 739.Pp 740.It Dv VT_GETINDEX Ar int *index 741Get the index of the terminal. 742.Pp 743.It Dv VT_LOCKSWITCH Ar int *lock 744Prevent or permit terminal switching. 745.El 746.Sh FILES 747.Bl -tag -width /usr/share/syscons/xxxxyyyyzzz -compact 748.It Pa /dev/console 749.It Pa /dev/consolectl 750.It Pa /dev/ttyv? 751virtual terminals 752.It Pa /etc/ttys 753terminal initialization information 754.It Pa /usr/share/syscons/fonts/* 755font files 756.It Pa /usr/share/syscons/keymaps/* 757key map files 758.It Pa /usr/share/syscons/scrmaps/* 759screen map files 760.El 761.Sh EXAMPLES 762As the 763.Nm 764driver requires the keyboard driver and the video card driver, 765the kernel configuration file should contain the following lines. 766.Pp 767.D1 Cd device atkbdc0 at isa? port IO_KBD 768.D1 Cd device atkbd0 at atkbdc? irq 1 769.D1 Cd device vga0 at isa? 770.D1 Cd device sc0 at isa? 771.D1 Cd pseudo-device splash 772.Pp 773If you do not intend to load the splash image or use the screen saver, 774the last line is not necessary, and can be omitted. 775.Pp 776Note that the keyboard controller driver 777.Nm atkbdc 778is required by the keyboard driver 779.Nm atkbd . 780.Pp 781The following lines will set the default colors. 782The normal text will be green on black background. 783The reversed text will be yellow on green background. 784Note that you cannot put any white space inside the quoted string, 785because of the current implementation of 786.Xr config 8 . 787.Pp 788.D1 Cd "options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)" 789.D1 Cd "options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)" 790.Pp 791The following lines will set the default colors of the kernel message. 792The kernel message will be printed bright red on black background. 793The reversed message will be black on red background. 794.Pp 795.D1 Cd "options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)" 796.D1 Cd "options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)" 797.Pp 798The following example adds the font files 799.Pa cp850-8x16.fnt , 800.Pa cp850-8x14.font 801and 802.Pa cp850-8x8.font 803to the kernel. 804.Pp 805.D1 Cd "options SC_DFLT_FONT" 806.D1 Cd "makeoptions SC_DFLT_FONT=cp850" 807.D1 Cd "device sc0 at isa?" 808.\".Sh DIAGNOSTICS 809.Sh CAVEATS 810The amount of data that is possible to insert from the cut buffer is limited 811by the 812.Brq Dv MAX_INPUT , 813a system limit on the number of bytes that may be stored in the terminal 814input queue - usually 1024 bytes 815(see 816.Xr termios 4 ) . 817.Sh SEE ALSO 818.Xr kbdcontrol 1 , 819.Xr login 1 , 820.Xr vidcontrol 1 , 821.Xr atkbd 4 , 822.Xr atkbdc 4 , 823.Xr keyboard 4 , 824.Xr screen 4 , 825.Xr splash 4 , 826.Xr sysmouse 4 , 827.Xr ukbd 4 , 828.Xr vga 4 , 829.Xr kbdmap 5 , 830.Xr rc.conf 5 , 831.Xr ttys 5 , 832.Xr config 8 , 833.Xr getty 8 , 834.Xr kldload 8 , 835.Xr moused 8 836.Sh HISTORY 837The 838.Nm 839driver first appeared in 840.Fx 1.0 . 841.Sh AUTHORS 842.An -nosplit 843The 844.Nm 845driver was written by 846.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org . 847This manual page was written by 848.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org 849and 850.An Sascha Wildner . 851.Sh BUGS 852This manual page is incomplete and needs revision. 853