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