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