Bug 148094

Summary: touchpad movement hangs keyboard sometimes
Product: [openSUSE] SUSE Linux 10.1 Reporter: k. t. <cooling.crystals>
Component: KernelAssignee: Vojtech Pavlik <vojtech>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: suse-beta
Version: Beta 3   
Target Milestone: ---   
Hardware: i686   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: requested info
output of dmidecode
Patch to set rate to 40 based on DMI data for Mitac laptops
Patch to set rate to 40 based on DMI data for Mitac laptops
dmesg

Description k. t. 2006-02-03 19:43:19 UTC
My keyboard and touchpad stopped responding suddenly first time in beta3 (I have experienced hangs in 10.0 and was hoping that 10.1 won't have this problem ; more info here http://www.linuxquestions.org/questions/t403738.html ).

So I was browsing with firefox 20 minutes ago (from now) and it happened - cursor stoppped moving and keyboard did not respond neither. Interesting was that I had kpowersave running in sys.tray and suddenly it changed it's icon a little - it added battery indicator to the right side and indicator was completely empty (my battery was fully charged ; notebook was running on AC power). There was nothing else to do than disconnect ac adapter and battery...

Notebook is Mitac 8050QDA
Comment 1 Christian Boltz 2006-02-03 19:54:29 UTC
Is there something interesting in /var/log/messages or another logfile?
Comment 2 k. t. 2006-02-03 20:15:45 UTC
Created attachment 66413 [details]
requested info
Comment 3 k. t. 2006-02-03 20:17:23 UTC
(In reply to comment #2)
> Created an attachment (id=66413) [edit]
> requested info
> 

I found something interesting.
I just can't imagine how can touchpad hang keyboard, itself and make kpowersave think that my battery is empty...
Comment 4 Chris L Mason 2006-02-03 21:14:03 UTC
Vojtech, please take a look
Comment 5 Vojtech Pavlik 2006-02-04 07:14:45 UTC
The i8042 embedded controller (EC) in your notebook, which controlls the battery, 
powersaving, backlight, keyboard and touchpad has crashed.

How often does it happen? I assume it never did happen with previous versions
of SUSE Linux. Does it happen if you don't run (kill) kpowersave, thus easing
the load on the EC?

If it weren't a new problem, I'd suggest an EC BIOS upgrade. I know it's available
for IBM notebooks, maybe Mitac provides it, too.
Comment 6 k. t. 2006-02-04 08:09:47 UTC
I have done BIOS update (EC 1.02 ; SYSTEM 1.02 ; both are latest).
I have had crashes before with suse 10.0: http://www.linuxquestions.org/questions/t403738.html
I have had crashes with latest and older bios (then I installed 10.1 beta3 bios was already updated).
I think very important is that I had hang once then I installed 10.0 (can we say that this is not linux problem if crash happens during installation ?).
What is strange that all crashes I had so far happened during the touchpad movement.
'not having kpowersave running' - crashes have occured even then
Comment 7 Vojtech Pavlik 2006-02-04 22:42:04 UTC
I'd suggest lessening the load on the EC in a different way: Set the touchpad
to a lower update frequency, by setting the rate to only 40pps. This workaround
is already necessary for certain Toshiba notebooks, and it's quite possible
they are similar to the Mitac (who sells designs to many other manufacturers).

You can do this by the kernel command line parameter psmouse.rate=40, or by using
sysfs. If you use the kernel parameter, please verify that it worked using sysfs.
Comment 8 k. t. 2006-02-05 12:03:11 UTC
(In reply to comment #7)
> I'd suggest lessening the load on the EC in a different way: Set the touchpad
> to a lower update frequency, by setting the rate to only 40pps. This workaround
> is already necessary for certain Toshiba notebooks, and it's quite possible
> they are similar to the Mitac (who sells designs to many other manufacturers).
> 
> You can do this by the kernel command line parameter psmouse.rate=40, or by
> using
> sysfs. If you use the kernel parameter, please verify that it worked using
> sysfs.
> 
I'm using kernel parameter in boot options. How do you verify it with sysfs ?
Comment 9 Vojtech Pavlik 2006-02-05 18:28:09 UTC
Running

        cat /sys/bus/serio/devices/serio0/rate

should show "40" if everything works as expected. The default is 100.

Comment 10 k. t. 2006-02-05 21:12:30 UTC
kbeta@kohvi:~> cat /sys/bus/serio/devices/serio0/rate
cat: /sys/bus/serio/devices/serio0/rate: No such file or directory
kbeta@kohvi:~> ls /sys/bus/serio/devices/
serio0  serio1  serio2  serio3  serio4
kbeta@kohvi:~> cat /sys/bus/serio/devices/serio1/rate
cat: /sys/bus/serio/devices/serio1/rate: No such file or directory
kbeta@kohvi:~> cat /sys/bus/serio/devices/serio2/rate
40
kbeta@kohvi:~> cat /sys/bus/serio/devices/serio3/rate
cat: /sys/bus/serio/devices/serio3/rate: No such file or directory
kbeta@kohvi:~> cat /sys/bus/serio/devices/serio4/rate
cat: /sys/bus/serio/devices/serio4/rate: No such file or directory

So far have been no crashes in both : suse10.0 and suse10.1beta3
Comment 11 Vojtech Pavlik 2006-02-06 07:14:56 UTC
Ok. With a multiplexing controller, the touchpad will indeed be on serio2, and not serio0. The option worked correctly.

Now if you don't experience any more crashes using the touchpad, which is quite
likely, please attach the output of 'dmidecode' on your system, so that I can add
a DMI blacklist entry, setting the rate of 40 automatically, without the need
of a kernel command line option.
Comment 12 k. t. 2006-02-06 08:03:18 UTC
Created attachment 66493 [details]
output of dmidecode
Comment 13 Vojtech Pavlik 2006-02-07 13:17:12 UTC
So is everything okay with the rate of 40?
Comment 14 k. t. 2006-02-07 19:26:43 UTC
Yes. So far no crashes.
Comment 15 Vojtech Pavlik 2006-02-08 10:13:13 UTC
Created attachment 66935 [details]
Patch to set rate to 40 based on DMI data for Mitac laptops

Can you please try the attached patch? It should identify your system based on your DMI data and set the rate of 40 automatically.
Comment 16 k. t. 2006-02-08 15:48:00 UTC
How to apply patch ?
I tried to run it in konsole as root:
kohvi:/home/kbeta # /home/kbeta/attachment.cgi
diff: unrecognized option `--git'
diff: Try `diff --help' for more information.
/home/kbeta/attachment.cgi: line 2: ---: command not found
/home/kbeta/attachment.cgi: line 3: +++: command not found
/home/kbeta/attachment.cgi: line 4: @@: command not found
/home/kbeta/attachment.cgi: line 5: syntax error near unexpected token `DMI_PRODUCT_NAME'
/home/kbeta/attachment.cgi: line 5: `                   DMI_MATCH(DMI_PRODUCT_NAME , "dynabook"),'

BTW default value of cat /sys/bus/serio/devices/serio2/rate is 80
Comment 17 Vojtech Pavlik 2006-02-08 16:06:25 UTC
Created attachment 67029 [details]
Patch to set rate to 40 based on DMI data for Mitac laptops

cd kernel_sources
patch -p1 < attachment.cgi

(this is an updated version of the patch)
Comment 18 k. t. 2006-02-08 21:43:20 UTC
kohvi:/home/kbeta # cd /usr/src/linux-2.6.16-rc1-git3-7/kernel
kohvi:/usr/src/linux-2.6.16-rc1-git3-7/kernel # patch -pl < /home/kbeta/attachment.cgi
patch: **** strip count l is not a number

I'm doing something wrong did I cd into right directory ?

bash: cd: kernel_sources: No such file or directory
Comment 19 Christian Boltz 2006-02-08 22:53:32 UTC
It seems you are not familar with compiling a kernel ;-)

Let me try to provide a step-by-step guide (I hope it's complete):
- install the "kernel-source" package if not already done
- cd /usr/src/linux/  (should be a symlink to the kernel source)
- patch -p1 < ... - note that it's the number 1 after -p, not the letter l
- make cloneconfig
- make

I'm not sure if "make install" would be a good idea because it could overwrite your running kernel. Try just copying the module (Vojtech, could you please help with the module name and path? ;-)
Comment 20 Vojtech Pavlik 2006-02-09 09:22:31 UTC
I'm sorry, but psmouse/synaptics, the patched bits, are built-in on SuSE kernels, not modular. So it's necessary to replace the kernel image (a good idea is to save  the original one first and make a grub entry for it).
Comment 21 k. t. 2006-02-09 09:42:14 UTC
I have done all including "make".
I could risk "make install"...since I use 10.0 mostly not beta3.
After "make install" just reboot ?
In my opinion patching kernel is unnecessary because using boot option "psmouse.rate=40" works great (does patch only apply to touchpad or will it affect   any USB mouse connected in the future?).
Comment 22 Vojtech Pavlik 2006-02-09 09:47:03 UTC
Yes, 'make install' and then reboot should work. Patching the kernel is indeed
not absolutely necessary, but it'll save other people having a Mitac laptop like
you to go through the effort finding out why it crashes.

And the patch will only affect the Synaptics pad, where the option also affects PS/2 mice. USB mice aren't affected by either.
Comment 23 k. t. 2006-02-09 10:07:05 UTC
Done.
kbeta@kohvi:~> cat /sys/bus/serio/devices/serio2/rate
40
Comment 24 Vojtech Pavlik 2006-02-09 10:46:02 UTC
Great. Can you please also supply the 'dmesg' output, so that I can check
that even the messages are correct? I'll then send the patch upstream, so
that 10.1 will have it and close the bug.
Comment 25 k. t. 2006-02-09 11:07:59 UTC
Created attachment 67179 [details]
dmesg

boot option "irqpoll" is used for https://bugzilla.novell.com/show_bug.cgi?id=116397
Comment 26 Vojtech Pavlik 2006-02-09 15:31:06 UTC
Ok, I'm closing this bug as resolved. Patch has been sent upstream.