Hi,
I have a Toshiba Portage SS3380V laptop (with PS/2 AccuPoint pointing
device built in), and gpm (1.17.8-18) locks its keyboard, too.
(But, unlike the original poster, locking occurs immediately at
the start-up, not after a certain amount of time has elapsed.)
Since X server alone (without gpm) works just fine, I straced
both X server and gpm and compared the outputs.
It turns out that XFree86 (3.3.6-10) contains an initialization code
for PS/2 mice which gpm lacks; i.e., the function `xf86SetupMouse()'
in `xc/programs/Xserver/hw/xfree86/common/xf86_Mouse.c'
(around lines 620-668).
Actually, plugging the similar initialization code into gpm
resolved the problem.
I'm attaching the additional patch file for gpm_1.17.8-18 below.
Just copy the patch as gpm-1.17.8/debian/patches/007_ps2init-000,
and it should recompile fine.
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
--- gpm-1.17.8.orig/mice.c Sat May 8 14:51:06 1999
+++ gpm-1.17.8/mice.c Thu Aug 10 16:02:19 2000
@@ -1121,6 +1121,16 @@
return type;
}
+/* ps2 version */
+static Gpm_Type *I_ps2(int fd, unsigned short flags, struct Gpm_Type *type)
+{
+ static unsigned char s[] = { 246, 230, 244, 243, 100, 232, 3, };
+ write (fd, s, sizeof (s));
+ usleep (30000);
+ tcflush (fd, TCIFLUSH);
+ return type;
+}
+
/* intellimouse, ps2 version: Ben Pfaff and Colin Plumb */
static Gpm_Type *I_imps2(int fd, unsigned short flags, struct Gpm_Type *type)
{
@@ -1345,7 +1355,7 @@
"BusMouse", M_bm, NULL, STD_FLG, /* bm is sun */
{0xf8, 0x80, 0x00, 0x00}, 3, 3, 0, 0, 0},
{"ps2", "For most busmice connected to a PS/2 port (round with 6 metal\n"
" pins).",
- "PS/2", M_ps2, NULL, STD_FLG,
+ "PS/2", M_ps2, I_ps2, STD_FLG,
{0xc0, 0x00, 0x00, 0x00}, 3, 1, 0, 0, 0},
{"ncr", "For pointing pens found on some laptops.",
/* Ncr3125pen, found on some laptops */
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
Notes:
- The similar keyboard locking reports can be found at, e.g.,
http://www.tce.co.jp/ML/tlinux-users/200/231.html
http://support.toshiba-tro.de/forum/linux/ShowMessage.Asp?ID=69
http://support.toshiba-tro.de/forum/linux/ShowMessage.Asp?ID=95
so the problem seems rather widespread over a number of Toshiba laptops,
not just my Portage SS3380V.
- I think the patch should be harmless to other machines
because the similar code already exists in XFree86.
- My laptop runs
o Debian GNU/Linux 2.2 potato for i386 with
o kernel version 2.2.17pre6
(custom kernel built from kernel-source-2.2.17 2.2.17pre6-1)
And the problem does not show up when you run 2.0.38 kernel just
as the original bug reporter has pointed out.
Hope this helps,
Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>