Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 1999 00:52:38 -0800 (PST)
From:      <yokota@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/15300: assorted update for FAQ
Message-ID:  <199912060852.AAA04667@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         15300
>Category:       docs
>Synopsis:       assorted update for FAQ
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          support
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec  6 01:00:03 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     yokota@FreeBSD.org
>Release:        FreeBSD-3.3
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 3.3-STABLE FreeBSD 3.3-STABLE #0: Sat Oct 30 11:41:40 PDT 1999 jdp@freefall.freebsd.org:/d/src/sys/compile/FREEFALL i386
>Description:
Assorted update for FAQ.
- Update mouse support description.
- Added USB keyboard and mouse items.
- Updated moused and the X server setting.
- Updated xdm setting.
>How-To-Repeat:
>Fix:
Index: book.sgml
===================================================================
RCS file: /src/CVS/doc/en_US.ISO_8859-1/books/faq/book.sgml,v
retrieving revision 1.25
diff -u -r1.25 book.sgml
--- book.sgml	1999/11/25 09:08:54	1.25
+++ book.sgml	1999/12/06 08:42:21
@@ -1756,25 +1756,130 @@
   
 </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>
+
+<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>
+
+<para>
+<literallayout>      controller uhci0
+      controller ohci0
+      controller usb0
+      controller ukbd0
+      options KBD_INSTALL_CDEV
+      </literallayout>
+</para>
+</listitem>
+
+<listitem>
+<para>Go to the <filename>/dev</filename> directory and create device 
+nodes as follows:</para>
+
+<para>
+<literallayout>      ./MAKEDEV kbd0 kbd1
+      </literallayout>
+</para>
+</listitem>
+
+<listitem>
+<para>Edit <filename>/etc/rc.conf</filename> and put the following 
+lines:</para>
+
+<para>
+<literallayout>      usbd_enable="YES"
+      usbd_flags=""
+      </literallayout>
+</para>
+</listitem>
+
+</orderedlist>
+</para>
+
+<para>After the system is rebooted, the AT keyboard becomes
+<filename>/dev/kbd0</filename> and the USB keyboard becomes 
+<filename>/dev/kbd1</filename>, if both are connected to the system.
+If there is the USB keyboard only, it will be 
+<filename>/dev/ukbd0</filename>.</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>
+
+<para>
+<literallayout>      kbdcontrol -k /dev/kbd1 < /dev/ttyv0 > /dev/null
+      </literallayout>
+</para>
+
+<para>Note that if the USB keyboard is the only keyboard, it is 
+accessed as <filename>/dev/kbd0</filename>, thus, the command should 
+look like:</para>
+
+<para>
+<literallayout>      kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null
+      </literallayout>
+</para>
+
+<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.  You had better connect the keyboard before you
+start the system and leave it connected until the system is shutdown
+to avoid troubles.</para>
+
+<para>See the 
+<ulink URL="http://www.freebsd.org/cgi/man.cgi?ukbd">ukbd(4)</ulink>;
+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>;
+<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?mse">mse(4)</ulink>;
 man page for more information.</para>
   
 </answer></qandaentry>
@@ -1784,29 +1889,45 @@
 <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, <emphasis remap=tt>psm</emphasis>, 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
+<command>-c</command> 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 <emphasis remap=tt>psm0</emphasis> correctly at boot time,
+make sure that an entry for <emphasis remap=tt>psm0</emphasis> exists in <filename>/dev</filename>.  You can do this
 by typing:</para>
   
 <para>
@@ -1835,7 +1956,7 @@
   
 <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>;
+<ulink URL="http://www.FreeBSD.org/cgi/man.cgi?moused">moused(8)</ulink>;
 man page for supported protocol types.  </para>
   
 <para>You may wish to run the mouse daemon automatically when the 
@@ -1892,11 +2013,105 @@
 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 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>
+
+<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>
+
+<para>
+<literallayout>      controller uhci0
+      controller ohci0
+      controller usb0
+      device     ums0
+      </literallayout>
+</para>
+</listitem>
+
+<listitem>
+<para>Go to the <filename>/dev</filename> directory and create a device 
+node as follows:</para>
+
+<para>
+<literallayout>      ./MAKEDEV ums0
+      </literallayout>
+</para>
+</listitem>
+
+<listitem>
+<para>Edit <filename>/etc/rc.conf</filename> and put the following 
+lines:</para>
+
+<para>
+<literallayout>      moused_enable="YES"
+      moused_type="auto"
+      moused_port="/dev/ums0"
+      moused_flags=""
+      
+      usbd_enable="YES"
+      usbd_flags=""
+      </literallayout>
+</para>
+
+<para>See <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,
+make sure to have the following lines in the 
+<emphasis remap=tt>Pointer</emphasis> section.</para>
+
+<para>
+<literallayout>      Device   "/dev/sysmouse"
+      Protocol "Auto"
+      </literallayout>
+</para>
+
+<para>If you are using earlier versions of XFree86, make sure to have 
+the following lines in the <emphasis remap=tt>Pointer</emphasis> 
+section.</para>
+
+<para>
+<literallayout>      Device   "/dev/sysmouse"
+      Protocol "SysMouse"
+      </literallayout>
+</para>
+</listitem>
+
+</orderedlist>
+</para>
+
+<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.  You had better connect the mouse before you
+start the system and leave it connected until the system is shutdown
+to avoid troubles.</para>
+
+</answer></qandaentry>
+
 <qandaentry><question>
 <para>My mouse has a fancy wheel and buttons.  Can I use them in FreeBSD?</para></question><answer>
 
@@ -1906,6 +2121,66 @@
 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">another 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>
+
+<para>
+<literallayout>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) {
+
+</literallayout>
+</para>
+
+<para>Versions later than 3.2 should be all right.</para>
+
 </answer></qandaentry>
 
 <qandaentry><question>
@@ -4653,24 +4928,25 @@
 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>Then edit ``<filename>/etc/XF86Config</filename>'' and make sure 
+you have the following lines.</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=
-
-        /etc/XF86Config
-          Section Pointer
-              Protocol "MouseSystems"
-              Device   "/dev/sysmouse"
-              .....
+<literallayout>      Section Pointer
+      Protocol "SysMouse"
+      Device   "/dev/sysmouse"
+      .....
       </literallayout>
 </para>
-  
+
+<para>The above example is for XFree86 3.3.2 or later.  For earlier
+versions, the <emphasis remap=tt>Protocol</emphasis> should be 
+``<emphasis remap=tt>MouseSystems</emphasis>''.</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>;
@@ -4684,6 +4960,16 @@
   
 </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.
+<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>
 
@@ -4847,12 +5133,24 @@
 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 <emphasis remap=tt>xdm</emphasis> from
+<filename>/etc/ttys</filename>, there still is a chance of conflict 
+between <emphasis remap=tt>xdm</emphasis> and 
+<emphasis remap=tt>getty</emphasis>. One way to avoid this is to add 
+the <emphasis remap=tt>vt</emphasis> number in the 
+<filename>/usr/X11R6/lib/X11/xdm/Xservers</filename> file.</para>
+
+<para>
+<literallayout>      :0 local /usr/X11R6/bin/X vt4
+      </literallayout>
+</para>
+ 
+<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>

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912060852.AAA04667>