Bug#739979: xorg: psmouse lost sync (worked up to Lenny)

2014-04-08 Thread Valerio Vanni
Package: xorg
Version: 1:7.7+3~deb7u1
Followup-For: Bug #739979

I add my findings.

The combination PS2 KVM switch - Vmware Workstation or Player fails also on
other new LInux distribution.
I've tested Fedora 20, Ubuntu 12.04LTS and Ubuntu 13.10.

In Debian, I can confirm that the first failing is Squeeze (Wheezy and Jessie
fail too).

For this I suspect that some change in Xorg could play a role.

I've reported a bug with VMware support, but they just gave up saying that they
didn't find anything wrong in their PS2 module.
And they think the problem could be in the operating system.

Obviously, they don't have my KVM switch to test (and neither you have it).

A thing that I can add is that a USB - PS2 converter solves the issue (and I'm
taking it as a workaround).
Not a passive one, that work only for bi-protocol mice.
An active one, that converts the protocol. It has a USB male and two PS2
females connectors, and the PC detectes the mouse as USB. Passing through the
same KVM switch.
Notice: the KVM switch it's only PS2, not combo.

The chain
PS2 mouse -> PS2 KVM switch -> PC fails

The chain
PS2 mouse -> PS2 KVM switch -> USB-PS2 converter -> PC works

So, whatever bad can do  the KVM switch, it can trigger the issue only entering
as PS2.



-- Package-specific info:
X server symlink status:

lrwxrwxrwx 1 root root 13 Sep 30  2008 /etc/X11/X -> /usr/bin/Xorg
-rwxr-xr-x 1 root root 2027892 Dec 17 21:40 /usr/bin/Xorg

VGA-compatible devices on PCI bus:
--
00:02.0 VGA compatible controller [0300]: Intel Corporation 82G33/G31 Express 
Integrated Graphics Controller [8086:29c2] (rev 02)

/etc/X11/xorg.conf does not exist.

Contents of /etc/X11/xorg.conf.d:
-
total 4
-rwxr-xr-x 1 root root 1002 Apr  8 03:24 10-resolution.conf

KMS configuration files:

/etc/modprobe.d/i915-kms.conf:
  options i915 modeset=1
/etc/modprobe.d/radeon-kms.conf:
  options radeon modeset=1

Kernel version (/proc/version):
---
Linux version 3.13.6 (root@newton) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #1 
SMP Wed Mar 12 15:13:44 CET 2014

Xorg X server log files on system:
--
-rw-r--r-- 1 root root 31231 Feb 21  2009 /var/log/Xorg.1.log
-rw-r--r-- 1 root root 22208 Apr  9 00:57 /var/log/Xorg.0.log

Contents of most recent Xorg X server log file (/var/log/Xorg.0.log):
-
[53.888] 
X.Org X Server 1.12.4
Release Date: 2012-08-27
[53.888] X Protocol Version 11, Revision 0
[53.888] Build Operating System: Linux 3.2.0-4-amd64 i686 Debian
[53.888] Current Operating System: Linux newton 3.13.6 #1 SMP Wed Mar 12 
15:13:44 CET 2014 i686
[53.888] Kernel command line: BOOT_IMAGE=Linux-3.13.6 ro root=801 
console=ttyS0 console=tty0
[53.888] Build Date: 17 December 2013  08:37:13PM
[53.888] xorg-server 2:1.12.4-6+deb7u2 (Julien Cristau 
) 
[53.888] Current version of pixman: 0.26.0
[53.888]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[53.888] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[53.888] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Apr  9 00:44:52 
2014
[53.955] (==) Using config directory: "/etc/X11/xorg.conf.d"
[53.955] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[54.290] (==) No Layout section.  Using the first Screen section.
[54.290] (**) |-->Screen "Screen0" (0)
[54.290] (**) |   |-->Monitor "Monitor0"
[54.455] (==) Automatically adding devices
[54.455] (==) Automatically enabling devices
[54.455] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[54.455]Entry deleted from font path.
[54.455] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,
built-ins
[54.455] (==) ModulePath set to "/usr/lib/xorg/modules"
[54.455] (II) The server relies on udev to provide the list of input 
devices.
If no devices become available, reconfigure udev or disable 
AutoAddDevices.
[54.455] (II) Loader magic: 0xb776e5a0
[54.455] (II) Module ABI versions:
[54.455]X.Org ANSI C Emulation: 0.4
[54.455]X.Org Video Driver: 12.1
[54.455]X.Org XInput driver : 16.0
[54.455]X.Org Server Extension : 6.0
[54.455] (--) PCI:*(0:0:2:0) 8086:29c2:1458:d000 rev 2, Mem @ 
0xf320/524288, 0xe000/268435456, 0xf300/1048576, I/O @ 0xe200/8
[54.456] (II) 

Bug#739979: xorg: psmouse lost sync (worked up to Lenny)

2014-02-24 Thread Valerio Vanni
Package: xorg
Version: 1:7.7+3~deb7u1
Severity: important

   * What led up to the situation?
A role in this issue is played by the presence of a KVM switch. If I bypass the
switch and connect the mouse directly to the PC, the issue doesn't happen.
Note: the issue does not happen when I switch PCs. I can leave the KVM pointed
on a PC (without switching to others) and it happens the same.
Another role is played by VMWare Player. The problem happens very rarely if I
don't open VMWare player.
When I use it, the problem happens very frequently. Some times even more time
in a minute, making all unusable. In particular, it seems to happen during the
phase of grabbing / ungrabbing of the pointer by Player window. It's less
frequent (but it happens) if Player windows is set to full screen. The worst
(issue almost sure) is when the Player window is resized.

The issue: the mouse starts suddenly to jump everywhere, the pc speakers make a
repeated beep and then the pointer remains stuck.

At this point, in dmesg I find
24/2/2014 13:53:08  newton  kernel  [  260.365208] psmouse serio1: Wheel
Mouse at isa0060/serio1/input0 lost synchronization, throwing 2 bytes away.

And it's left in that state forever: the only way for me to unlock it is to
CTRL+ALT+Fx an then "rmmod psmouse" "modprobe psmouse".
At this point I find in dmesg
24/2/2014 13:58:22  newton  kernel  [  574.212905] input: ImExPS/2 Logitech
Wheel Mouse as /devices/platform/i8042/serio1/input/input7
and when I come back to graphical environment the mouse is working again.

But then I go inside VMWare Player window and... often it crashes.
I think it's a hardware-related bug, but not that it's a hardware fault,
because:
-All Windows machine are working correctly
-Debian system up to Lenny (in particular I've had Woody - Sarge - Etch) work
correctly.

The problem showed up after the upgrade from Lenny to Squeeze.
I've tried updating from Squeeze to Wheezy, and the issue remained.
I've tried a fresh Wheezy install, and the issue is still present.
I've tried updating Wheezy to Jessie: always the same.

So I think there is some difference from Lenny to Squeeze that triggers the
issue.
Now I'm on the clean install of Wheezy. Standard kernel 3.2.0-4-686-pae, no
backport, no old package.
I report the bug from here because I think it can be useful to have a more
standard environment.

   * What exactly did you do (or not do) that was effective (or
 ineffective)?
-I've tried changing "proto" parameter in psmouse (through a created
/etc/modprobe.d/mouse.conf) but without success. Even proto=bare does not help.
-I've tried many kernels, even vanilla: no difference
-I've tried this patch to psmouse-base.c: http://lkml.org/lkml/2005/11/9/47.
This seems to help but only in the reaction to the problem. With this patch I
wait some second and the mouse is working again. The advantage is that I don't
have to go to text console and rmmod+modprobe psmouse), but the problem is
triggered with the same frequency.



-- Package-specific info:
X server symlink status:

lrwxrwxrwx 1 root root 13 Feb 21 23:31 /etc/X11/X -> /usr/bin/Xorg
-rwxr-xr-x 1 root root 2027892 Dec 17 21:40 /usr/bin/Xorg

VGA-compatible devices on PCI bus:
--
00:02.0 VGA compatible controller [0300]: Intel Corporation 82G33/G31 Express 
Integrated Graphics Controller [8086:29c2] (rev 02)

Xorg X server configuration file status:

-rw-r--r-- 1 root root 1002 Feb 21 23:44 /etc/X11/xorg.conf

Contents of /etc/X11/xorg.conf:
---
Section "Monitor"
Identifier   "Monitor0"
HorizSync   30-90
VertRefresh 50-160
VendorName   "Philips"
ModelName"109B"
Modeline "800x600_56.20"   36.00  800 824 896 1024  600 601 603 625 
+hsync +vsync
Modeline "1024x768_60.00"   65.00  1024 1048 1184 1344  768 771 777 806 
-hsync -vsync
Modeline "1280x1024_75.00"  138.75  1280 1312 1448 1728  1024 1027 1034 
1072 -hsync +vsync
#   Modeline "1280x1024_85.00"  159.50  1280 1376 1512 1744  1024 1027 1034 
1078 -hsync +vsync
Option "PreferredMode" "1280x1024_75.00"
EndSection  

Section "Screen"
   Identifier  "Screen0"
   Device  "Card'"
   Monitor "Monitor0"
   DefaultDepth24
   SubSection "Display"
   Depth   16
   Modes   "1280x1024" "1024x768" "800x600" "640x480"
   EndSubSection
   SubSection "Display"
   Depth   24
   Modes   "1280x1024" "1024x768" "800x600" "640x480"
   EndSubSection
EndSection

/etc/X11/xorg.conf.d does not exist.

KMS configuration files:

/etc/modprobe.d/radeon-kms.conf:
  options radeon modeset=1

Kernel version (/proc/version):
---
Linux version 3.2.0-4-686-pae (debian-ker...@lists.debian.org) (gcc ver