LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   udev ignoring ignore (http://www.linuxquestions.org/questions/linux-hardware-18/udev-ignoring-ignore-765631/)

clcbluemont 10-30-2009 01:38 PM

udev ignoring ignore
 
This is all being down on a 64bit REHL 5.4 system.
We have a touch screen that gets misaligned when power or the usb cable is removed and then re-added. Using udevmonitor I tried to to create a rule to ignore the remove:
KERNEL=="usbdev*", SYSFS{manufacturer}=="Elo TouchSystems, Inc.", OPTIONS+="ignore_remove"
KERNEL=="mouse*", SYSFS{manufacturer}=="Elo TouchSystems, Inc.", OPTIONS+="ignore_remove"
KERNEL=="event*", SYSFS{manufacturer}=="Elo TouchSystems, Inc.", OPTIONS+="ignore_remove"
KERNEL=="js*", SYSFS{manufacturer}=="Elo TouchSystems, Inc.", OPTIONS+="ignore_remove"
DRIVER=="usb", SYSFS{manufacturer}=="Elo TouchSystems, Inc.", OPTIONS+="ignore_remove"

The device still gets removed.

I have tried this from another angle however rmmod will not remove the module even with the force flag. Evidently X has a tight grip on it:
lsof |grep elo
X 3007 root 20r CHR 253,0 145633 /dev/input/elo

Any ideas on how to better ignore removal?
If I ever successfully ignore removal will I still be able to talk to the device once power or the cable is re-introduced?
Is there a way to loosen X's grip on the elousb module?


lsusb
Bus 001 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 007 Device 001: ID 0000:0000
Bus 008 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 002 Device 004: ID 0424:2504 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 015: ID 04e7:0020 Elo TouchSystems Touchscreen Interface (2700)
Bus 003 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 006 Device 002: ID 046d:c045 Logitech, Inc. Optical Mouse
Bus 006 Device 003: ID 03f9:0100 KeyTronic Corp. Keyboard


udevmonitor
udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]

UEVENT[1256912525.456076] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/usbdev3.14_ep81
UEVENT[1256912525.456152] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0
UEVENT[1256912525.456164] remove@/class/usb_device/usbdev3.14
UEVENT[1256912525.456172] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/usbdev3.14_ep00
UEVENT[1256912525.456230] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2
UDEV [1256912525.457818] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/usbdev3.14_ep81
UDEV [1256912525.459356] remove@/class/usb_device/usbdev3.14
UDEV [1256912525.459872] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/usbdev3.14_ep00
UDEV [1256912525.474604] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0
UDEV [1256912525.482441] remove@/devices/pci0000:00/0000:00:1a.0/usb3/3-2
UEVENT[1256912534.100058] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2
UEVENT[1256912534.100195] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/usbdev3.15_ep00
UDEV [1256912534.101617] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2
UDEV [1256912534.108054] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/usbdev3.15_ep00
UEVENT[1256912534.109099] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0
UDEV [1256912534.128007] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0
UEVENT[1256912544.146471] add@/class/input/input17
UEVENT[1256912544.146683] add@/class/input/input17/mouse0
UEVENT[1256912544.146697] add@/class/input/input17/event0
UEVENT[1256912544.146704] add@/class/input/input17/js0
UEVENT[1256912544.158386] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/usbdev3.15_ep81
UEVENT[1256912544.158447] add@/class/usb_device/usbdev3.15
UDEV [1256912544.161187] add@/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/usbdev3.15_ep81
UDEV [1256912544.170851] add@/class/input/input17
UDEV [1256912544.182766] add@/class/usb_device/usbdev3.15
UDEV [1256912544.185449] add@/class/input/input17/mouse0
UDEV [1256912544.196402] add@/class/input/input17/js0
UDEV [1256912544.216476] add@/class/input/input17/event0

business_kid 10-31-2009 02:09 PM

Do I take it that you can power it up initially and get it aligned correctly?

To quote the Kerryman when asked for directions "If I was you I wouldn't start from here at all!" When it goes, you will hardly manage to ignore that. So you have to live with it. If it does, let it power down and flush/kill processes writing to it. Then reconnect.

clcbluemont 11-02-2009 08:03 AM

Udev ignoring ignore
 
Do I take it that you can power it up initially and get it aligned correctly?

Yes, it comes up initially fine and I can get it to come back but I have to restart the X session. What happens is X won't let go of the elousb driver. Even when I do a "rmmod --force elousb". When X is shutdown I am able to rmmod the elousb driver and then execute the elo startup script and X and it works great again.

Also it takes no effort to align. The drivers I got from Tyco seem to align with out any effort.

http://www.elotouch.com/SUPPORT/Downloads/dnld.asp

clcbluemont 11-16-2009 12:14 PM

udev ignoring ignore ->Solved, but not as i would have ideally preferred.
 
I solved the problem by recompiling the RedHat kernel with the USBHID driver as a module. Thus I was able to load the proprietary elousb driver/module first. It now picks up the touchscreen instead of USBHID.

I tried using the evtouch driver and HAL. But there must be something I am missing. I could see the touchscreen being reintroduced and HAL doing what it was suppose to, however I am guessing XINPUT was not picking it up for some reason, because when the touchscreen was reintroduced the screen remained as though the usb cable was removed.

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.product" contains="Elo TouchSystems, Inc. Elo TouchSystems 2700 IntelliTouch(r) USB Touchmonitor Interface">
<match key="info.capabilities" contains="input">
<merge key="input.x11_driver" type="string">evtouch</merge>
<merge key="input.x11_options.minx" type="string">0</merge>
<merge key="input.x11_options.miny" type="string">0</merge>
<merge key="input.x11_options.maxx" type="string">3945</merge>
<merge key="input.x11_options.maxy" type="string">3894</merge>
<merge key="input.x11_options.swapx" type="string">1</merge>
<merge key="input.x11_options.swapy" type="string">1</merge>
</match>
</match>
</device>
</deviceinfo>


All times are GMT -5. The time now is 08:19 AM.