[vox-tech] ps2 mouse not working

Jeff Newmiller vox-tech@lists.lugod.org
Tue, 24 Jun 2003 11:45:01 -0700 (PDT)


On Tue, 24 Jun 2003, Mike Simons wrote:

> On Tue, Jun 24, 2003 at 10:33:48AM -0700, Jeff Newmiller wrote:
> > On Tue, 24 Jun 2003, Mike Simons wrote:
> > > Please send output from:
> > > ===
> > > ls -l /proc/`pidof gpm`/fd
> > 
> > total 0
> > lrwx------    1 root     root           64 Jun 24 09:31 0 -> /dev/gpmdata
> > lrwx------    1 root     root           64 Jun 24 09:31 1 -> socket:[6670]
> 
> Hrmmm... what I see here is:
> lrwx------    1 root     root           64 Jun 24 08:44 0 -> /dev/input/mouse0
> lrwx------    1 root     root           64 Jun 24 08:44 1 -> socket:[643]
> lrwx------    1 root     root           64 Jun 24 08:44 3 -> /dev/gpmdata
> 
> or...
> moria:/var/log# ls -l /proc/`pidof gpm`/fd
> total 0
> lrwx------    1 root     root           64 Jun 24 13:58 0 -> /dev/psaux
> lrwx------    1 root     root           64 Jun 24 13:58 1 -> socket:[598]
> lrwx------    1 root     root           64 Jun 24 13:58 2 -> socket:[605]
> lrwx------    1 root     root           64 Jun 24 13:58 3 -> /dev/gpmdata

Indeed... it turns out /etc/init.d/gpm start was always failing, and the
output above came about when I just typed "gpm" with no arguments... too
long since I messed with gpm.

> > > - if you restart gpm and wiggle do you see any movement?
> > 
> > Actually, gpm was not running until I manually started it.  The rc2.d
> > symbolic link is still there, and the script still works, so either some
> > timeout occurs or the environment is different at boot time (S20).
> > 
> > When I started it, gpm highlighted a random couple of lines. However,
> > moving or clicking the mouse has no effect.
> 
>   Hrmm... can you stop gpm and manually start it with -D and -v 9 
> something like this should work:
> 
> gpm -t imps2 -m /dev/psaux -D -v 9 
> 
>   If nothing obvious comes out of the error stream there... can you also
> do a:
> strace -o trace.log -s 1024 <GPM command from above>
> 
>   I'm curious what happens around when it opens /dev/psaux...

How about "/etc/init.d/gpm strace"?

/root/gpm.out:
-----
write_ps2: 1 0, fe
write_ps2: 1 0, fe
write_ps2: 1 0, fe
imps2: PS/2 mouse failed (3 button) init
gpm: oops() invoked from gpm.c(1019)
mouse initialization failed: Inappropriate ioctl for device
-----

/root/gpm.strace:
------
execve("/usr/sbin/gpm", ["/usr/sbin/gpm", "-V", "-D", "-e", "-m", "/dev/psaux", "-t", "imps2", "-Rraw"], [/* 13 vars */]) = 0
uname({sys="Linux", node="mirimichi", ...}) = 0 <0.000005>
brk(0)                                  = 0x805af80 <0.000003>
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory) <0.000007>
open("/etc/ld.so.cache", O_RDONLY)      = 3 <0.000005>
fstat64(3, {st_mode=S_IFREG|0644, st_size=43207, ...}) = 0 <0.000003>
old_mmap(NULL, 43207, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40012000 <0.000004>
close(3)                                = 0 <0.000003>
open("/lib/libncurses.so.5", O_RDONLY)  = 3 <0.000007>
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\4\342\0"..., 1024) = 1024 <0.000005>
fstat64(3, {st_mode=S_IFREG|0644, st_size=239312, ...}) = 0 <0.000002>
old_mmap(NULL, 244076, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001d000 <0.000004>
mprotect(0x40050000, 35180, PROT_NONE)  = 0 <0.000005>
old_mmap(0x40050000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x32000) = 0x40050000 <0.000006>
close(3)                                = 0 <0.000002>
open("/lib/libc.so.6", O_RDONLY)        = 3 <0.000007>
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\275Z\1"..., 1024) = 1024 <0.000004>
fstat64(3, {st_mode=S_IFREG|0755, st_size=1104040, ...}) = 0 <0.000002>
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40059000 <0.000004>
old_mmap(NULL, 1113796, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4005a000 <0.000003>
mprotect(0x40162000, 32452, PROT_NONE)  = 0 <0.000003>
old_mmap(0x40162000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x107000) = 0x40162000 <0.000005>
old_mmap(0x40168000, 7876, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40168000 <0.000004>
close(3)                                = 0 <0.000003>
munmap(0x40012000, 43207)               = 0 <0.000009>
stat64("/dev/vc/0", 0xbffffb30)         = -1 ENOENT (No such file or directory) <0.000010>
stat64("/dev/tty0", {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 0), ...}) = 0 <0.000006>
brk(0)                                  = 0x805af80 <0.000003>
brk(0x805bf80)                          = 0x805bf80 <0.000005>
brk(0)                                  = 0x805bf80 <0.000003>
brk(0x805c000)                          = 0x805c000 <0.000002>
open("/var/run/gpm.pid", O_RDONLY)      = -1 ENOENT (No such file or directory) <0.000011>
open("/dev/tty0", O_WRONLY)             = 3 <0.000016>
ioctl(3, TIOCLINUX, 0x8057840)          = 0 <0.000007>
close(3)                                = 0 <0.000007>
mknod("/dev/gpmdata", S_IFIFO|0666)     = -1 EEXIST (File exists) <0.000006>
open("/dev/gpmdata", O_RDWR|O_NONBLOCK) = 3 <0.000007>
geteuid32()                             = 0 <0.000002>
open("/dev/psaux", O_RDWR|O_NONBLOCK)   = 4 <0.007007>
fcntl64(4, F_GETFL)                     = 0x802 (flags O_RDWR|O_NONBLOCK) <0.000003>
fcntl64(4, F_SETFL, O_RDWR)             = 0 <0.000003>
ioctl(4, TCFLSH, 0x2)                   = -1 ENOTTY (Inappropriate ioctl for device) <0.000003>
alarm(5)                                = 0 <0.000004>
write(4, "\366", 1)                     = 1 <0.000010>
alarm(0)                                = 5 <0.000002>
nanosleep({0, 50000000}, NULL)          = 0 <0.057766>
alarm(5)                                = 0 <0.000005>
read(4, "\372", 1)                      = 1 <0.000006>
alarm(0)                                = 5 <0.000003>
nanosleep({0, 50000000}, NULL)          = 0 <0.059841>
alarm(5)                                = 0 <0.000005>
write(4, "\363\310", 2)                 = 2 <0.002014>
alarm(0)                                = 5 <0.000003>
nanosleep({0, 50000000}, NULL)          = 0 <0.057816>
alarm(5)                                = 0 <0.000005>
read(4, "\376", 2)                      = 1 <0.000006>
alarm(0)                                = 5 <0.000002>
nanosleep({0, 50000000}, NULL)          = 0 <0.059855>
write(2, "write_ps2: 1 0, fe", 18)      = 18 <0.000036>
write(2, "\n", 1)                       = 1 <0.000006>
alarm(5)                                = 0 <0.000004>
write(4, "\363d", 2)                    = 2 <0.002011>
alarm(0)                                = 5 <0.000003>
nanosleep({0, 50000000}, NULL)          = 0 <0.057665>
alarm(5)                                = 0 <0.000004>
read(4, "\376", 2)                      = 1 <0.000006>
alarm(0)                                = 5 <0.000003>
nanosleep({0, 50000000}, NULL)          = 0 <0.059834>
write(2, "write_ps2: 1 0, fe", 18)      = 18 <0.000011>
write(2, "\n", 1)                       = 1 <0.000006>
alarm(5)                                = 0 <0.000004>
write(4, "\363P", 2)                    = 2 <0.002010>
alarm(0)                                = 5 <0.000003>
nanosleep({0, 50000000}, NULL)          = 0 <0.057851>
alarm(5)                                = 0 <0.000005>
read(4, "\376", 2)                      = 1 <0.000006>
alarm(0)                                = 5 <0.000002>
nanosleep({0, 50000000}, NULL)          = 0 <0.059764>
write(2, "write_ps2: 1 0, fe", 18)      = 18 <0.000012>
write(2, "\n", 1)                       = 1 <0.000006>
write(2, "imps2: PS/2 mouse failed (3 butt"..., 40) = 40 <0.000006>
write(2, "\n", 1)                       = 1 <0.000006>
write(2, "gpm: oops() invoked from gpm.c(1"..., 37) = 37 <0.000006>
write(2, "mouse initialization failed", 27) = 27 <0.000006>
write(2, ": Inappropriate ioctl for device"..., 33) = 33 <0.000006>
unlink("/dev/gpmctl")                   = -1 ENOENT (No such file or directory) <0.000016>
exit_group(1)                           = ?
------

> > $ grep MOUSE .config
> > CONFIG_INPUT_MOUSEDEV=m
> > CONFIG_MOUSE=m
> > CONFIG_PSMOUSE=y
> 
> - Can you send output from 'lsmod'?

-----
Module                  Size  Used by    Not tainted
af_packet              12136   1  (autoclean)
snd-seq-midi            3424   0  (autoclean) (unused)
snd-opl3-synth          8804   0  (autoclean) (unused)
snd-seq-instr           4272   0  (autoclean) [snd-opl3-synth]
snd-seq-midi-emul       4368   0  (autoclean) [snd-opl3-synth]
snd-ainstr-fm           1556   0  (autoclean) [snd-opl3-synth]
snd-seq-oss            24288   0  (unused)
snd-seq-midi-event      2968   0  [snd-seq-midi snd-seq-oss]
snd-seq                38064   2  [snd-seq-midi snd-opl3-synth snd-seq-instr snd-seq-midi-emul snd-seq-oss snd-seq-midi-event]
snd-pcm-oss            37924   0  (unused)
snd-mixer-oss          11544   0  [snd-pcm-oss]
snd-cmipci             18176   0 
snd-pcm                56000   0  [snd-pcm-oss snd-cmipci]
snd-page-alloc          4144   0  [snd-pcm]
snd-opl3-lib            5604   0  [snd-opl3-synth snd-cmipci]
snd-hwdep               4512   0  [snd-opl3-lib]
snd-timer              14280   0  [snd-seq snd-pcm snd-opl3-lib]
snd-mpu401-uart         3024   0  [snd-cmipci]
snd-rawmidi            12416   0  [snd-seq-midi snd-mpu401-uart]
snd-seq-device          3940   0  [snd-seq-midi snd-opl3-synth snd-seq-oss snd-seq snd-opl3-lib snd-rawmidi]
snd                    28676   0  [snd-seq-midi snd-opl3-synth snd-seq-instr snd-seq-oss snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-cmipci snd-pcm snd-opl3-lib snd-hwdep snd-timer snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore               3684   9  [snd]
i2c-isa                 1164   0  (unused)
it87                    7144   0  (unused)
i2c-proc                6256   0  [it87]
i2c-core               12868   0  [i2c-isa it87 i2c-proc]
8139too                16008   1 
mii                     2496   0  [8139too]
crc32                   2848   0  [8139too]
rtc                     5980   0  (autoclean)
unix                   14472  16  (autoclean)
-----

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------