1.\" 2.\" Copyright (c) 1997 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/psm.4,v 1.24.2.9 2002/12/29 16:35:38 schweikh Exp $ 28.\" 29.Dd October 15, 2010 30.Dt PSM 4 31.Os 32.Sh NAME 33.Nm psm 34.Nd PS/2 mouse style pointing device driver 35.Sh SYNOPSIS 36.Cd "device psm0 at atkbdc? irq 12" 37.Pp 38.Cd "options KBD_RESETDELAY=N" 39.Cd "options KBD_MAXWAIT=N" 40.Cd "options PSM_DEBUG=N" 41.Cd "options KBDIO_DEBUG=N" 42.Sh DESCRIPTION 43The 44.Nm 45driver provides support for the PS/2 mouse style pointing device. 46Currently there can be only one 47.Nm 48device node in the system. 49As the PS/2 mouse port is located 50at the auxiliary port of the keyboard controller, 51the keyboard controller driver, 52.Nm atkbdc , 53must also be configured in the kernel. 54Note that there is currently no provision of changing the 55.Em irq 56number. 57.Pp 58Basic PS/2 style pointing device has two or three buttons. 59Some devices may have a roller or a wheel and/or additional buttons. 60.Ss Device Resolution 61The PS/2 style pointing device usually has several grades of resolution, 62that is, sensitivity of movement. 63They are typically 25, 50, 100 and 200 64pulse per inch. 65Some devices may have finer resolution. 66The current resolution can be changed at runtime. 67The 68.Nm 69driver allows the user to initially set the resolution 70via the driver flag 71(see 72.Sx "DRIVER CONFIGURATION" ) 73or change it later via the 74.Xr ioctl 2 75command 76.Dv MOUSE_SETMODE 77(see 78.Sx IOCTLS ) . 79.Ss Report Rate 80Frequency, or report rate, at which the device sends movement 81and button state reports to the host system is also configurable. 82The PS/2 style pointing device typically supports 10, 20, 40, 60, 80, 100 83and 200 reports per second. 8460 or 100 appears to be the default value for many devices. 85Note that when there is no movement and no button has changed its state, 86the device won't send anything to the host system. 87The report rate can be changed via an ioctl call. 88.Ss Operation Levels 89The 90.Nm 91driver has three levels of operation. 92The current operation level can be set via an ioctl call. 93.Pp 94At the level zero the basic support is provided; the device driver will report 95horizontal and vertical movement of the attached device 96and state of up to three buttons. 97The movement and status are encoded in a series of fixed-length data packets 98(see 99.Sx "Data Packet Format" ) . 100This is the default level of operation and the driver is initially 101at this level when opened by the user program. 102.Pp 103The operation level one, the `extended' level, supports a roller (or wheel), 104if any, and up to 11 buttons. 105The movement of the roller is reported as movement along the Z axis. 1068 byte data packets are sent to the user program at this level. 107.Pp 108At the operation level two, data from the pointing device is passed to the 109user program as is. 110Modern PS/2 type pointing devices often use proprietary data format. 111Therefore, the user program is expected to have 112intimate knowledge about the format from a particular device when operating 113the driver at this level. 114This level is called `native' level. 115.Ss Data Packet Format 116Data packets read from the 117.Nm 118driver are formatted differently at each operation level. 119.Pp 120A data packet from the PS/2 mouse style pointing device 121is three bytes long at the operation level zero: 122.Pp 123.Bl -tag -width Byte_1 -compact 124.It Byte 1 125.Bl -tag -width bit_7 -compact 126.It bit 7 127One indicates overflow in the vertical movement count. 128.It bit 6 129One indicates overflow in the horizontal movement count. 130.It bit 5 131Set if the vertical movement count is negative. 132.It bit 4 133Set if the horizontal movement count is negative. 134.It bit 3 135Always one. 136.\" The ALPS GlidePoint clears this bit when the user `taps' the surface of 137.\" the pad, otherwise the bit is set. 138.\" Most, if not all, other devices always set this bit. 139.It bit 2 140Middle button status; set if pressed. 141For devices without the middle 142button, this bit is always zero. 143.It bit 1 144Right button status; set if pressed. 145.It bit 0 146Left button status; set if pressed. 147.El 148.It Byte 2 149Horizontal movement count in two's complement; 150-256 through 255. 151Note that the sign bit is in the first byte. 152.It Byte 3 153Vertical movement count in two's complement; 154-256 through 255. 155Note that the sign bit is in the first byte. 156.El 157.Pp 158At the level one, a data packet is encoded 159in the standard format 160.Dv MOUSE_PROTO_SYSMOUSE 161as defined in 162.Xr mouse 4 . 163.Pp 164At the level two, native level, there is no standard on the size and format 165of the data packet. 166.Ss Acceleration 167The 168.Nm 169driver can somewhat `accelerate' the movement of the pointing device. 170The faster you move the device, the further the pointer 171travels on the screen. 172The driver has an internal variable which governs the effect of 173the acceleration. 174Its value can be modified via the driver flag 175or via an ioctl call. 176.Sh DRIVER CONFIGURATION 177.Ss Kernel Configuration Options 178The following kernel configuration options can be used to control the 179.Nm 180driver. 181.Bl -tag -width MOUSE 182.It Em KBD_RESETDELAY=X , KBD_MAXWAIT=Y 183The 184.Nm 185driver will attempt to reset the pointing device during the boot process. 186It sometimes takes a long while before the device will respond after 187reset. 188These options control how long the driver should wait before 189it eventually gives up waiting. 190The driver will wait 191.Fa X 192* 193.Fa Y 194msecs at most. 195If the driver seems unable to detect your pointing 196device, you may want to increase these values. 197The default values are 198200 msec for 199.Fa X 200and 5 201for 202.Fa Y . 203.It Em PSM_DEBUG=N , KBDIO_DEBUG=N 204Sets the debug level to 205.Fa N . 206The default debug level is zero. 207See 208.Sx DIAGNOSTICS 209for debug logging. 210.El 211.Ss Driver Flags 212The 213.Nm 214driver accepts the following driver flags in the kernel configuration file. 215.Bl -tag -width MOUSE 216.It bit 0..3 RESOLUTION 217This flag specifies the resolution of the pointing device. 218It must be zero through four. 219The greater the value 220is, the finer resolution the device will select. 221Actual resolution selected by this field varies according to the model 222of the device. 223Typical resolutions are: 224.Pp 225.Bl -tag -width 0_(medium_high)__ -compact 226.It Em 1 (low) 22725 pulse per inch (ppi) 228.It Em 2 (medium low) 22950 ppi 230.It Em 3 (medium high) 231100 ppi 232.It Em 4 (high) 233200 ppi 234.El 235.Pp 236Leaving this flag zero will selects the default resolution for the 237device (whatever it is). 238.It bit 4..7 ACCELERATION 239This flag controls the amount of acceleration effect. 240The smaller the value of this flag is, more sensitive the movement becomes. 241The minimum value allowed, thus the value for the most sensitive setting, 242is one. 243Setting this flag to zero will completely disables the 244acceleration effect. 245.It bit 8 NOCHECKSYNC 246The 247.Nm 248driver tries to detect the first byte of the data packet by checking 249the bit pattern of that byte. 250Although this method should work with most 251PS/2 pointing devices, it may interfere with some devices which are not 252so compatible with known devices. 253If you think your pointing device is not functioning as expected, 254and the kernel frequently prints the following message to the console, 255.Bd -literal -offset indent 256psmintr: out of sync (xxxx != yyyy). 257.Ed 258.Pp 259set this flag to disable synchronization check and see if it helps. 260.It bit 9 NOIDPROBE 261The 262.Nm 263driver will not try to identify the model of the pointing device and 264will not carry out model-specific initialization. 265The device should always act like a standard PS/2 mouse without such 266initialization. 267Extra features, such as wheels and additional buttons, won't be 268recognized by the 269.Nm 270driver. 271.It bit 10 NORESET 272When this flag is set, the 273.Nm 274driver won't reset the pointing device when initializing the device. 275If the 276.Dx 277kernel 278is started after another OS has run, the pointing device will inherit 279settings from the previous OS. 280However, because there is no way for the 281.Nm 282driver to know the settings, the device and the driver may not 283work correctly. 284The flag should never be necessary under normal circumstances. 285.It bit 11 FORCETAP 286Some pad devices report as if the fourth button is pressed 287when the user `taps' the surface of the device (see 288.Sx CAVEATS ) . 289This flag will make the 290.Nm 291driver assume that the device behaves this way. 292Without the flag, the driver will assume this behavior 293for ALPS GlidePoint models only. 294.It bit 12 IGNOREPORTERROR 295This flag makes 296.Nm 297driver ignore certain error conditions when probing the PS/2 mouse port. 298It should never be necessary under normal circumstances. 299.It bit 13 HOOKRESUME 300The built-in PS/2 pointing device of some laptop computers is somehow 301not operable immediately after the system `resumes' from 302the power saving mode, 303though it will eventually become available. 304There are reports that 305stimulating the device by performing I/O will help 306waking up the device quickly. 307This flag will enable a piece of code in the 308.Nm 309driver to hook 310the `resume' event and exercise some harmless I/O operations on the 311device. 312.It bit 14 INITAFTERSUSPEND 313This flag adds more drastic action for the above problem. 314It will cause the 315.Nm 316driver to reset and re-initialize the pointing device 317after the `resume' event. 318It has no effect unless the 319.Em HOOKRESUME 320flag is set as well. 321.El 322.Sh LOADER TUNABLES 323Extended support for Synaptics touchpads can be enabled by setting 324.Va hw.psm.synaptics_support 325to 326.Em 1 327at boot-time. 328This will enable 329.Nm 330to handle packets from guest devices (sticks) and extra buttons. 331.Pp 332Tap and drag gestures can be disabled by setting 333.Va hw.psm.tap_enabled 334to 335.Em 0 336at boot-time. 337Currently, this is only supported on Synaptics touchpads with Extended 338support disabled. The behaviour may be changed after boot by setting 339the sysctl with the same name and by restarting 340.Xr moused 8 341using 342.Pa /etc/rc.d/moused . 343.Sh IOCTLS 344There are a few 345.Xr ioctl 2 346commands for mouse drivers. 347These commands and related structures and constants are defined in 348.In sys/mouse.h . 349General description of the commands is given in 350.Xr mouse 4 . 351This section explains the features specific to the 352.Nm 353driver. 354.Pp 355.Bl -tag -width MOUSE -compact 356.It Dv MOUSE_GETLEVEL Ar int *level 357.It Dv MOUSE_SETLEVEL Ar int *level 358These commands manipulate the operation level of the 359.Nm 360driver. 361.Pp 362.It Dv MOUSE_GETHWINFO Ar mousehw_t *hw 363Returns the hardware information of the attached device in the following 364structure. 365.Bd -literal 366typedef struct mousehw { 367 int buttons; /* number of buttons */ 368 int iftype; /* I/F type */ 369 int type; /* mouse/track ball/pad... */ 370 int model; /* I/F dependent model ID */ 371 int hwid; /* I/F dependent hardware ID */ 372} mousehw_t; 373.Ed 374.Pp 375The 376.Fa buttons 377field holds the number of buttons on the device. 378The 379.Nm 380driver currently can detect the 3 button mouse from Logitech and report 381accordingly. 382The 3 button mouse from the other manufacturer may or may not be 383reported correctly. 384However, it will not affect the operation of 385the driver. 386.Pp 387The 388.Fa iftype 389is always 390.Dv MOUSE_IF_PS2 . 391.Pp 392The 393.Fa type 394tells the device type: 395.Dv MOUSE_MOUSE , 396.Dv MOUSE_TRACKBALL , 397.Dv MOUSE_STICK , 398.Dv MOUSE_PAD , 399or 400.Dv MOUSE_UNKNOWN . 401The user should not heavily rely on this field, as the 402driver may not always, in fact it is very rarely able to, identify 403the device type. 404.Pp 405The 406.Fa model 407is always 408.Dv MOUSE_MODEL_GENERIC 409at the operation level 0. 410It may be 411.Dv MOUSE_MODEL_GENERIC 412or one of 413.Dv MOUSE_MODEL_XXX 414constants at higher operation levels. 415Again the 416.Nm 417driver may or may not set an appropriate value in this field. 418.Pp 419The 420.Fa hwid 421is the ID value returned by the device. 422Known IDs include: 423.Pp 424.Bl -tag -width 0__ -compact 425.It Em 0 426Mouse (Microsoft, Logitech and many other manufacturers) 427.It Em 2 428Microsoft Ballpoint mouse 429.It Em 3 430Microsoft IntelliMouse 431.El 432.Pp 433.It Dv MOUSE_SYN_GETHWINFO Ar synapticshw_t *synhw 434Retrieves extra information associated with Synaptics Touchpads. 435Only available when 436.Va hw.psm.synaptics_support 437has been enabled. 438.Bd -literal 439typedef struct synapticshw { 440 int infoMajor; /* major hardware revision */ 441 int infoMinor; /* minor hardware revision */ 442 int infoRot180; /* touchpad is rotated */ 443 int infoPortrait; /* touchpad is a portrait */ 444 int infoSensor; /* sensor model */ 445 int infoHardware; /* hardware model */ 446 int infoNewAbs; /* supports the newabs format */ 447 int capPen; /* can detect a pen */ 448 int infoSimpleC; /* supports simple commands */ 449 int infoGeometry; /* touchpad dimensions */ 450 int capExtended; /* supports extended packets */ 451 int capSleep; /* can be suspended/resumed */ 452 int capFourButtons; /* has four buttons */ 453 int capMultiFinger; /* can detect multiple fingers */ 454 int capPalmDetect; /* can detect a palm */ 455 int capPassthrough; /* can passthrough guest packets */ 456} synapticshw_t; 457.Ed 458.Pp 459See the 460.Em Synaptics TouchPad Interfacing Guide 461for more information about the fields in this structure. 462.Pp 463.It Dv MOUSE_GETMODE Ar mousemode_t *mode 464The command gets the current operation parameters of the mouse 465driver. 466.Bd -literal 467typedef struct mousemode { 468 int protocol; /* MOUSE_PROTO_XXX */ 469 int rate; /* report rate (per sec), -1 if unknown */ 470 int resolution; /* MOUSE_RES_XXX, -1 if unknown */ 471 int accelfactor; /* acceleration factor */ 472 int level; /* driver operation level */ 473 int packetsize; /* the length of the data packet */ 474 unsigned char syncmask[2]; /* sync. bits */ 475} mousemode_t; 476.Ed 477.Pp 478The 479.Fa protocol 480is 481.Dv MOUSE_PROTO_PS2 482at the operation level zero and two. 483.Dv MOUSE_PROTO_SYSMOUSE 484at the operation level one. 485.Pp 486The 487.Fa rate 488is the status report rate (reports/sec) at which the device will send 489movement report to the host computer. 490Typical supported values are 10, 20, 40, 60, 80, 100 and 200. 491Some mice may accept other arbitrary values too. 492.Pp 493The 494.Fa resolution 495of the pointing device must be one of 496.Dv MOUSE_RES_XXX 497constants or a positive value. 498The greater the value 499is, the finer resolution the mouse will select. 500Actual resolution selected by the 501.Dv MOUSE_RES_XXX 502constant varies according to the model of mouse. 503Typical resolutions are: 504.Pp 505.Bl -tag -width MOUSE_RES_MEDIUMHIGH__ -compact 506.It Dv MOUSE_RES_LOW 50725 ppi 508.It Dv MOUSE_RES_MEDIUMLOW 50950 ppi 510.It Dv MOUSE_RES_MEDIUMHIGH 511100 ppi 512.It Dv MOUSE_RES_HIGH 513200 ppi 514.El 515.Pp 516The 517.Fa accelfactor 518field holds a value to control acceleration feature 519(see 520.Sx Acceleration ) . 521It must be zero or greater. If it is zero, acceleration is disabled. 522.Pp 523The 524.Fa packetsize 525field specifies the length of the data packet. 526It depends on the 527operation level and the model of the pointing device. 528.Pp 529.Bl -tag -width level_0__ -compact 530.It Em level 0 5313 bytes 532.It Em level 1 5338 bytes 534.It Em level 2 535Depends on the model of the device 536.El 537.Pp 538The array 539.Fa syncmask 540holds a bit mask and pattern to detect the first byte of the 541data packet. 542.Fa syncmask Ns Bq 0 543is the bit mask to be ANDed with a byte. 544If the result is equal to 545.Fa syncmask Ns Bq 1 , 546the byte is likely to be the first byte of the data packet. 547Note that this detection method is not 100% reliable, 548thus, should be taken only as an advisory measure. 549.Pp 550.It Dv MOUSE_SETMODE Ar mousemode_t *mode 551The command changes the current operation parameters of the mouse driver 552as specified in 553.Ar mode . 554Only 555.Fa rate , 556.Fa resolution , 557.Fa level 558and 559.Fa accelfactor 560may be modifiable. 561Setting values in the other field does not generate 562error and has no effect. 563.Pp 564If you do not want to change the current setting of a field, put -1 565there. 566You may also put zero in 567.Fa resolution 568and 569.Fa rate , 570and the default value for the fields will be selected. 571.\" .Pp 572.\" .It Dv MOUSE_GETVARS Ar mousevar_t *vars 573.\" .It Dv MOUSE_SETVARS Ar mousevar_t *vars 574.\" These commands are not supported by the 575.\" .Nm 576.\" driver. 577.Pp 578.It Dv MOUSE_READDATA Ar mousedata_t *data 579.\" The command reads the raw data from the device. 580.\" .Bd -literal 581.\" typedef struct mousedata { 582.\" int len; /* # of data in the buffer */ 583.\" int buf[16]; /* data buffer */ 584.\" } mousedata_t; 585.\" .Ed 586.\" .Pp 587.\" Upon returning to the user program, the driver will place the number 588.\" of valid data bytes in the buffer in the 589.\" .Fa len 590.\" field. 591.\" .Pp 592.It Dv MOUSE_READSTATE Ar mousedata_t *state 593.\" The command reads the hardware settings from the device. 594.\" Upon returning to the user program, the driver will place the number 595.\" of valid data bytes in the buffer in the 596.\" .Fa len 597.\" field. It is usually 3 bytes. 598.\" The buffer is formatted as follows: 599.\" .Pp 600.\" .Bl -tag -width Byte_1 -compact 601.\" .It Byte 1 602.\" .Bl -tag -width bit_6 -compact 603.\" .It bit 7 604.\" Reserved. 605.\" .It bit 6 606.\" 0 - stream mode, 1 - remote mode. 607.\" In the stream mode, the pointing device sends the device status 608.\" whenever its state changes. In the remote mode, the host computer 609.\" must request the status to be sent. 610.\" The 611.\" .Nm 612.\" driver puts the device in the stream mode. 613.\" .It bit 5 614.\" Set if the pointing device is currently enabled. Otherwise zero. 615.\" .It bit 4 616.\" 0 - 1:1 scaling, 1 - 2:1 scaling. 617.\" 1:1 scaling is the default. 618.\" .It bit 3 619.\" Reserved. 620.\" .It bit 2 621.\" Left button status; set if pressed. 622.\" .It bit 1 623.\" Middle button status; set if pressed. 624.\" .It bit 0 625.\" Right button status; set if pressed. 626.\" .El 627.\" .It Byte 2 628.\" .Bl -tag -width bit_6_0 -compact 629.\" .It bit 7 630.\" Reserved. 631.\" .It bit 6..0 632.\" Resolution code: zero through three. Actual resolution for 633.\" the resolution code varies from one device to another. 634.\" .El 635.\" .It Byte 3 636.\" The status report rate (reports/sec) at which the device will send 637.\" movement report to the host computer. 638.\" .El 639These commands are not currently supported by the 640.Nm 641driver. 642.Pp 643.It Dv MOUSE_GETSTATUS Ar mousestatus_t *status 644The command returns the current state of buttons and 645movement counts as described in 646.Xr mouse 4 . 647.El 648.Sh FILES 649.Bl -tag -width /dev/npsm0 -compact 650.It Pa /dev/psm0 651device node 652.El 653.Sh EXAMPLES 654.Dl "device psm0 at atkbdc? irq 12 flags 0x2000" 655.Pp 656Add the 657.Nm 658driver to the kernel with the optional code to stimulate the pointing device 659after the `resume' event. 660.Pp 661.Dl "device psm0 at atkbdc? flags 0x024 irq 12" 662.Pp 663Set the device resolution high (4) and the acceleration factor to 2. 664.Sh DIAGNOSTICS 665At debug level 0, little information is logged except for the following 666line during boot process: 667.Bd -literal -offset indent 668psm0: device ID X 669.Ed 670.Pp 671where 672.Fa X 673the device ID code returned by the found pointing device. 674See 675.Dv MOUSE_GETINFO 676for known IDs. 677.Pp 678At debug level 1 more information will be logged 679while the driver probes the auxiliary port (mouse port). 680Messages are logged with the LOG_KERN facility at the LOG_DEBUG level 681(see 682.Xr syslogd 8 ) . 683.Bd -literal -offset indent 684psm0: current command byte:xxxx 685kbdio: TEST_AUX_PORT status:0000 686kbdio: RESET_AUX return code:00fa 687kbdio: RESET_AUX status:00aa 688kbdio: RESET_AUX ID:0000 689[...] 690psm: status 00 02 64 691psm0 irq 12 on isa 692psm0: model AAAA, device ID X, N buttons 693psm0: config:00000www, flags:0000uuuu, packet size:M 694psm0: syncmask:xx, syncbits:yy 695.Ed 696.Pp 697The first line shows the command byte value of the keyboard 698controller just before the auxiliary port is probed. 699It usually is 4D, 45, 47 or 65, depending on how the motherboard BIOS 700initialized the keyboard controller upon power-up. 701.Pp 702The second line shows the result of the keyboard controller's 703test on the auxiliary port interface, with zero indicating 704no error; note that some controllers report no error even if 705the port does not exist in the system, however. 706.Pp 707The third through fifth lines show the reset status of the pointing device. 708The functioning device should return the sequence of FA AA <ID>. 709The ID code is described above. 710.Pp 711The seventh line shows the current hardware settings. 712.\" See 713.\" .Dv MOUSE_READSTATE 714.\" for definitions. 715These bytes are formatted as follows: 716.Pp 717.Bl -tag -width Byte_1 -compact 718.It Byte 1 719.Bl -tag -width bit_6 -compact 720.It bit 7 721Reserved. 722.It bit 6 7230 - stream mode, 1 - remote mode. 724In the stream mode, the pointing device sends the device status 725whenever its state changes. 726In the remote mode, the host computer 727must request the status to be sent. 728The 729.Nm 730driver puts the device in the stream mode. 731.It bit 5 732Set if the pointing device is currently enabled. 733Otherwise zero. 734.It bit 4 7350 - 1:1 scaling, 1 - 2:1 scaling. 7361:1 scaling is the default. 737.It bit 3 738Reserved. 739.It bit 2 740Left button status; set if pressed. 741.It bit 1 742Middle button status; set if pressed. 743.It bit 0 744Right button status; set if pressed. 745.El 746.It Byte 2 747.Bl -tag -width bit_6_0 -compact 748.It bit 7 749Reserved. 750.It bit 6..0 751Resolution code: zero through three. 752Actual resolution for 753the resolution code varies from one device to another. 754.El 755.It Byte 3 756The status report rate (reports/sec) at which the device will send 757movement report to the host computer. 758.El 759.Pp 760Note that the pointing device will not be enabled until the 761.Nm 762driver is opened by the user program. 763.Pp 764The rest of the lines show the device ID code, the number of detected 765buttons and internal variables. 766.Pp 767At debug level 2, much more detailed information is logged. 768.Sh CAVEATS 769Many pad devices behave as if the first (left) button were pressed if 770the user `taps' the surface of the pad. 771In contrast, some pad products, e.g. some versions of ALPS GlidePoint 772and Interlink VersaPad, treat the tapping action 773as fourth button events. 774.Pp 775It is reported that Interlink VersaPad requires both 776.Em HOOKRESUME 777and 778.Em INITAFTERSUSPEND 779flags in order to recover from suspended state. 780These flags are automatically set when VersaPad is detected by the 781.Nm 782driver. 783.Pp 784Some PS/2 mouse models from MouseSystems require to be put in the 785high resolution mode to work properly. 786Use the driver flag to 787set resolution. 788.Pp 789There is not a guaranteed way to re-synchronize with the first byte 790of the packet once we are out of synchronization with the data 791stream. 792However, if you are using the \fIXFree86\fP server and experiencing 793the problem, you may be able to make the X server synchronize with the mouse 794by switching away to a virtual terminal and getting back to the X server, 795unless the X server is accessing the mouse via 796.Xr moused 8 . 797Clicking any button without moving the mouse may also work. 798.Sh SEE ALSO 799.Xr ioctl 2 , 800.Xr syslog 3 , 801.Xr atkbdc 4 , 802.Xr mouse 4 , 803.Xr sysmouse 4 , 804.Xr moused 8 , 805.Xr syslogd 8 806.Rs 807.%T Synaptics TouchPad Interfacing Guide 808.%U http://www.synaptics.com/ 809.Re 810.Sh AUTHORS 811.An -nosplit 812The 813.Nm 814driver is based on the work done by quite a number of people, including 815.An Eric Forsberg , 816.An Sandi Donno , 817.An Rick Macklem , 818.An Andrew Herbert , 819.An Charles Hannum , 820.An Shoji Yuen 821and 822.An Kazutaka Yokota 823to name the few. 824.Pp 825This manual page was written by 826.An Kazutaka Yokota Aq Mt yokota@FreeBSD.org . 827