# eGalax touchscreen not working



## wetcoast (Jan 7, 2011)

I'm trying to get an eGalax-based touchscreen working under FreeBSD 8.1 i386 and X11 7.5, and I keep getting the same warning message in /var/log/Xorg.0.log at the end of the touchscreen initialization:


```
(WW) fcntl(12, F_SETOWN): Inappropriate ioctl for device
```

I modified the source for egalax.c and rebuilt the port to add some debugging statements in the initialization routine, and I can see that this message occurs when the driver is told to turn on the device, within the call:


```
xf86AddEnabledDevice(pInfo);
```

The touchscreen is completely unresponsive, and it appears that X decides to not use the device after that warning because I can see that the driver's routine to read the input never gets called.

Questions:
1.  Anyone else successfully use the egalax(4) driver? (x11-drivers/xf86-input-egalax)

2.  How does one get the associated uep(4) usb driver installed?  I added the line *uep_load="YES"* to /boot/loader.conf, but after rebooting did not get any /dev/uep device nor uep boot messages. I noticed that uep.ko didn't exist, so I did the following:


```
# cd /usr/src/sys/modules/usb/uep/
# make
# make install clean
```

That resulted in uep.ko getting added to /boot/kernel/uep.ko, and then after the next reboot (or by using kldload) I then got /dev/uep0.  Is that the expected way to add this module?

3.  What does that fcntl() warning mean?  Sounds like the file descriptor in pInfo became corrupted hence the operation on the handle wasn't valid.  But I have no idea what's going on beyond the driver code.  

I have tried this with & without hald(8) & dbus enabled in rc.conf, with no other input devices plugged in, and with various combinations of ServerFlags (AutoAddDevices, AllowEmptyInput, UseSIGIO) in xorg.conf to see if there was conflict with another device.  The fcntl warning and lack of touchscreen response occurred for all combinations.  The only exception was when I had UseSIGIO set to "false", which resulted in no warning but promptly crashed X11 immediately after the touchscreen was initialized.


----------



## EugeneL (Dec 17, 2011)

*Updates*

Hey - do you have any update on this? I have exactly the same situation and no ideas on how to get it working...


----------



## tingo (Dec 17, 2011)

On topic: where does one find devices which have an eGalax touchscreen?
Google wasn't very helpful.


----------



## EugeneL (Dec 18, 2011)

There are quite a few touch screen monitors, net books, "all-in-one"'s and regular laptops using those. http://www.unytouch.ca/ is one of the examples.


----------



## Russian (Apr 22, 2012)

*The same problem*

Did you solve this problem? I have the same and don't know what *I* should do.


----------

