# Keyboard & Mouse Modules?

## Kirfew

Which configuration options would I need to select to build the correct drivers/modules for my usb mouse and ps/2 keyboard? The mouse is a Microsoft 1.1A Optical (Compatible with USB or PS/2 but plugged into usb port) and the keyboard is just a no name chinese one.

----------

## NeddySeagoon

Kirfew,

evdev looks after all input devices.

Set INPUT_DEVICES="evdev" in make.conf

You also need evdev support in the kernel. Look in /dev/input for entries like event0, event1 if they are there, your kernel is good.

----------

## Kirfew

i have done this, but the mouse and keyboard still don't work. also, Xorg -configure crashes, giving a segmentation fault at address (nil).

----------

## NeddySeagoon

Kirfew,

Xorg should work without a xorg.conf.

Please post your 

```
emerge --info
```

 output and the log file at 

```
/var/log/Xorg.0.log
```

wgetpaste can help - you will need to emerge it, then do

```
emerge --info | wgetpaste

wgatepaste /var/log/Xorg.0.log
```

Post the URLs you get.

----------

## Kirfew

emerge --info:

http://dpaste.com/190060/

wgetpaste /var/log/Xorg.0.log

http://dpaste.com/190061/

also, here's parts of the dmesg:

http://dpaste.com/190081/

http://dpaster.com/190082

----------

## VoidMage

Don't use 'EnableEmptyInput "false"' or alike, make sure both dbus and hal

are running before starting xserver. Consider moving straight to 1.8 xserver.

----------

## NeddySeagoon

Kirfew,

A few things from your emerge --info

1. Your profile is set to default/linux/x86/10.0, that not wrong but its very minimalist. That profile is intended for users who wan t set most of the USE flags for themselves.

2. Your VIDEO_CARDS is not set in make.conf, so your Xorg has been built with lots of open source drivers. Thats just clutter. If you intended to use the binary blob drives you have to ask for them

What to do ... as you are trying to use Xorg, you are probably building a desktop system. Choose one of the profiles below

```
default/linux/x86/10.0/desktop

default/linux/x86/10.0/desktop/gnome

default/linux/x86/10.0/desktop/kde
```

with eselect profile list, to get a number then eselect profile set X

Now do 

```
emerge world -uDNav
```

so all your new USE flags take effect

After that, follow the Xorg Guide to get Xorg running.  

From your /Var/log/Xorg.0.log you have

```
drmOpenDevice: node name is /dev/dri/card0

drmOpenDevice: open result is 8, (OK)
```

which shows your kernel has agpgart and DRM support, so when Xorg goes, you will have hardware acceleration.

Xorg died because you are not using hald to autodetect input devices and you don't have the old mouse and kbd drivers build and listed in INPUT_DEVICES.

Both ways work - the new way with evdev and the old way with mouse and kbd.

I still recommend you fix your profile and go with the new way or you will run into errors about needing to change USE flags on packages you have alread installed as you try to install other packages.

The bare minimum you need to do, on top of what you already have is add mouse and kbd to INPUT_DEVICES and 

```
emerge -1 xf86-input-mouse xf86-input-kbd
```

 that will allow Xorg to start.

----------

## Kirfew

YES! YES! It works! Thank you very much NeddySeagoon, I was about to switch to Arch.

----------

