# X.org hangs by using touchpad during mode change



## ksym (Sep 30, 2013)

Has anybody else had a problem like this with a Synaptics touchpad?

I stumbled upon this problem after compiling and installing X.org from ports.

When you switch from text mode console to graphics mode X.org screen, there is a delay before the graphics context is restored (the screen is mostly blank or partially drawn). During this delay X freezes when I swipe my finger over the touchpad.

While X is frozen I was able to `ssh` into my box. X was furiously writing into Xorg.0.log two alternating messages which make it look like X was trying to change the input protocol on the touchpad. Within few minutes X spammed the log size > 5M!

I thought about submitting this as a Port PR, but I am hesitant to bother port-maintainers if this problem persists only with EEE PC 1000H laptop and/or X.org compiled with Clang. First would like more info from other people who might have had problems like this.

Below are more details, including the actual X.org logs.

Hardware:
Asus EEE PC 1000H
http://www.asus.com/Notebooks_Ultrabooks/Eee_PC_1000H/

make.conf:

```
WITH_PKGNG=yes
CC=clang
CXX=clang++
CPP=clang-cpp
CFLAGS= -O3 -pipe
```

The Xorg.0.log, with the weird messages, can be found here:
http://koti.kapsi.fi/~isoa/files/weird-X-problem/Xorg.0.log.txt


----------



## wblock@ (Sep 30, 2013)

Not likely to be causing this problem, but setting CFLAGS in make.conf is almost always a mistake.


----------



## ksym (Sep 30, 2013)

Okay, I shall try rebuilding all X.org ports with the system default GCC without CFLAGS set. I will report back if the problem persists, might take a day because my computer's CPU is so slow.


----------



## ksym (Oct 1, 2013)

Now I have re-compiled and re-installed all X.org spe*c*ific packages with system default GCC, no CFLAGS set in make.conf. X.org was compiled to use sysutils/hal for input device detection. Regardless of these actions the problem persists.

The problem is easily reproduced:

 switch to X.Org tty
 switch to text mode tty
 switch back to X.Org tty
 before the framebuffer has been restored, continuously wipe touchpad
X.org goes berserk and starts spamming messages to /var/log/Xorg.#.log, over 3 Megabytes per second (where # is a number). The messages being spammed are 
	
	



```
(II) Mouse autoprobe: Changing protocol to ImPS/2
```
 and 
	
	



```
(II) Mouse autoprobe: Changing protocol to ExplorerPS/2
```

Problem might be hardware spe*c*ific, I cannot be sure yet as I do not have another laptop with a Synaptics touchpad. Would it be alright to submit a Port PR now?


----------



## tingo (Oct 1, 2013)

You should file a PR for it, even if it only affects your machine.


----------

