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