# external PS2 mouse problem on 2.6.3 [solved]

## Grimble Grumble

Well, This story starts while 2.6 kernel was in its testing phase, I decided to give it a go and installed 2.6-test10 on my old compaq presario 1200 laptop. It didn't last long as I couldn't configure correctly my pcmcia controler. But I can remeber that pretty much everything else worked and especially my external PS2 optical intellimouse (I remember saying 'wow, that's fast.'  :Smile:  . I have been trying to install the kernel 2.6.3 for a few days now and this time, my pcmcia controler goes fine, but now my external mouse has vanished. The touchpad is working allright but the external mouse has literally disapeared. I've tried almost everything that was sugested about that on this thread but no results so far. what is puzzling me the most is that I cated almost every devices related to the mouse (event , mouse ,mice , psaux etc ...) and each time I get the input from the touchpad. The external mouse has no effect wheresoever.

So here are the questions : 

- is there been some changes in the way ps2 is handled by the kernel since the test versions ?

- is there anything to add to the kernel config to make external PS2 work ?

and here is my .config :

```

#

# Input device support

#

CONFIG_INPUT=y

#

# Userland interfaces

#

CONFIG_INPUT_MOUSEDEV=y

CONFIG_INPUT_MOUSEDEV_PSAUX=y

CONFIG_INPUT_MOUSEDEV_SCREEN_X=800

CONFIG_INPUT_MOUSEDEV_SCREEN_Y=600

CONFIG_INPUT_JOYDEV=m

# CONFIG_INPUT_TSDEV is not set

CONFIG_INPUT_EVDEV=y

# CONFIG_INPUT_EVBUG is not set

#

# Input Device Drivers

#

CONFIG_INPUT_KEYBOARD=y

CONFIG_KEYBOARD_ATKBD=y

# CONFIG_KEYBOARD_SUNKBD is not set

# CONFIG_KEYBOARD_XTKBD is not set

# CONFIG_KEYBOARD_NEWTON is not set

CONFIG_INPUT_MOUSE=y

CONFIG_MOUSE_PS2=y

# CONFIG_MOUSE_SERIAL is not set

# CONFIG_MOUSE_INPORT is not set

# CONFIG_MOUSE_LOGIBM is not set

# CONFIG_MOUSE_PC110PAD is not set

# CONFIG_INPUT_JOYSTICK is not set

# CONFIG_INPUT_TOUCHSCREEN is not set

# CONFIG_INPUT_MISC is not set

```

Last edited by Grimble Grumble on Sun Feb 29, 2004 5:37 pm; edited 1 time in total

----------

## lesha

Hey, I just struggled with a similar problem myself. It might even be the same, or due to the same code. As I discovered (after much googling), my issue has been around for a while. I'm currently corresponding about it with Dmitry Torokhov, who seems to be a i8042 guru: http://lkml.org/lkml/2004/2/3/158

The workaround is to pass i8042.nomux as a kernel option, as that message says. 

If your problem is the same, and you're interested in helping, he's just asked me to get the debug output with the below patch applied (this is to have some extra info, not to fix anything). To get debug output, go to drivers/input/serio/i8042.c, find the line with #undef DEBUG and replace it by #define DEBUG, recompile kernel, reboot (don't pass nomux for useful output). Also, the debug options is gonna overflow the dmesg buffer, so you should pass something like log_buf_len=131072 to the kernel when you boot, and run dmesg &> outfile right after startup. The log ought to go to him directly (as I don't understand this at all) at <dtor_core@ameritech.net>.

===== drivers/input/serio/i8042.c 1.41 vs edited =====

--- 1.41/drivers/input/serio/i8042.c	Fri Feb 13 01:55:06 2004

+++ edited/drivers/input/serio/i8042.c	Wed Feb 25 06:52:30 2004

@@ -454,6 +454,8 @@

 {

 	unsigned char param;

+	int rc = -1;

+

 /*

  * Get rid of bytes in the queue.

  */

@@ -466,6 +468,12 @@

  * command responses for the i8042_check_aux() routine.

  */

+	param = 0xa4;

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+

 	param = 0xf0;

 	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x0f)

 		return -1;

@@ -473,13 +481,19 @@

 	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0xa9)

 		return -1;

 	param = 0xa4;

-	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == 0x5b)

-		return -1;

+	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x5b) {

+		if (mux_version)

+			*mux_version = ~param;

+		rc = 0;

+	}

+

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

+	i8042_command(&param, I8042_CMD_AUX_LOOP);

-	if (mux_version)

-		*mux_version = ~param;

-	return 0;

+	return rc;

 }

----------

## Grimble Grumble

nope. The nomux trick hasn't worked. I'll contact Dmitry Torokhov anyway

----------

## Grimble Grumble

Finally it appears that my laptop is kinda special in the way that it gives priority to the touchpad even when an external mouse is plugged in, and, has the format of the packets is not the same for synaptics and PS2, the PS2 device is then completely ignored. Passing the option psmouse.proto=exps (or proto=exps if you have psmouse compiled as a module) solved the problem on my laptop. If this doesn't work for you Dmitry also suggested  psmouse.proto=bare (or proto=bare if you have psmouse compiled as a module) which i didn't try.

 And if your external mouse still doesn't work, the last thing i can say is that, once you get used to it and you've found the settings that suits you, a touchpad is actually not so hard to use. It's even quite adictive     :Smile: Last edited by Grimble Grumble on Tue Mar 09, 2004 2:18 pm; edited 1 time in total

----------

## caspar

 *lesha wrote:*   

> Hey, I just struggled with a similar problem myself. It might even be the same, or due to the same code. 

 

Me, too. 

 *Quote:*   

> 
> 
> The workaround is to pass i8042.nomux as a kernel option, as that message says. 
> 
> 

 

Works.

 *Quote:*   

> 
> 
> If your problem is the same, and you're interested in helping, he's just asked me to get the debug output with the below patch applied (this is to have some extra info, not to fix anything). 
> 
>  }

 

Is help still needed?. I am using the notebook very seldomly at the moment. So it is hard to post debug output regularly.

If it is really needed I can do it though. (sorry I will be very busy the next days).

I am using a Thinkpad R40 2722-3GG.

Problem occured with kernel 2.6.3

Kernel 2.6.1 works without passing the parameter.

----------

## dtor

 *Quote:*   

> 
> 
> Is help still needed?. I am using the notebook very seldomly at the moment. So it is hard to post debug output regularly.
> 
> If it is really needed I can do it though. (sorry I will be very busy the next days).

 

I would love to have at least one full debug from a person whose kernel reports active multiplexing controller rev 10.12 with the patch above applied. I myself do not have a ThinkPad to play with.

 *Quote:*   

> 
> 
> I am using a Thinkpad R40 2722-3GG.
> 
> Problem occured with kernel 2.6.3
> ...

 

The order in which kernel probes for the prsence of MUX is changed and that what causes the failure. The problem is that the new order is also fully within specs so we don't want just mask the problem by reverting it, al least not for now.

DMitry

----------

## caspar

Ok. I will do it. When I use my laptop the next time I'll configure it to give the debug output.

----------

## caspar

 *Quote:*   

> 
> 
> I would love to have at least one full debug from a person whose kernel reports active multiplexing controller rev 10.12 with the patch above applied. I myself do not have a ThinkPad to play with.

 

I'd love to but I do not know how to apply the patch. If I copy the lines above to a file and do a "patch i8042.c patchfile" I get an "unknown character error"  at the first opening brace ("{").

----------

