Add/update a few bits of information, mostly keyboard and mouse related.
From the PR: o Update mouse support description. o Add USB keyboard and mouse items. o Update moused and the X server setting. o Update xdm setting. PR: 15300 Submitted by: yokota
This commit is contained in:
parent
0cce3339fc
commit
c43ea25eea
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6548
2 changed files with 602 additions and 74 deletions
|
|
@ -14,7 +14,7 @@
|
|||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.39 2000/02/14 21:03:30 jim Exp $</pubdate>
|
||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.40 2000/02/14 21:14:49 jim Exp $</pubdate>
|
||||
|
||||
<abstract><para> This is the FAQ for FreeBSD versions 2.X and 3.X. All entries are
|
||||
assumed to be relevant to FreeBSD 2.0.5 and later, unless otherwise noted.
|
||||
|
|
@ -1764,26 +1764,115 @@ those that claim to be AST compatible.</para>
|
|||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="usbkbd">
|
||||
<para>I have a USB keyboard. Does FreeBSD support it?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>USB device support was added to FreeBSD 3.1. However, it is
|
||||
still in preliminary state and may not always work as of version
|
||||
3.2. If you want to experiment with the USB mouse support, follow
|
||||
the procedure described below.</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Use FreeBSD 3.2 or later.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add the following lines to your kernel configuration file,
|
||||
and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
controller ukbd0
|
||||
options KBD_INSTALL_CDEV</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Go to the <filename>/dev</filename> directory and create
|
||||
device nodes as follows:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev</userinput>
|
||||
&prompt.root; <userinput>./MAKEDEV kbd0 kbd1</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Edit <filename>/etc/rc.conf</filename> and add the following
|
||||
lines:</para>
|
||||
|
||||
<programlisting>
|
||||
usbd_enable="YES"
|
||||
usbd_flags=""</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>After the system is rebooted, the AT keyboard becomes
|
||||
<devicename>/dev/kbd0</devicename> and the USB keyboard becomes
|
||||
<devicename>/dev/kbd1</devicename>, if both are connected to the
|
||||
system. If there is the USB keyboard only, it will be
|
||||
<devicename>/dev/ukbd0</devicename>.</para>
|
||||
|
||||
<para>If you want to use the USB keyboard in the console, you have to
|
||||
explicitly tell the console driver to use the existence of the USB
|
||||
keyboard. This can be done by running the following command as a
|
||||
part of system initialization.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null</userinput></screen>
|
||||
|
||||
<para>Note that if the USB keyboard is the only keyboard, it is
|
||||
accessed as <devicename>/dev/kbd0</devicename>, thus, the command
|
||||
should look like:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null</userinput></screen>
|
||||
|
||||
<para><filename>/etc/rc.i386</filename> is a good place to add the
|
||||
above command.</para>
|
||||
|
||||
<para>Once this is done, the USB keyboard should work in the X
|
||||
environment as well without any special settings.</para>
|
||||
|
||||
<para>Hot-plugging and unplugging of the USB keyboard may not work
|
||||
quite right yet. It is a good idea to connect the keyboard before
|
||||
you start the system and leave it connected until the system is
|
||||
shutdown to avoid troubles.</para>
|
||||
|
||||
<para>See the &man.ukbd.4; man page for more information.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question
|
||||
id="busmouse">
|
||||
<para>I have an unusual bus mouse. How do I set it up?</para></question><answer>
|
||||
|
||||
<para>FreeBSD supports the bus mouse and the InPort bus mouse from such
|
||||
manufactures as Microsoft, Logitech and ATI. The bus device driver
|
||||
is compiled in the GENERIC kernel by default. If you are building
|
||||
is compiled in the GENERIC kernel by default in FreeBSD versions 2.X, but
|
||||
not included in version 3.0 or later. If you are building
|
||||
a custom kernel with the bus mouse driver, make sure to add the
|
||||
following line to the kernel config file:</para>
|
||||
following line to the kernel config file</para>
|
||||
|
||||
<para>In FreeBSD 3.0 or before, add:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device mse0 at isa? port 0x23c tty irq5 vector mseintr
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>In FreeBSD 3.1 or later, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device mse0 at isa? port 0x23c tty irq5
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>The bus mouse usually comes with an dedicatd interface card.
|
||||
It may allow you to set the port address and the IRQ number other
|
||||
than shown above. Refer to the manual of your mouse and the
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?mse">mse</ulink>
|
||||
man page for more information.</para>
|
||||
&man.mse.4; man page for more information.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
|
|
@ -1792,29 +1881,45 @@ id="ps2mouse">
|
|||
<para> How do I use my PS/2 (``mouse port'' or ``keyboard'') mouse?</para></question><answer>
|
||||
|
||||
<para>If you're running a post-2.2.5 version of FreeBSD, the necessary
|
||||
driver, psm, is included and enabled in the kernel. The kernel
|
||||
driver, <devicename>psm</devicename>, is included and enabled in the kernel. The kernel
|
||||
should detect your PS/2 mouse at boot time.</para>
|
||||
|
||||
<para>If you're running a previous but relatively recent version of
|
||||
FreeBSD (2.1.x or better) then you can simply enable it in the
|
||||
kernel configuration menu at installation time, otherwise later with
|
||||
-c at the boot: prompt. It is disabled by default, so you will need
|
||||
<option>-c</option> at the <command>boot:</command> prompt. It is disabled by default, so you will need
|
||||
to enable it explicitly.</para>
|
||||
|
||||
<para>If you're running an older version of FreeBSD then you'll have to
|
||||
add the following lines to your kernel configuration file and compile
|
||||
a new kernel:</para>
|
||||
|
||||
a new kernel.</para>
|
||||
|
||||
<para>In FreeBSD 3.0 or earlier, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
|
||||
<para>In FreeBSD 3.1 or later, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device psm0 at isa? tty irq 12
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>In FreeBSD 4.0-CURRENT or later, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device psm0 at atkbdc? irq 12
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>See the <ulink URL="../handbook/kernelconfig.html">Handbook entry on configuring the kernel</ulink> if you've no
|
||||
experience with building kernels.</para>
|
||||
|
||||
<para>Once you have a kernel detecting psm0 correctly at boot time,
|
||||
make sure that an entry for psm0 exists in /dev. You can do this
|
||||
<para>Once you have a kernel detecting <devicename>psm0</devicename> correctly at boot time,
|
||||
make sure that an entry for <devicename>psm0</devicename> exists in <filename>/dev</filename>. You can do this
|
||||
by typing:</para>
|
||||
|
||||
<para>
|
||||
|
|
@ -1843,8 +1948,7 @@ in the virtual console:</para>
|
|||
|
||||
<para>Where <emphasis remap=tt>xxxx</emphasis> is the mouse device name and <emphasis remap=tt>yyyy</emphasis>
|
||||
is a protocol type for the mouse. See the
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused</ulink>
|
||||
man page for supported protocol types. </para>
|
||||
&man.moused.8; man page for supported protocol types. </para>
|
||||
|
||||
<para>You may wish to run the mouse daemon automatically when the
|
||||
system starts. In version 2.2.1, set the following variables in
|
||||
|
|
@ -1900,22 +2004,164 @@ button) to paste it at the text cursor.</para>
|
|||
the text. Pressing the button 3 will ``extend'' the selected region
|
||||
of text. If your mouse does not have the middle button, you may wish
|
||||
to emulate it or remap buttons using moused options. See the
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused</ulink>
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused(8)</ulink>
|
||||
man page for details.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="usbmouse">
|
||||
<para>I have a USB mouse. Does FreeBSD support the USB mouse?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>USB device support was added to FreeBSD 3.1. However, it is
|
||||
still in a preliminary state and may not always work as of version
|
||||
3.2. If you want to experiment with the USB mouse support, follow
|
||||
the procedure described below.</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Use FreeBSD 3.2 or later.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add the following lines to your kernel configuration file,
|
||||
and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
device ums0</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Go to the <filename>/dev</filename> directory and create a
|
||||
device node as follows:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev</userinput>
|
||||
&prompt.root; <userinput>./MAKEDEV ums0</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Edit <filename>/etc/rc.conf</filename> and add the following
|
||||
lines:</para>
|
||||
|
||||
<programlisting>
|
||||
moused_enable="YES"
|
||||
moused_type="auto"
|
||||
moused_port="/dev/ums0"
|
||||
moused_flags=""
|
||||
usbd_enable="YES"
|
||||
usbd_flags=""</programlisting>
|
||||
|
||||
<para>See the <link linkend="moused">previous section</link> for
|
||||
more detailed discussion on moused.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In order to use the USB mouse in the X session, edit
|
||||
<filename>XF86Config</filename>. If you are using XFree86 3.3.2
|
||||
or later, be sure to have the following lines in the
|
||||
<emphasis>Pointer</emphasis> section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
Protocol "Auto"</programlisting>
|
||||
|
||||
<para>If you are using earlier versions of XFree86, be sure to
|
||||
have the following lines in the <emphasis>Pointer</emphasis>
|
||||
section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
Protocol "SysMouse"</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>Refer to <link linkend="x-and-moused">another section</link> on
|
||||
the mouse support in the X environment.</para>
|
||||
|
||||
<para>Hot-plugging and unplugging of the USB mouse may not work quite
|
||||
right yet. It is a good idea connect the mouse before you start the
|
||||
system and leave it connected until the system is shutdown to avoid
|
||||
trouble.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
<para>My mouse has a fancy wheel and buttons. Can I use them in FreeBSD?</para></question><answer>
|
||||
|
||||
<para>The answer is, unfortunately, ``It depends.'' These mice with
|
||||
<para>The answer is, unfortunately, “It depends”. These mice with
|
||||
additional features require specialized driver in most cases.
|
||||
Unless the mouse device driver or the user program has specific
|
||||
support for the mouse, it will act just like a standard two, or
|
||||
three button mouse.</para>
|
||||
|
||||
<para>For the possible usage of wheels in the X Window environment,
|
||||
refer to <link linkend="x-and-wheel">that section</link>.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="psmerr">
|
||||
<para>My mouse does not seem working. The mouse cursor jumps around
|
||||
on the screen. The mouse has a wheel and is connected to the PS/2
|
||||
mouse port.</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The PS/2 mouse driver psm in FreeBSD versions 3.2 or earlier has
|
||||
difficulty with some wheel mice, including Logitech model M-S48 and
|
||||
its OEM siblings. Apply the following patch to
|
||||
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
||||
kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: psm.c
|
||||
===================================================================
|
||||
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
||||
retrieving revision 1.60.2.1
|
||||
retrieving revision 1.60.2.2
|
||||
diff -u -r1.60.2.1 -r1.60.2.2
|
||||
--- psm.c 1999/06/03 12:41:13 1.60.2.1
|
||||
+++ psm.c 1999/07/12 13:40:52 1.60.2.2
|
||||
@@ -959,14 +959,28 @@
|
||||
sc->mode.packetsize = vendortype[i].packetsize;
|
||||
|
||||
/* set mouse parameters */
|
||||
+#if 0
|
||||
+ /*
|
||||
+ * A version of Logitech FirstMouse+ won't report wheel movement,
|
||||
+ * if SET_DEFAULTS is sent... Don't use this command.
|
||||
+ * This fix was found by Takashi Nishida.
|
||||
+ */
|
||||
i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS);
|
||||
if (verbose >= 2)
|
||||
printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i);
|
||||
+#endif
|
||||
if (sc->config & PSM_CONFIG_RESOLUTION) {
|
||||
sc->mode.resolution
|
||||
= set_mouse_resolution(sc->kbdc,
|
||||
- (sc->config & PSM_CONFIG_RESOLUTION) - 1);
|
||||
+ (sc->config & PSM_CONFIG_RESOLUTION) - 1);
|
||||
+ } else if (sc->mode.resolution >= 0) {
|
||||
+ sc->mode.resolution
|
||||
+ = set_mouse_resolution(sc->kbdc, sc->dflt_mode.resolution);
|
||||
+ }
|
||||
+ if (sc->mode.rate > 0) {
|
||||
+ sc->mode.rate = set_mouse_sampling_rate(sc->kbdc, sc->dflt_mode.rate);
|
||||
}
|
||||
+ set_mouse_scaling(sc->kbdc, 1);
|
||||
|
||||
/* request a data packet and extract sync. bits */
|
||||
if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) {</programlisting>
|
||||
|
||||
<para>Versions later than 3.2 should be all right.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
<para> How do I use the mouse/trackball/touchpad on my laptop?
|
||||
</para></question><answer>
|
||||
|
|
@ -4672,24 +4918,23 @@ configure FreeBSD to support a mouse pointer on each virtual
|
|||
screen. In order to avoid conflicting with X, syscons supports
|
||||
a virtual device called ``<filename>/dev/sysmouse</filename>''. All mouse events
|
||||
received from the real mouse device are written to the sysmouse
|
||||
device, using the MouseSystems protocol. If you wish to use your
|
||||
mouse on one or more virtual consoles, <emphasis remap=bf>and</emphasis> use X, the
|
||||
following configuration is recommended:</para>
|
||||
device via moused. If you wish to use your
|
||||
mouse on one or more virtual consoles, <emphasis remap=bf>and</emphasis> use X,
|
||||
see <xref linkend="moused" remap="another section"> and set up moused.</para>
|
||||
|
||||
<para>
|
||||
<literallayout> /etc/rc.conf:
|
||||
moused_type=ps/2 # or whatever your actual type is
|
||||
moused_port=/dev/psm0 # or whatever your real port is
|
||||
moused_flags=
|
||||
<para>Then edit <filename>/etc/XF86Config</filename> and make sure you
|
||||
have the following lines.</para>
|
||||
|
||||
<programlisting>
|
||||
Section Pointer
|
||||
Protocol "SysMouse"
|
||||
Device "/dev/sysmouse"
|
||||
.....</programlisting>
|
||||
|
||||
<para>The above example is for XFree86 3.3.2 or later. For earlier
|
||||
versions, the <emphasis>Protocol</emphasis> should be
|
||||
<emphasis>MouseSystems</emphasis>.</para>
|
||||
|
||||
/etc/XF86Config
|
||||
Section Pointer
|
||||
Protocol "MouseSystems"
|
||||
Device "/dev/sysmouse"
|
||||
.....
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>Some people prefer to use ``<filename>/dev/mouse</filename>'' under X. To
|
||||
make this work, ``<filename>/dev/mouse</filename>'' should be linked to
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?sysmouse">/dev/sysmouse</ulink>:</para>
|
||||
|
|
@ -4703,6 +4948,17 @@ make this work, ``<filename>/dev/mouse</filename>'' should be linked to
|
|||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="x-and-wheel">
|
||||
<para>My mouse has a fancy wheel. Can I use it in X?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes. But you need to customize X client programs. See <ulink
|
||||
URL="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/)</ulink></para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
<para>X Window menus and dialog boxes don't work right!</para></question><answer>
|
||||
|
||||
|
|
@ -4867,11 +5123,19 @@ else getty and xdm will conflict, locking out the console. The best
|
|||
way around this is to have the script sleep 10 seconds or so then
|
||||
launch xdm.</para>
|
||||
|
||||
<para>A previous version of the FAQ said to add the
|
||||
<emphasis remap=tt>vt</emphasis> you want X to use to the
|
||||
<filename>/usr/X11R6/lib/X11/xdm/Xservers</filename> file. This is not necessary:
|
||||
X will use the first free <emphasis remap=tt>vt</emphasis> it finds.</para>
|
||||
|
||||
<para>If you are to start <command>xdm</command> from
|
||||
<filename>/etc/ttys</filename>, there still is a chance of conflict
|
||||
between <command>xdm</command> and <command>getty</command>. One way to
|
||||
avoid this is to add the <literal>vt</literal> number in the
|
||||
<filename>/usr/X11R6/lib/X11/xdm/Xservers</filename> file.</para>
|
||||
|
||||
<programlisting>:0 local /usr/X11R6/bin/X vt4</programlisting>
|
||||
|
||||
<para>The above example will direct the X server to run in
|
||||
<filename>/dev/ttyv3</filename>. Note the number is offset by one. The
|
||||
X server counts the vty from one, whereas the FreeBSD kernel numbers the
|
||||
vty from zero.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.39 2000/02/14 21:03:30 jim Exp $</pubdate>
|
||||
<pubdate>$FreeBSD: doc/en_US.ISO_8859-1/books/faq/book.sgml,v 1.40 2000/02/14 21:14:49 jim Exp $</pubdate>
|
||||
|
||||
<abstract><para> This is the FAQ for FreeBSD versions 2.X and 3.X. All entries are
|
||||
assumed to be relevant to FreeBSD 2.0.5 and later, unless otherwise noted.
|
||||
|
|
@ -1764,26 +1764,115 @@ those that claim to be AST compatible.</para>
|
|||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="usbkbd">
|
||||
<para>I have a USB keyboard. Does FreeBSD support it?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>USB device support was added to FreeBSD 3.1. However, it is
|
||||
still in preliminary state and may not always work as of version
|
||||
3.2. If you want to experiment with the USB mouse support, follow
|
||||
the procedure described below.</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Use FreeBSD 3.2 or later.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add the following lines to your kernel configuration file,
|
||||
and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
controller ukbd0
|
||||
options KBD_INSTALL_CDEV</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Go to the <filename>/dev</filename> directory and create
|
||||
device nodes as follows:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev</userinput>
|
||||
&prompt.root; <userinput>./MAKEDEV kbd0 kbd1</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Edit <filename>/etc/rc.conf</filename> and add the following
|
||||
lines:</para>
|
||||
|
||||
<programlisting>
|
||||
usbd_enable="YES"
|
||||
usbd_flags=""</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>After the system is rebooted, the AT keyboard becomes
|
||||
<devicename>/dev/kbd0</devicename> and the USB keyboard becomes
|
||||
<devicename>/dev/kbd1</devicename>, if both are connected to the
|
||||
system. If there is the USB keyboard only, it will be
|
||||
<devicename>/dev/ukbd0</devicename>.</para>
|
||||
|
||||
<para>If you want to use the USB keyboard in the console, you have to
|
||||
explicitly tell the console driver to use the existence of the USB
|
||||
keyboard. This can be done by running the following command as a
|
||||
part of system initialization.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null</userinput></screen>
|
||||
|
||||
<para>Note that if the USB keyboard is the only keyboard, it is
|
||||
accessed as <devicename>/dev/kbd0</devicename>, thus, the command
|
||||
should look like:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null</userinput></screen>
|
||||
|
||||
<para><filename>/etc/rc.i386</filename> is a good place to add the
|
||||
above command.</para>
|
||||
|
||||
<para>Once this is done, the USB keyboard should work in the X
|
||||
environment as well without any special settings.</para>
|
||||
|
||||
<para>Hot-plugging and unplugging of the USB keyboard may not work
|
||||
quite right yet. It is a good idea to connect the keyboard before
|
||||
you start the system and leave it connected until the system is
|
||||
shutdown to avoid troubles.</para>
|
||||
|
||||
<para>See the &man.ukbd.4; man page for more information.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question
|
||||
id="busmouse">
|
||||
<para>I have an unusual bus mouse. How do I set it up?</para></question><answer>
|
||||
|
||||
<para>FreeBSD supports the bus mouse and the InPort bus mouse from such
|
||||
manufactures as Microsoft, Logitech and ATI. The bus device driver
|
||||
is compiled in the GENERIC kernel by default. If you are building
|
||||
is compiled in the GENERIC kernel by default in FreeBSD versions 2.X, but
|
||||
not included in version 3.0 or later. If you are building
|
||||
a custom kernel with the bus mouse driver, make sure to add the
|
||||
following line to the kernel config file:</para>
|
||||
following line to the kernel config file</para>
|
||||
|
||||
<para>In FreeBSD 3.0 or before, add:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device mse0 at isa? port 0x23c tty irq5 vector mseintr
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>In FreeBSD 3.1 or later, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device mse0 at isa? port 0x23c tty irq5
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>The bus mouse usually comes with an dedicatd interface card.
|
||||
It may allow you to set the port address and the IRQ number other
|
||||
than shown above. Refer to the manual of your mouse and the
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?mse">mse</ulink>
|
||||
man page for more information.</para>
|
||||
&man.mse.4; man page for more information.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
|
|
@ -1792,29 +1881,45 @@ id="ps2mouse">
|
|||
<para> How do I use my PS/2 (``mouse port'' or ``keyboard'') mouse?</para></question><answer>
|
||||
|
||||
<para>If you're running a post-2.2.5 version of FreeBSD, the necessary
|
||||
driver, psm, is included and enabled in the kernel. The kernel
|
||||
driver, <devicename>psm</devicename>, is included and enabled in the kernel. The kernel
|
||||
should detect your PS/2 mouse at boot time.</para>
|
||||
|
||||
<para>If you're running a previous but relatively recent version of
|
||||
FreeBSD (2.1.x or better) then you can simply enable it in the
|
||||
kernel configuration menu at installation time, otherwise later with
|
||||
-c at the boot: prompt. It is disabled by default, so you will need
|
||||
<option>-c</option> at the <command>boot:</command> prompt. It is disabled by default, so you will need
|
||||
to enable it explicitly.</para>
|
||||
|
||||
<para>If you're running an older version of FreeBSD then you'll have to
|
||||
add the following lines to your kernel configuration file and compile
|
||||
a new kernel:</para>
|
||||
|
||||
a new kernel.</para>
|
||||
|
||||
<para>In FreeBSD 3.0 or earlier, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
|
||||
<para>In FreeBSD 3.1 or later, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device psm0 at isa? tty irq 12
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>In FreeBSD 4.0-CURRENT or later, the line should be:</para>
|
||||
|
||||
<para>
|
||||
<literallayout> device psm0 at atkbdc? irq 12
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>See the <ulink URL="../handbook/kernelconfig.html">Handbook entry on configuring the kernel</ulink> if you've no
|
||||
experience with building kernels.</para>
|
||||
|
||||
<para>Once you have a kernel detecting psm0 correctly at boot time,
|
||||
make sure that an entry for psm0 exists in /dev. You can do this
|
||||
<para>Once you have a kernel detecting <devicename>psm0</devicename> correctly at boot time,
|
||||
make sure that an entry for <devicename>psm0</devicename> exists in <filename>/dev</filename>. You can do this
|
||||
by typing:</para>
|
||||
|
||||
<para>
|
||||
|
|
@ -1843,8 +1948,7 @@ in the virtual console:</para>
|
|||
|
||||
<para>Where <emphasis remap=tt>xxxx</emphasis> is the mouse device name and <emphasis remap=tt>yyyy</emphasis>
|
||||
is a protocol type for the mouse. See the
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused</ulink>
|
||||
man page for supported protocol types. </para>
|
||||
&man.moused.8; man page for supported protocol types. </para>
|
||||
|
||||
<para>You may wish to run the mouse daemon automatically when the
|
||||
system starts. In version 2.2.1, set the following variables in
|
||||
|
|
@ -1900,22 +2004,164 @@ button) to paste it at the text cursor.</para>
|
|||
the text. Pressing the button 3 will ``extend'' the selected region
|
||||
of text. If your mouse does not have the middle button, you may wish
|
||||
to emulate it or remap buttons using moused options. See the
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused</ulink>
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused(8)</ulink>
|
||||
man page for details.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="usbmouse">
|
||||
<para>I have a USB mouse. Does FreeBSD support the USB mouse?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>USB device support was added to FreeBSD 3.1. However, it is
|
||||
still in a preliminary state and may not always work as of version
|
||||
3.2. If you want to experiment with the USB mouse support, follow
|
||||
the procedure described below.</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Use FreeBSD 3.2 or later.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add the following lines to your kernel configuration file,
|
||||
and rebuild the kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
controller uhci0
|
||||
controller ohci0
|
||||
controller usb0
|
||||
device ums0</programlisting>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Go to the <filename>/dev</filename> directory and create a
|
||||
device node as follows:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev</userinput>
|
||||
&prompt.root; <userinput>./MAKEDEV ums0</userinput></screen>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Edit <filename>/etc/rc.conf</filename> and add the following
|
||||
lines:</para>
|
||||
|
||||
<programlisting>
|
||||
moused_enable="YES"
|
||||
moused_type="auto"
|
||||
moused_port="/dev/ums0"
|
||||
moused_flags=""
|
||||
usbd_enable="YES"
|
||||
usbd_flags=""</programlisting>
|
||||
|
||||
<para>See the <link linkend="moused">previous section</link> for
|
||||
more detailed discussion on moused.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>In order to use the USB mouse in the X session, edit
|
||||
<filename>XF86Config</filename>. If you are using XFree86 3.3.2
|
||||
or later, be sure to have the following lines in the
|
||||
<emphasis>Pointer</emphasis> section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
Protocol "Auto"</programlisting>
|
||||
|
||||
<para>If you are using earlier versions of XFree86, be sure to
|
||||
have the following lines in the <emphasis>Pointer</emphasis>
|
||||
section:</para>
|
||||
|
||||
<programlisting>
|
||||
Device "/dev/sysmouse"
|
||||
Protocol "SysMouse"</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>Refer to <link linkend="x-and-moused">another section</link> on
|
||||
the mouse support in the X environment.</para>
|
||||
|
||||
<para>Hot-plugging and unplugging of the USB mouse may not work quite
|
||||
right yet. It is a good idea connect the mouse before you start the
|
||||
system and leave it connected until the system is shutdown to avoid
|
||||
trouble.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
<para>My mouse has a fancy wheel and buttons. Can I use them in FreeBSD?</para></question><answer>
|
||||
|
||||
<para>The answer is, unfortunately, ``It depends.'' These mice with
|
||||
<para>The answer is, unfortunately, “It depends”. These mice with
|
||||
additional features require specialized driver in most cases.
|
||||
Unless the mouse device driver or the user program has specific
|
||||
support for the mouse, it will act just like a standard two, or
|
||||
three button mouse.</para>
|
||||
|
||||
<para>For the possible usage of wheels in the X Window environment,
|
||||
refer to <link linkend="x-and-wheel">that section</link>.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="psmerr">
|
||||
<para>My mouse does not seem working. The mouse cursor jumps around
|
||||
on the screen. The mouse has a wheel and is connected to the PS/2
|
||||
mouse port.</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>The PS/2 mouse driver psm in FreeBSD versions 3.2 or earlier has
|
||||
difficulty with some wheel mice, including Logitech model M-S48 and
|
||||
its OEM siblings. Apply the following patch to
|
||||
<filename>/sys/i386/isa/psm.c</filename> and rebuild the
|
||||
kernel.</para>
|
||||
|
||||
<programlisting>
|
||||
Index: psm.c
|
||||
===================================================================
|
||||
RCS file: /src/CVS/src/sys/i386/isa/Attic/psm.c,v
|
||||
retrieving revision 1.60.2.1
|
||||
retrieving revision 1.60.2.2
|
||||
diff -u -r1.60.2.1 -r1.60.2.2
|
||||
--- psm.c 1999/06/03 12:41:13 1.60.2.1
|
||||
+++ psm.c 1999/07/12 13:40:52 1.60.2.2
|
||||
@@ -959,14 +959,28 @@
|
||||
sc->mode.packetsize = vendortype[i].packetsize;
|
||||
|
||||
/* set mouse parameters */
|
||||
+#if 0
|
||||
+ /*
|
||||
+ * A version of Logitech FirstMouse+ won't report wheel movement,
|
||||
+ * if SET_DEFAULTS is sent... Don't use this command.
|
||||
+ * This fix was found by Takashi Nishida.
|
||||
+ */
|
||||
i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS);
|
||||
if (verbose >= 2)
|
||||
printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i);
|
||||
+#endif
|
||||
if (sc->config & PSM_CONFIG_RESOLUTION) {
|
||||
sc->mode.resolution
|
||||
= set_mouse_resolution(sc->kbdc,
|
||||
- (sc->config & PSM_CONFIG_RESOLUTION) - 1);
|
||||
+ (sc->config & PSM_CONFIG_RESOLUTION) - 1);
|
||||
+ } else if (sc->mode.resolution >= 0) {
|
||||
+ sc->mode.resolution
|
||||
+ = set_mouse_resolution(sc->kbdc, sc->dflt_mode.resolution);
|
||||
+ }
|
||||
+ if (sc->mode.rate > 0) {
|
||||
+ sc->mode.rate = set_mouse_sampling_rate(sc->kbdc, sc->dflt_mode.rate);
|
||||
}
|
||||
+ set_mouse_scaling(sc->kbdc, 1);
|
||||
|
||||
/* request a data packet and extract sync. bits */
|
||||
if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) {</programlisting>
|
||||
|
||||
<para>Versions later than 3.2 should be all right.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
<para> How do I use the mouse/trackball/touchpad on my laptop?
|
||||
</para></question><answer>
|
||||
|
|
@ -4672,24 +4918,23 @@ configure FreeBSD to support a mouse pointer on each virtual
|
|||
screen. In order to avoid conflicting with X, syscons supports
|
||||
a virtual device called ``<filename>/dev/sysmouse</filename>''. All mouse events
|
||||
received from the real mouse device are written to the sysmouse
|
||||
device, using the MouseSystems protocol. If you wish to use your
|
||||
mouse on one or more virtual consoles, <emphasis remap=bf>and</emphasis> use X, the
|
||||
following configuration is recommended:</para>
|
||||
device via moused. If you wish to use your
|
||||
mouse on one or more virtual consoles, <emphasis remap=bf>and</emphasis> use X,
|
||||
see <xref linkend="moused" remap="another section"> and set up moused.</para>
|
||||
|
||||
<para>
|
||||
<literallayout> /etc/rc.conf:
|
||||
moused_type=ps/2 # or whatever your actual type is
|
||||
moused_port=/dev/psm0 # or whatever your real port is
|
||||
moused_flags=
|
||||
<para>Then edit <filename>/etc/XF86Config</filename> and make sure you
|
||||
have the following lines.</para>
|
||||
|
||||
<programlisting>
|
||||
Section Pointer
|
||||
Protocol "SysMouse"
|
||||
Device "/dev/sysmouse"
|
||||
.....</programlisting>
|
||||
|
||||
<para>The above example is for XFree86 3.3.2 or later. For earlier
|
||||
versions, the <emphasis>Protocol</emphasis> should be
|
||||
<emphasis>MouseSystems</emphasis>.</para>
|
||||
|
||||
/etc/XF86Config
|
||||
Section Pointer
|
||||
Protocol "MouseSystems"
|
||||
Device "/dev/sysmouse"
|
||||
.....
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>Some people prefer to use ``<filename>/dev/mouse</filename>'' under X. To
|
||||
make this work, ``<filename>/dev/mouse</filename>'' should be linked to
|
||||
<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?sysmouse">/dev/sysmouse</ulink>:</para>
|
||||
|
|
@ -4703,6 +4948,17 @@ make this work, ``<filename>/dev/mouse</filename>'' should be linked to
|
|||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question id="x-and-wheel">
|
||||
<para>My mouse has a fancy wheel. Can I use it in X?</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>Yes. But you need to customize X client programs. See <ulink
|
||||
URL="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">Colas Nahaboo's web page (http://www.inria.fr/koala/colas/mouse-wheel-scroll/)</ulink></para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
<para>X Window menus and dialog boxes don't work right!</para></question><answer>
|
||||
|
||||
|
|
@ -4867,11 +5123,19 @@ else getty and xdm will conflict, locking out the console. The best
|
|||
way around this is to have the script sleep 10 seconds or so then
|
||||
launch xdm.</para>
|
||||
|
||||
<para>A previous version of the FAQ said to add the
|
||||
<emphasis remap=tt>vt</emphasis> you want X to use to the
|
||||
<filename>/usr/X11R6/lib/X11/xdm/Xservers</filename> file. This is not necessary:
|
||||
X will use the first free <emphasis remap=tt>vt</emphasis> it finds.</para>
|
||||
|
||||
<para>If you are to start <command>xdm</command> from
|
||||
<filename>/etc/ttys</filename>, there still is a chance of conflict
|
||||
between <command>xdm</command> and <command>getty</command>. One way to
|
||||
avoid this is to add the <literal>vt</literal> number in the
|
||||
<filename>/usr/X11R6/lib/X11/xdm/Xservers</filename> file.</para>
|
||||
|
||||
<programlisting>:0 local /usr/X11R6/bin/X vt4</programlisting>
|
||||
|
||||
<para>The above example will direct the X server to run in
|
||||
<filename>/dev/ttyv3</filename>. Note the number is offset by one. The
|
||||
X server counts the vty from one, whereas the FreeBSD kernel numbers the
|
||||
vty from zero.</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
|
||||
<qandaentry><question>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue