# Install USB mouse, after install system



## centurion (Mar 15, 2009)

I've got problem with my mouse. Last time I installed FreeBSD on my PC and unfortunately I didn't install my USB mouse (I don't know how it's possible xD). So I would like to ask you, How to install mouse (USB) by use terminal, and I just start work with FreeBSD, so if you can explain me simply ;D

P.s. I've got cd with ports if it's can help.

AND I'M SORRY FOR MY LANGUAGE, I'M FROM OTHER COUNTRY, I JUST LERN ENGLISH ;]


----------



## SirDice (Mar 15, 2009)

Just plug it in. There's nothing to install..


----------



## MG (Mar 15, 2009)

This is what I have in /etc/rc.conf:

moused_enable="YES"

and in /etc/X11/xorg.conf:

Section "InputDevice"    
    Identifier     "Mouse1"
    Driver         "mouse"
    Option         "Protocol" "sysmouse"
    Option         "Device" "/dev/sysmouse"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection


----------



## SirDice (Mar 15, 2009)

MG said:
			
		

> This is what I have in /etc/rc.conf:
> 
> moused_enable="YES"


Not needed for USB mice.


----------



## centurion (Mar 15, 2009)

*SirDice*"Just plug it in" didn't work ;/

BUT .... Thank you very much *MG*, now my mouse work There had to update those files xD


----------



## SirDice (Mar 15, 2009)

Moused will get loaded as soon as you plug in an USB mouse. There's no need for the line to be in /etc/rc.conf.

What does /var/log/messages say when you plug it in?


----------



## centurion (Mar 15, 2009)

but *SirDice* thans for interest


----------



## centurion (Mar 15, 2009)

Ok, I notice something now ;]
My problem is a little stupid case now, my mouse(wireless, USB) is crashed xD, but touchpad work(My PC is notebook). But first even touchpad didn't work(now work), I was so enjoy when I updated those files(then touchpad work), that I didn't check my wireless mouse (I thought it also work ;/).
*SirDice* was also right, "Just plug it in ... "

Now everything is alright . One more time I'm so sory about my language ;/


----------



## akdb2004 (Mar 17, 2009)

*USB mouse doesn't workin KDE*

My problem is that something else is missing, but I don't quite know where to look. A fresh full install off the disk and KDE installed by: "pkg_add -r kde3". Everything works fine. But after updating the system, the mouse no longer works in kde, but does in the X term.

I'm on a new install now, by just installing the minimum, then fresh ports installed, installed xorg, then KDE4. Now have KDE 4.2.1, but in startx I get KDE but still no mouse function. 
dmesg | less produces: "ums0: <Logitech USB Receiver, class 0/0, rev 1.10/1.00, addr 2> on uhub2"
next line: "ums0: 16 buttons and Z dir."

In the x term I have usage of the USB mouse, so I know the problem is not in X.

Any ideas would be much appreciated.
thanks in advance
Dennis


----------



## SirDice (Mar 17, 2009)

akdb2004 said:
			
		

> But after updating the system, the mouse no longer works in kde, but does in the X term.
> {....}
> In the x term I have usage of the USB mouse, so I know the problem is not in X.


This doesn't make sense. Don't you mean the console instead of "X term"?

If you currently have Xorg 7.4 installed add *Option "AllowEmptyInput" "off"* to the ServerLayout section of /etc/X11/xorg.conf.

When you're upgrading ports read /usr/ports/UPDATING.


----------



## centurion (Mar 17, 2009)

Yeah I agree with *SirDice* it doesn't make sense. I red somewhere that Xorg 7.4 has a lot of error, so you should update your Xorg to lower version (If you're using Xorg 7.4 of course). It's just my opinion ...


----------



## akdb2004 (Mar 17, 2009)

SirDice said:
			
		

> This doesn't make sense. Don't you mean the console instead of "X term"?
> 
> If you currently have Xorg 7.4 installed add *Option "AllowEmptyInput" "off"* to the ServerLayout section of /etc/X11/xorg.conf.
> 
> When you're upgrading ports read /usr/ports/UPDATING.


Yes, I meant console
And yes again, this doesn't make sense at all. 

Previous install attempts complete off CD have yielded a working system. pkg_add installs work. Upgrading ports is where problems start. Upgrade KDE 3.10 to 3.10.1 and I lose mouse function. Another attempt, I installed KDE4 using pkg_add and everything worked fine. But KDE 4.1.1 is limited so portupgrade to KDE 4.2 ended with many errors and upon completion, no mouse.

This attempt I performed the minimal base install first. Then after updating ports, installed xorg, then KDE 4.2.1, no mouse function. But boot to console, the system knows the USB mouse is there and works in the console, so I know xorg is not the problem. Something in a KDE config file is not there. 

My next option is to perform an install on a spare drive off CD. Then examine the config files to see what does not get installed with a clean build or an upgrade.

You would think this is nothing new and a solution would be out there on the forums somewhere but a google renders nothing. Whats worse the Handbook details a desktop built from source but lacks mentioning if config files need modification to make the thing work.

I will also read /usr/ports/UPDATING now

FreeBSD is very sweet and I expect once I have a functional install, it may be a viable alternative to my usual Debian Lenny desktop systems
</rant>

Thanks again for your replies and still looking for ideas for a solution.


----------



## centurion (Mar 17, 2009)

If you'd like, you can try install GNOME


----------



## SirDice (Mar 17, 2009)

akdb2004 said:
			
		

> This attempt I performed the minimal base install first. Then after updating ports, installed xorg, then KDE 4.2.1, no mouse function. But boot to console, the system knows the USB mouse is there and works in the console, so I know xorg is not the problem.


Yes, it is an Xorg 'problem' actually. Or more precisely they've changed the way Xorg handles keyboards and mice. Add that AllowEmptyInput option I mentioned to xorg.conf.

Also make sure you add to /etc/rc.conf:

```
dbus_enable="YES"
hald_enable="YES"
```


----------



## SirDice (Mar 17, 2009)

centurion said:
			
		

> If you'd like, you can try install GNOME


That would probably result in the same non-functioning mouse as the problem isn't in KDE but xorg.conf


----------



## akdb2004 (Mar 18, 2009)

SirDice said:
			
		

> Yes, it is an Xorg 'problem' actually. Or more precisely they've changed the way Xorg handles keyboards and mice. Add that AllowEmptyInput option I mentioned to xorg.conf.
> 
> Also make sure you add to /etc/rc.conf:
> 
> ...


Thanks for the solution. I'll give it a go this weekend, too many things on my plate during the work week.
Q: Is there any advantage to upgrading xorg to 7.4 over 7.3? If not, would I just be better off downgrading back to 7.3.x?
Thanks again
Dennis


----------



## SirDice (Mar 18, 2009)

FWIW after the initial problems with the xorg.conf I haven't had any issues with 7.4.


----------



## DutchDaemon (Mar 18, 2009)

Me neither. Had a bit of a fight initially with mouse+hal, but those issues were quickly solved. It's been rock-solid for weeks now.


----------



## SirDice (Mar 18, 2009)

Yep, I first started with adding that AllowEmptyInput to my existing pre-7.4 xorg.conf. When that worked I started experimenting with the new way of detecting. This is my current one:


```
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
EndSection

Section "Files"
    FontPath        "/usr/local/lib/X11/fonts/misc/:unscaled"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/:unscaled"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/:unscaled"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/OTF/"
    FontPath        "/usr/local/lib/X11/fonts/bitstream-vera"
    FontPath        "/usr/local/lib/X11/fonts/webfonts/"
    FontPath        "/usr/local/share/ghostscript/fonts/"
EndSection

Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "MSI"
    BoardName      "NX7600GT"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Videocard0"
    DefaultDepth    24
    Option         "AddARGBGLXVisuals" "True"
    #Option        "DisableGLXRootClipping" "True"
    #Option        "AllowGLXWithComposite" "True"
    #Option        "TwinView"
    Option         "MetaModes" "1600x1200,1600x1200;1280x1024,1280x1024;1024x768,1024x768;800x600,800x600"
    #Option        "TwinViewXineramaInfoOrder" "DFP,CRT"
    Option         "ConnectedMonitor" "DFP"
    SubSection     "Display"
        Depth       24
        Modes      "1600x1200" "1280x1024" "1024x768" "800x600"
    EndSubSection
EndSection
```

Mouse and keyboard seem to work fine. I do use a standard US layout though.

(In case you're wondering about the dual screen, the CRT recently died on me. So I'm stuck with one monitor for the time being  )


----------



## akdb2004 (Mar 19, 2009)

SirDice said:
			
		

> FWIW after the initial problems with the xorg.conf I haven't had any issues with 7.4.


Cool,  I'll be hacking away again on it tomorrow. Anxious to continue building the system.
Thanks again


----------



## akdb2004 (Mar 19, 2009)

centurion said:
			
		

> If you'd like, you can try install GNOME


Thanks for the tip. I started my *nix experience years ago using Gnome. It's okay, but several years back tried KDE. After much tweaking, now prefer it over other options.
Happy Hacking


----------



## akdb2004 (Mar 21, 2009)

SirDice said:
			
		

> Yep, I first started with adding that AllowEmptyInput to my existing pre-7.4 xorg.conf. When that worked I started experimenting with the new way of detecting. This is my current one:
> 
> 
> ```
> ...



Thanks again for the solution.
Got the mouse working in KDE now. Only problem now is that KDE 4.2.1 running on a 3 year old HP laptop; 3Ghz P4; 1GB ram, runs like a slug in winter.

Note to self: Need new faster laptop/desktop to run KDE 4.2+

That was fun, another hurdle overcome, now migrating back to KDE 3.10.1 which is much faster and smoother.
Thanks again


----------

