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