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