Bug 233102

Summary: gpm is sporadically autodetecting the mouse
Product: Red Hat Enterprise Linux 4 Reporter: Rainer Koenig <Rainer.Koenig>
Component: gpmAssignee: Tomas Janousek <tjanouse>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-14 11:15:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rainer Koenig 2007-03-20 14:42:37 UTC
Description of problem:
When I check /var/log/messages on a machine I find several entries that look
like this:
Mar 19 10:18:11 eztiv840 gpm: gpm startup succeeded
Mar 19 10:23:27 eztiv840 gpm[6712]: *** info [mice.c(1766)]:
Mar 19 10:23:27 eztiv840 gpm[6712]: imps2: Auto-detected intellimouse PS/2
Mar 20 10:24:02 eztiv840 gpm[6712]: *** info [mice.c(1766)]:
Mar 20 10:24:02 eztiv840 gpm[6712]: imps2: Auto-detected intellimouse PS/2
Mar 20 12:41:17 eztiv840 gpm[6712]: *** info [mice.c(1766)]:
Mar 20 12:41:17 eztiv840 gpm[6712]: imps2: Auto-detected intellimouse PS/2
Mar 20 12:41:18 eztiv840 gpm: gpm shutdown succeeded

I'm very curious to know why gpm is firing the "Auto-detect" message several
times and not only once when gpm is started. 

Version-Release number of selected component (if applicable):


How reproducible:
Run RHEL4 U4.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Many messages that gpm auto-detects a mouse.

Expected results:
Just one detection cycle when starting gpm. 

Additional info:

There is no change in the hardware meanwhile, that means nobody is unplugging
the mouse and plugging it again. So I don't see any reason for those sporadic
messages.

Comment 1 Tomas Janousek 2007-03-20 18:11:12 UTC
May this be caused by VT switching -- from X to console and vice versa?

Comment 2 Rainer Koenig 2007-03-20 18:19:57 UTC
Well, there is a process involved that kills gdm every 12 seconds, but if this
is related I should see much much more log file entries than just a few sporadic
ones. 

Comment 3 Tomas Janousek 2007-03-20 18:44:01 UTC
Every 12 seconds? Why is that?

Comment 4 Rainer Koenig 2007-03-20 19:56:53 UTC
Yes, I know, it sounds strange. But that is the "test procedure" of our customer
and unfortunately the machine locks up after some time (which can be a few hours
up to 9 days). So we're desperately following every trace of things that look
unusual. 

We wonder if some sort of event can trigger gpm to autodetect the mouse. Maybe
its related to BIOS problems, but we're not yet sure.

Comment 5 Tomas Janousek 2007-03-20 20:09:22 UTC
Ok, I'll look into that.

Comment 6 Tomas Janousek 2007-04-06 12:24:44 UTC
I've built a gpm packages that log a backtrace every time the message is logged:
http://people.redhat.com/tjanouse/gpm/233102/
I hope it will help you to find the reason for that message.

I think it will just confirm my hypothesis about VT switching though.
I doubt you'll see anything other than these two types of traces:

1) gpm(I_imps2+0x169) [0x409b49] | gpm(init_mice+0xa1) [0x405521] |
gpm(old_main+0x71) [0x403081] | gpm(main+0x10) [0x404450]
This is the mouse init on gpm start.

2) gpm(I_imps2+0x169) [0x409b49] | gpm(old_main+0x1185) [0x404195] |
gpm(main+0x10) [0x404450]
And this is the reinit caused by VT switching.

(the numbers are for x86_64 and should really be the same for you -- if they're
not, that would mean the casue is different)

The cause of the messages not appearing every 12 seconds may be that the machine
does not spend enough time in text console between the X server restarts. There
is a loop in gpm that checks for the text console every 2 seconds. You can also
attach strace to gpm to check whether this is the case.

Comment 7 Tomas Janousek 2007-06-01 13:59:56 UTC
Any news on this? Did this help you?

Comment 8 Tomas Janousek 2007-08-14 11:10:23 UTC
Ping.

Comment 9 Rainer Koenig 2007-08-14 11:15:33 UTC
Pong. 

Sorry for the delay. Yes, the answer was good and helpful. I guess we can close
this "bug" now. 

Thanks
Rainer