Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2004 12:54:46 +0000
From:      Mark Ovens <marko@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: USB mouse support
Message-ID:  <200411291254.46954.marko@freebsd.org>
In-Reply-To: <41AA3D1A.70702@fastmail.fm>
References:  <41A8E362.1070309@fastmail.fm> <200411282044.10356.marko@freebsd.org> <41AA3D1A.70702@fastmail.fm>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun November 28 2004 21:03, Trey Sizemore wrote:
> Mark Ovens wrote:
> >On Sun November 28 2004 19:35, Trey Sizemore wrote:
> >>Mark Ovens wrote:
> >>>On Sun November 28 2004 18:28, Trey Sizemore wrote:
> >>>>Hmmm...not sure why mine's not working then.  Is your mouse the
> >>>> wireless version?  Mine says Microsoft Wireless Mouse 2.0 (it's kind
> >>>> of a light purple color ).
> >>>
> >>>Yes, same as mine.
> >>>
> >>>You did change ''moused_port'' in /etc/rc.conf to /dev/psm0 when you
> >>>connected it to the PS/2 port, didn't you?
> >>
> >>I'll have to check...I'm doing a portupgrade right now, so I'll have to
> >>check when that finishes.
> >
> >I've just applied the patch in PR kern/70607 and it works just fine -
> > although I've not tested the tilt wheel because, as I said, I don't use
> > it so I'm not sure how to set it up in FreeBSD.
>
> When you say it works fine, do you mean you've attached the mouse via
> USB?

Yes :-)

> I'm new to FreeBSD, so how do I apply this patch to get the mouse 
> to work?
>

The patch needs a slight mod - removal of a field in a struct - from the one 
posted (see comments about the 'dt' field in the PR). I can e-mail you a 
modified version - is your re-mail address valid?

Save the patch to a file, e.g. /tmp/pr70607_patch then, as root:

# cd /usr/src
# patch -Clp0 < /tmp/pr70607_patch

[that's a lower case L and a zero]

The -C just simulates what would happen without actually changing anything - 
just to check that the patch will apply cleanly. Make sure all the hunks 
succeed, you should see this:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/dev/usb/usbhid.h.orig  Mon Sep 20 00:59:48 2004
|+++ sys/dev/usb/usbhid.h       Mon Sep 20 02:14:40 2004
--------------------------
Patching file sys/dev/usb/usbhid.h using Plan A...
Hunk #1 succeeded at 123.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sys/dev/usb/ums.c.orig     Mon Nov 29 12:37:13 2004
|+++ sys/dev/usb/ums.c  Sun Nov 28 20:12:30 2004
--------------------------
Patching file sys/dev/usb/ums.c using Plan A...
Hunk #1 succeeded at 104.
Hunk #2 succeeded at 114.
Hunk #3 succeeded at 140.
Hunk #4 succeeded at 269.
Hunk #5 succeeded at 277.
Hunk #6 succeeded at 290.
Hunk #7 succeeded at 408.
Hunk #8 succeeded at 425.
Hunk #9 succeeded at 466.
Hunk #10 succeeded at 484.
Hunk #11 succeeded at 503.
Hunk #12 succeeded at 550.
Hunk #13 succeeded at 807.
done

If they all succeed then do it for real:

# patch -lp0 < /tmp/pr70607_patch

[again a lower case L and a zero]

The rebuild and install your kernel

# make buildkernel && installkernel

edit /etc/rc.conf to change moused_port to /dev/ums0, shutdown, connect the 
mouse to the USB port, restart and enjoy:

Regards,

Mark







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