# kernel does not recognize my keyboard

## keivan

I'm a new gentoo user. I've installed gentoo + kde successfully. yesterday I've installed some programs I don't remember and after that when I reboot machine, kernel does not recognize my keyboard to be able to type to login. but when I unplug my ps2 keyboard and replug again everythig works without problem. what should I do to solve this strange problem.Last edited by keivan on Wed Dec 01, 2010 11:16 am; edited 2 times in total

----------

## NeddySeagoon

keivan,

Welcome to Gentoo

We need more information.

Do you use a graphical login or does your install boot to the console, where you log in and type startx to run KDE?

It matters as the console and Xorg, which handles IO for KDE have their own drivers.

Do not 'hot plug' PS/2 equipment. It may work but its not designed to. Every now and again, keyboards, mice and motherboards are damaged by connecting or disconnecting PS/2 devices while the system is powered.

----------

## keivan

 *Quote:*   

> Welcome to Gentoo 

 

thanks neddy

 *Quote:*   

> Do you use a graphical login or does your install boot to the console, where you log in and type startx to run KDE? 

 

its a console login.

----------

## NeddySeagoon

keivan,

Thats odd. I have known the first character to be lost but not for PS/2 keyboards to not work on boot.

Can you post your dmesg output please, it may be quite big so make friends with wgetpase

```
emerge wgetpaste
```

and do 

```
dmesg | wgetpaste
```

Then make a post with the URL you get back.

If you have another PC, try setting up Secure Shell (sshd) on the problem PC then logging in remotely.

----------

## keivan

This is the url

 *Quote:*   

> If you have another PC, try setting up Secure Shell (sshd) on the problem PC then logging in remotely.

 

Actually I have a windows machine + CYGWin, also I can manage to boot into my mint linux. but I didn't use sshd before.

----------

## NeddySeagoon

keivan,

```
[    1.794425] PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12

[    1.837638] serio: i8042 KBD port at 0x60,0x64 irq 1

[    1.837644] serio: i8042 AUX port at 0x60,0x64 irq 12

[    1.837724] mice: PS/2 mouse device common for all mice
```

Tells that the kernel found your PS/2 controller and allocated hte IRQs properly.

```
[   57.855580] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
```

Tells that you unplugged and reconnected the keyboard as the line should have occured with [    3.964988] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input2, times are in seconds.

There are no indications of anything wrong or even unusual.

----------

## keivan

is it possible that this problem could be linked to some settings in the bios. e.x. acpi v3.0 or anything else?

----------

## NeddySeagoon

keivan,

I think thats unlikely but not impossible. There is normally no way to disable the keyboard in the BIOS. Most people want to use a keyboard and its easy enough to disconnect if you don't.

On booting, do you get an error along the lines of 

```
No keyboard detected

Press F1 to Continue
```

Try disconnecting the keyboard to see it.

If you don't see the error, the BIOS is detecting the keyboard properly.

I don't know what BIOS option it could be. Wild Guess ... Legacy USB Support

----------

## keivan

I've reconfigured the kernel and installed it the correct way. Everything works fine now. make install command does not work properly for x86_64 kernel because it copy x86 bzimage to the boot directory (instead of x86_64 one). anyway problem solved.

----------

## NeddySeagoon

keivan,

The i386 and x86_64 (32 bit and 64 bit) kernel trees were merged around kernel 2.6.25. At that time, i386 and x86_64 became symbolic links to x86.

What you get in x86 depends on the kernel configuration but its right.

What did you change in the kernel configuration?

----------

## keivan

I've changed lots of things but I think the important change was the keyboard drivers I've selected.

also I've executed these commands before compile.

env-update

source /etc/profile

to be honest, actually I don't know which one solved the problem.

----------

## keivan

Last night I've reconfigured the kernel using recommendation from this site  problem returned back. Now I'm sure there a problem in my kernel configuration or there is a bug somewhere. please help me configure the kernel to repair the keyboard.

how can I uninstall modules remain from previous kernel?

I've googled and understand that this is a common problem. see this , but adding 

```
i8042.nomux=1 locale=fr_FR i8042.reset
```

 these commands didnot solve my problem.

however I did not edit the grub.conf I've check them at boot time at grub level.

----------

## keivan

I've changed some irrelevant things in the kernel .config which solved the problem.

```
Bus options

  -> [*] Support for DMA Remapping Devices

  -> [*] Support for Interrupt Remapping

Device Drivers

  -> Generic Driver Options

       -> [*] Maintain a devtmpfs filesystem to mount at /dev

  -> Block Devices

       -> Packet writing on CD/DVD

              [*] Enable write caching //I even don't have a CD/DVD/BRD device
```

Problem solved

----------

## keivan

Now I have no working ps2 mouse in kde. what should I do?

----------

## NeddySeagoon

keivan,

I'm sure Pappy, who owns kernel-seeds, would like to hear about your keyboard problem because it has happend for you, it will happen to others.

Please make a post in this thread to draw  pappy_mcfaes attention to the issue.

The KDE issue is either kernel or Xorg.

The old mouse drivers in the kernel and in Xorg are no longer used bu default.

In /etc/make.conf, be sure your INPUT_DEVICES=  includes evdev. If you have to add it, run 

```
emerge -1 xf86-input-evdev
```

to add the event device driverfor Xorg.

Check your kernel with 

```
grep EVDEV /usr/src/linux/.config
```

which should include CONFIG_INPUT_EVDEV=y in the output. =m is ok too, provided the module is loaded. Look in lsmod for evdev.

You need hald running. Try 

```
/etc/init.d/hald start
```

if you get an error about it already being started, thats good. Otherwise, hal was not running, so add it to your default runlevel.

You need dbus running too the steps are the same as for hald above.

With hald, dbus and evdev all in position, what happens now?

----------

## keivan

dear neddy

I'm sure there is a bug in the kernel. to solve the problem, I removed some unnecessary modules from the  kernel (input devices) only standard ps2 mouse remained. now mouse works.

----------

