#53437 gpm: Lock keyboard on laptop with psaux mouse

Package:
gpm
Source:
gpm
Description:
General Purpose Mouse interface
Submitter:
Pavel Epifanov
Date:
2005-07-18 03:29:40 UTC
Severity:
normal
#53437#5
Date:
1999-12-25 10:08:00 UTC
From:
To:
Starting from 2.2.x kernel the gpm cause bloking of the keyboard on my old
laptop (Digital HiNote Ultra like Toshiba) with trackball (as PS/2 mouse).
I have no problems with kernel 2.0.35 . I heard that the change of
keyboard/mouse driver happend around  kernel 2.0.37 .

The problem occurs after 10sec-5 min of using gpm to cut/past from screen.

If I kill gpm process (from telnet session) than Linux continue operate.
Otherwise I have to switch power off with loosing all data.

On this laptop I used to use only terminal mode with gpm.

This lacking of trackball use limit me a lot !
Now I am ready to test any beta versions to locate a problem and ,possibly,
fix it.

Command to start:
/usr/sbin/gpm -m /dev/psaux -t ps2

#53437#10
Date:
1999-12-30 19:26:19 UTC
From:
To:

#53437#15
Date:
2000-09-05 02:36:35 UTC
From:
To:
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>
#53437#20
Date:
2001-12-17 00:30:55 UTC
From:
To:
Do the latest gpm packages fix problem #53437?
#53437#25
Date:
2001-12-17 06:15:52 UTC
From:
To:
Hi, Thomas!

The mentioned model (i486 HiNote laptop) is not in use any more.

It is also with a Potato so Woody to be installed.
If you do have some extra time we could check it too.
Otherwise the bug #53437 could be closed because obsolete hardware
(I have a feeling that trackball on this laptop was not a standard one)

Another unreported problem was with my new one laptop (IBM NotePad) where
gpm did not work at all on a text console (Woody only, Potato was OK). But
the latest gpm 1.19.6-5 fixed this.

Rgds, Pavel.