event devices not released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I think I've found a bug :-/

Symptoms: when I remove (unplug) a USB keyboard or mouse, the corresponding event device seems to be closed but not released; when I plug the device back in, it gets a new input device handle. This means that after several suspend/resume cycles (in which it seems all usb devices are virtually unplugged and replugged) the kernel is out of event devices and complains likewise. My nice little program that catches specific keystrokes also stops to get any interesting events from that moment on. After reboot everything works again as expected.

I've seen a similar bug report on linux-kernel but it wasn't followed up on. Also this only mentioned problems through suspend cycles while I also have the problem simply plugging in and out.

Environment: linux kernel 2.6.24 vanilla on i386. The event files are held open by one or more processes when the devices are unplugged. Unfortunatly my program is not the only one that has them open, but hald and Xorg also have some of the devices open, so I cannot prevent this situation. Upon POLLERR | POLLHUP my app closes all event devices and rescans the /dev/input directory, this should be enough imho? I don't know how the other apps handle unplugging.

Please CC:

Thanks.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux