Skip to contentSkip to conversation

Synaptics PS/2 driver and 2.6.0-test11

DISCUSSION Lukas Hejtmanek 6 participants 15 messages Nov 30, 2003 – Dec 14, 2003 1 message not in the archive Input drivers

lore
Share & tools
lore
#0 lore raw

Hello,

I got a notebook with synaptics touch pad.

dmesg:
mice: PS/2 mouse device common for all mice i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12 Synaptics Touchpad, model: 1
Firmware: 5.8
180 degree mounted touchpad
Sensor: 18
new absolute packet format
Touchpad has extended capability bits
-> 4 multi-buttons, i.e. besides standard buttons -> multifinger detection
-> palm detection
input: SynPS/2 Synaptics TouchPad on isa0060/serio4
serio: i8042 AUX3 port at 0x60,0x64 irq 12
input: AT Translated Set 2 keyboard on isa0060/serio0
serio: i8042 KBD port at 0x60,0x64 irq 1

With Xfree I'm using synaptics driver. With 2.6.0-test11 cursor losts sync and appers at random possition sometimes.
I have in log:

Nov 30 12:32:23 debian kernel: Synaptics driver resynced.
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 4th byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 4th byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 1st byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 4th byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 1st byte
Nov 30 12:33:54 debian last message repeated 2 times
Nov 30 12:33:54 debian kernel: Synaptics driver resynced.
Nov 30 12:34:25 debian kernel: Synaptics driver lost sync at 1st byte

It does not happen with 2.4.22 kernel. Is there something I can try?

Signature · 1 line
Lukáš Hejtmánek
#1 lore raw
Quoted 11 lines · Lukas Hejtmanek
Nov 30 12:32:23 debian kernel: Synaptics driver resynced.
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 4th byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 4th byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 1st byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 4th byte
Nov 30 12:33:54 debian kernel: Synaptics driver lost sync at 1st byte
Nov 30 12:33:54 debian last message repeated 2 times
Nov 30 12:33:54 debian kernel: Synaptics driver resynced.
Nov 30 12:34:25 debian kernel: Synaptics driver lost sync at 1st byte
Quoted 1 line

It does not happen with 2.4.22 kernel. Is there something I can try?

Hi,

Are you using ACPI? Does it work without ACPI? Do you have an application that periodically polls battery state or temperature? From what I've seen many laptops spend considerable amount of time in BIOS when checking battery state...

Dmitry

#2 lore raw
Quoted 4 lines · Dmitry Torokhov

Are you using ACPI? Does it work without ACPI? Do you have an application that periodically polls battery state or temperature? From what I've seen many laptops spend considerable amount of time in BIOS when checking battery state...

I'm using ACPI both in 2.4.22 and 2.6.0. I'm using battery_applet (gnome applet) for testing battery state.

I will try it. Is acpi=off at boot time enough for that?

Signature · 1 line
Lukáš Hejtmánek
#3 lore raw
Quoted 10 lines · Lukas Hejtmanek
Quoted 4 lines · Dmitry Torokhov

Are you using ACPI? Does it work without ACPI? Do you have an application that periodically polls battery state or temperature? From what I've seen many laptops spend considerable amount of time in BIOS when checking battery state...

I'm using ACPI both in 2.4.22 and 2.6.0. I'm using battery_applet (gnome applet) for testing battery state.

I will try it. Is acpi=off at boot time enough for that?

How often does battery_applet poll the battery? Start with polling the battery less often, let's say every 3 minutes and see if the problem goes away.

Dmitry

#4 lore raw
Quoted 3 lines · Dmitry Torokhov

How often does battery_applet poll the battery? Start with polling the battery less often, let's say every 3 minutes and see if the problem goes away.

Well as first approach I killed the battery applet and it looks like working ok. When I run it again it immediatelly dump message about lost sync.

However why it does not do that with 2.4.22 kernel?

Signature · 1 line
Lukáš Hejtmánek
#5 lore raw
In reply to Dmitry Torokhov
Quoted 9 lines · Dmitry Torokhov
Quoted 6 lines · Lukas Hejtmanek

On Sun, Nov 30, 2003 at 05:28:10PM -0500, Dmitry Torokhov wrote:

I'm using ACPI both in 2.4.22 and 2.6.0. I'm using battery_applet (gnome applet) for testing battery state.

I will try it. Is acpi=off at boot time enough for that?

How often does battery_applet poll the battery?

This particular applet was written by some genius to read a state from ACPI _every second_. To add insult to injury it rereads a constant information from ...battery/info on every round instead of storing it. As you can guess it can sink a substantial amount of cycles and other resources especially that ACPI in BIOS is also often on a very heavy side.

Quoted 2 lines

Start with polling the
battery less often, let's say every 3 minutes

Likely even every 3 seconds will make a difference but maybe not enough.

Michal

#6 lore raw
Quoted 9 lines · Michal Jaegermann
Quoted 8 lines · Dmitry Torokhov
Quoted 6 lines · Lukas Hejtmanek

On Sun, Nov 30, 2003 at 05:28:10PM -0500, Dmitry Torokhov wrote:

I'm using ACPI both in 2.4.22 and 2.6.0. I'm using battery_applet (gnome applet) for testing battery state.

I will try it. Is acpi=off at boot time enough for that?

Quoted 9 lines
Quoted 1 line

How often does battery_applet poll the battery?

This particular applet was written by some genius to read a state from ACPI _every second_. To add insult to injury it rereads a constant information from ...battery/info on every round instead of storing it. As you can guess it can sink a substantial amount of cycles and other resources especially that ACPI in BIOS is also often on a very heavy side.

This has been improved in CVS and will be in the next release out shortly. The fixes have helped resolve a load of issues wrt CPU usage and jerkyness when using this applet and ACPI.

Quoted 6 lines
Quoted 2 lines

Start with polling the
battery less often, let's say every 3 minutes

Likely even every 3 seconds will make a difference but maybe not enough.

There's a test tarball at http://www.gnome.org/~kmaraas/gnome-applets-
2.4.2-test.tar.gz if you want to try out the current stuff.

Cheers
Kjartan

#7 lore raw
In reply to Michal Jaegermann
Quoted 6 lines · Michal Jaegermann

This particular applet was written by some genius to read a state from ACPI _every second_. To add insult to injury it rereads a constant information from ...battery/info on every round instead of storing it. As you can guess it can sink a substantial amount of cycles and other resources especially that ACPI in BIOS is also often on a very heavy side.

But why it does not hurt with kernel 2.4.22? Moreover how ACPI BIOS influences synaptics driver? I do not see any BIOS call there...

Signature · 1 line
Lukáš Hejtmánek
#8 lore raw

Sorry, I didn't notice this thread till now...

Quoted 2 lines

But why it does not hurt with kernel 2.4.22? Moreover how ACPI BIOS influences synaptics driver? I do not see any BIOS call there...

I have this problem reported as bug 1093 at bugme.osdl.org, my laptop is an ACER with intel chipset.

The problem will happen even if you only check the batery status once a day, at that time, you can get the lost sync thing in 2.6, but not in 2.2, so the problem is not with the gnome applet, in fact I'm seing it under icewm and I have been able to reproduce it without any battery applet or anything like that, only running the "acpi -V" command each minute in a cron, that suffices for getting the errors.

I believe that this should be solved, in 2.6, as it certainly doesn't happen on 2.4, if you want more info look at bug #1093 at bugme.osdl.org or if you need more details just ask for them.

Hope this helps.

Regards...

Signature · 1 line
Manty/BestiaTester -> http://manty.net
#9 lore raw
Quoted 15 lines · Santiago Garcia Mantinan

Sorry, I didn't notice this thread till now...

Quoted 2 lines

But why it does not hurt with kernel 2.4.22? Moreover how ACPI BIOS influences synaptics driver? I do not see any BIOS call there...

I have this problem reported as bug 1093 at bugme.osdl.org, my laptop is an ACER with intel chipset.

The problem will happen even if you only check the batery status once a day, at that time, you can get the lost sync thing in 2.6, but not in 2.2, so the problem is not with the gnome applet, in fact I'm seing it under icewm and I have been able to reproduce it without any battery applet or anything like that, only running the "acpi -V" command each minute in a cron, that suffices for getting the errors.

Quoted 7 lines

I believe that this should be solved, in 2.6, as it certainly doesn't happen on 2.4, if you want more info look at bug #1093 at bugme.osdl.org or if you need more details just ask for them.

Hope this helps.

Regards...

The difference is that GPM (I assume you are using it to get Synaptics support) only logs "protocol violations" when in debug mode, and then it only checks 2 first bytes. The XFree driver does check the protocol but its messages usually don't show up in the syslog. In other words in-kernel Synaptics driver just makes the problem apparent it seems.

Quoted 1 line

From what I saw in one case where Synaptics was loosing sync it looked

like 2 first bytes of the 6 byte packet were lost (psmouse never got them). Would be interesting to compile i8042.c with debug and see the full flow of a problem system...

Dmitry

#10 lore raw
Quoted 3 lines · Dmitry Torokhov

The difference is that GPM (I assume you are using it to get Synaptics support) only logs "protocol violations" when in debug mode, and then it only checks 2 first bytes.

No, gpm checks the first byte and decide whether to read the following 5 bytes (or trough the byte away). The synaptics driver itself does the same tests as the kernelcode (and reports an error).

Peter

#11 lore raw
Quoted 10 lines · Peter Berg Larsen
Quoted 3 lines · Dmitry Torokhov

The difference is that GPM (I assume you are using it to get Synaptics support) only logs "protocol violations" when in debug mode, and then it only checks 2 first bytes.

No, gpm checks the first byte and decide whether to read the following 5 bytes (or trough the byte away). The synaptics driver itself does the same tests as the kernelcode (and reports an error).

Peter

You are right, Synaptics does check entire packet and reports it, unfortunately many (most) distributions kill almost all GPM messages because it's too noisy.

Anyway, I wonder if the patch below will help sync problem. If it does then we can kill the warning message later.

The patch should apply to -test11 although will complain about offset as I have some extra stuff in my tree.

Dmitry

===== drivers/input/mouse/psmouse-base.c 1.40 vs edited =====

drivers/input/mouse/psmouse-base.c +7 -0
@@ -125,6 +125,13 @@
 	if (psmouse->state == PSMOUSE_IGNORE)
 		goto out;
 
+	if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) {
+		printk(KERN_WARNING "psmouse: bad data from KBC -%s%s\n",
+		 	flags & SERIO_TIMEOUT ? " timeout" : "",
+			flags & SERIO_PARITY ? " bad parity" : "");
+		goto out;
+	}
+
 	if (psmouse->acking) {
 		switch (data) {
 			case PSMOUSE_RET_ACK:
#12 lore raw
Quoted 9 lines · Dmitry Torokhov

You are right, Synaptics does check entire packet and reports it, unfortunately many (most) distributions kill almost all GPM messages because it's too noisy.

Anyway, I wonder if the patch below will help sync problem. If it does then we can kill the warning message later.

The patch should apply to -test11 although will complain about offset as I have some extra stuff in my tree.

I did apply.

Dec 14 23:44:21 debian kernel: Synaptics driver lost sync at 4th byte
Dec 14 23:44:21 debian kernel: Synaptics driver lost sync at 1st byte
Dec 14 23:44:21 debian kernel: psmouse: bad data from KBC - timeout
Dec 14 23:44:21 debian kernel: Synaptics driver resynced.
Dec 14 23:46:22 debian kernel: Synaptics driver lost sync at 4th byte
Dec 14 23:46:22 debian kernel: Synaptics driver lost sync at 1st byte
Dec 14 23:46:22 debian kernel: psmouse: bad data from KBC - timeout
Dec 14 23:46:22 debian kernel: Synaptics driver resynced.

However I did notice that it does hurt while xmms is playing (via alsa on i810 card). If I turn off xmms then it is a lot better. It is hard to reproduce those messages without xmms. (mpg123 does it as well as xmms).

Signature · 1 line
Lukáš Hejtmánek
#13 lore raw
In reply to Dmitry Torokhov
Quoted 1 line

The difference is that GPM (I assume you are using it to get Synaptics

Well, as for me I don't have GPM around for anything, I have this setup in X both for 2.4 and 2.6:

        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
Quoted 4 lines

support) only logs "protocol violations" when in debug mode, and then it only checks 2 first bytes. The XFree driver does check the protocol but its messages usually don't show up in the syslog. In other words in-kernel Synaptics driver just makes the problem apparent it seems.

I had thought something like that some time ago, that I had the problem in both 2.4 and 2.6, but I only had it reported in 2.6. But testing them I realised that the behaviour of the mouse is totally different, in 2.6 it goes mad, while in 2.4 it works perfectly, completely smooth, so I dropped that idea.

The main difference for my setup of the 2.4 and 2.6 kernels relating mouse is that on 2.6 I have the Synaptics driver in the kernel and also that in 2.4 I don't have INPUT_* and in 2.6 I have INPUT_MOUSEDEV and INPUT_EVDEV.

I don't know the internals of the drivers here, but I can test whatever you want, do you think that trying to set this up in 2.6 without Synaptics support will help us know what is going on? any other test? If so I'll try them!

If you think about some other tests I can make... just tell me.

Regards...

Signature · 1 line
Manty/BestiaTester -> http://manty.net

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 4 lines · On Sun, Nov 30, 2003 at 06:01:44PM -0500, [email protected] wrote:

Are you using a recent version of the XFree86 touchpad driver?
Have you read the documentation that comes with it? The new kernel touchpad driver requires a new version of the XFree driver and some changes to your XF86Config-4.

I'm using 0.12.1 version of touchpad driver. I think it is recent enough :)

I did not read the documentation, however I'm using auto-dev protocol that is proposed in README.

Signature · 1 line
Lukáš Hejtmánek