일시정지는 재생 중 카메라 연결이 끊길 때 삭제 이벤트를 보내지 않습니다.

일시정지는 재생 중 카메라 연결이 끊길 때 삭제 이벤트를 보내지 않습니다.

내 시스템에서는 카메라에서 재생하는 동안 USB 카메라를 분리하면 모든 삭제 이벤트가 발생하지 않습니다. 이로 인해 연결된 장치 이름(/dev/input/event*)이 다른 장치에서 재사용될 때 문제가 발생할 수 있습니다.

결국, 연주 중에 카메라를 분리하고 키보드를 연결하면 키보드가 작동하지 않게 됩니다. 이 문제를 방지하는 대부분의 솔루션에 만족합니다. hald가 /dev 항목을 정리하고 있기 때문에 삭제 이벤트를 발생시키지 않는 이유를 정말로 이해하지 못합니다.

시스템: CentOS 6, 최신 커널 및 hal 패키지:

kernel-2.6.32-696.16.1.el6.i686
hal-0.5.14-14.el6.i686

카메라는 e-con See3CAM_11CUG 또는 Philips SPC 900NC입니다. 둘 다 필립스보다 훨씬 최신 e-con을 갖춘 UVC USB 카메라입니다.

lshal -m e-con이 연결되어 있을 때 출력되고 사용하지 않을 때는 제거됩니다.

11:42:02.190: usb_device_2560_c112_22268801 added
11:42:02.192: usb_device_2560_c112_22268801_if2 added
11:42:02.292: usb_device_2560_c112_22268801_if0 added
11:42:02.296: usb_device_2560_c112_22268801_if1 added
11:42:02.324: usb_device_2560_c112_22268801_if0_video4linux added
11:42:02.331: usb_device_2560_c112_22268801_if0_logicaldev_input added

11:44:48.563: usb_device_2560_c112_22268801_if0_video4linux removed
11:44:48.567: usb_device_2560_c112_22268801_if0_logicaldev_input removed
11:44:48.575: usb_device_2560_c112_22268801_if1 removed
11:44:48.576: usb_device_2560_c112_22268801_if0 removed
11:44:48.577: usb_device_2560_c112_22268801_if2 removed
11:44:48.577: usb_device_2560_c112_22268801 removed

mplayer로 플레이시 e-con 연결이 끊어졌을 때의 lshal -m 출력( mplayer tv:// -tv driver=v4l2:noaudio:device=/dev/video0) 입니다.

11:47:34.230: usb_device_2560_c112_22268801 added
11:47:34.237: usb_device_2560_c112_22268801_if0 added
11:47:34.240: usb_device_2560_c112_22268801_if1 added
11:47:34.241: usb_device_2560_c112_22268801_if2 added
11:47:34.245: usb_device_2560_c112_22268801_if0_video4linux added
11:47:34.261: usb_device_2560_c112_22268801_if0_logicaldev_input added

11:48:00.417: usb_device_2560_c112_22268801_if1 removed
11:48:00.419: usb_device_2560_c112_22268801_if0_video4linux removed
11:48:00.419: usb_device_2560_c112_22268801_if0 removed
11:48:00.420: usb_device_2560_c112_22268801_if2 removed
11:48:00.420: usb_device_2560_c112_22268801 removed

if0_logicaldev_input삭제 이벤트를 받지 못한 것 입니다 . Xorg는 그것이 키보드라고 생각하고 제거되지 않았을 때 /dev/input/event?를 추가하기로 결정합니다. 이름이 유효하지 않으며 무시됩니다.

lsof는 hald-addon-input과 Xorg 모두 삭제되었음에도 불구하고 이전 /dev/input/event*가 여전히 열려 있음을 보여줍니다.

lsof | grep deleted
hald-addo 2484      root   12r      CHR      13,77      0t0      24238 /dev/input/event13 (deleted)
Xorg      2678      root   35u      CHR      13,77      0t0      23881 /dev/input/event13 (deleted)

/etc/sysconfig/haldaemon에 "--verbose=yes --use-syslog"를 추가했으며 다음은 게임을 플레이하는 동안 삭제할 때 /var/log/messages의 스니펫입니다.

Feb 12 08:47:58 Kohne-C22 kernel: usb 4-1: USB disconnect, device number 4
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [I] osspec.c:256: SEQNUM=2497, ACTION=remove, SUBSYSTEM=usb, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.1, DEVNAME=, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.1: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [I] hotplug.c:121: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.1 is a device (store)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [I] device.c:5083: remove_dev: subsys=usb sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [I] device.c:4864: Remove callouts completed udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [D] device_store.c:528: removing 0x8dd2380 from (linux.sysfs_path,/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.1)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.723 [I] hald.c:143: Removed device from GDL; udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] osspec.c:256: SEQNUM=2499, ACTION=remove, SUBSYSTEM=hidraw, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006/hidraw/hidraw0, DEVNAME=/dev/hidraw0, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006/hidraw/hidraw0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006/hidraw/hidraw0: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] device.c:5083: remove_dev: subsys=hidraw sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006/hidraw/hidraw0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [W] device.c:5087: Error removing device
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] osspec.c:256: SEQNUM=2498, ACTION=remove, SUBSYSTEM=usb, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/usb/hiddev1, DEVNAME=/dev/usb/hiddev1, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/usb/hiddev1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/usb/hiddev1: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] device.c:5083: remove_dev: subsys=usb sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/usb/hiddev1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [W] device.c:5087: Error removing device
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] osspec.c:256: SEQNUM=2500, ACTION=remove, SUBSYSTEM=hid, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006, DEVNAME=, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] device.c:5083: remove_dev: subsys=hid sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2/0003:2560:C112.0006
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [W] device.c:5087: Error removing device
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [I] osspec.c:256: SEQNUM=2495, ACTION=remove, SUBSYSTEM=video4linux, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/video4linux/video0, DEVNAME=/dev/video0, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/video4linux/video0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.724 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/video4linux/video0: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hotplug.c:121: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/video4linux/video0 is a device (store)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:5083: remove_dev: subsys=video4linux sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/video4linux/video0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:4864: Remove callouts completed udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if0_video4linux
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] device_store.c:528: removing 0x8db1820 from (linux.sysfs_path,/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0/video4linux/video0)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hald.c:143: Removed device from GDL; udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if0_video4linux
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] osspec.c:256: SEQNUM=2501, ACTION=remove, SUBSYSTEM=usb, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2, DEVNAME=, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hotplug.c:121: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2 is a device (store)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:5083: remove_dev: subsys=usb sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:4864: Remove callouts completed udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if2
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] device_store.c:528: removing 0x8dbf560 from (linux.sysfs_path,/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.2)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hald.c:143: Removed device from GDL; udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if2
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] osspec.c:256: SEQNUM=2496, ACTION=remove, SUBSYSTEM=usb, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0, DEVNAME=, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hotplug.c:121: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0 is a device (store)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:5083: remove_dev: subsys=usb sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:4864: Remove callouts completed udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] device_store.c:528: removing 0x8d7edd0 from (linux.sysfs_path,/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1/4-1:1.0)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hald.c:143: Removed device from GDL; udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] osspec.c:256: SEQNUM=2502, ACTION=remove, SUBSYSTEM=usb, DEVPATH=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1, DEVNAME=/dev/bus/usb/004/004, IFINDEX=0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:478: checking REMOVE event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1: skip ourselves and all later events
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] hotplug.c:121: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-1 is a device (store)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.725 [I] device.c:5083: remove_dev: subsys=usb sysfs_path=/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.726 [I] device.c:4864: Remove callouts completed udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.726 [D] device_store.c:528: removing 0x8d905b0 from (linux.sysfs_path,/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1)
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.726 [I] hald.c:143: Removed device from GDL; udi=/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.726 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:58 Kohne-C22 hald[2418]: 08:47:58.726 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:59 Kohne-C22 put: Listening on /dev/input/event12 /dev/input/event1 /dev/input/event3 /dev/input/event0 /dev/input/event4: [2476]: 08:47:59.665 [D] addon-input.c:319: Input device '/org/freedesktop/Hal/devices/usb_device_2560_c112_22268801_if0_logicaldev_input' destroyed, free data.
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [I] osspec.c:256: SEQNUM=2503, ACTION=remove, SUBSYSTEM=input, DEVPATH=/sys/4-1:1.0/input/input15/event4, DEVNAME=/dev/input/event4, IFINDEX=0
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [D] hotplug.c:478: checking REMOVE event /sys/4-1:1.0/input/input15/event4
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [D] hotplug.c:397: event /sys/4-1:1.0/input/input15/event4: skip ourselves and all later events
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [I] device.c:5083: remove_dev: subsys=input sysfs_path=/sys/4-1:1.0/input/input15/event4
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [W] device.c:5087: Error removing device
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.666 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [I] osspec.c:256: SEQNUM=2504, ACTION=remove, SUBSYSTEM=input, DEVPATH=/sys/4-1:1.0/input/input15, DEVNAME=, IFINDEX=0
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [D] hotplug.c:478: checking REMOVE event /sys/4-1:1.0/input/input15
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [D] hotplug.c:397: event /sys/4-1:1.0/input/input15: skip ourselves and all later events
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [I] device.c:5083: remove_dev: subsys=input sysfs_path=/sys/4-1:1.0/input/input15
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [W] device.c:5087: Error removing device
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [D] hotplug.c:500: events queued = 0, events in progress = 0
Feb 12 08:47:59 Kohne-C22 hald[2418]: 08:47:59.674 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress

관련 정보