Hi List + Maintainers! On my system I use an usb-attached headset together with an usb mouse. They both work great in almost all cases, many thanks.
This email is about how things are handled when the usb audio device is unplugged. Applications that use the audio device seem to block future usb hotplug events which is kind of annoying, especially if you try to plug your mouse back in and it doesn't work. Kernel is vanilla 2.6.17.7 running on a regular HT P4 desktop. The configuration is SMP and PREEMPT among other pretty standard options. I use suspend to disk if that matters. Could someone who knows usb hotplug please clarify if the behaviour below is expected? 1. Make sure both the usb audio device (headset) and the usb mouse are plugged in. 2. Double check that you use snd_usb_audio, that's what I'm using anyway. 3. Start some kind of application that is using the usb audio device. XMMS or Firefox+Flash. 4. Play some music in XMMS, or load a page that is using Flash. 5. Check the state of all input devices: cat /proc/bus/input/devices | grep ^N: N: Name="AT Translated Set 2 keyboard" N: Name="HID 413c:3010" N: Name="Plantronics Plantronics Headset" (yes, the headset is also a hid device) 6. Unplug the usb audio device. XMMS will from now on eat 100% CPU. 7. Again, check the state of all input devices: cat /proc/bus/input/devices | grep ^N: N: Name="AT Translated Set 2 keyboard" N: Name="HID 413c:3010" N: Name="Plantronics Plantronics Headset" (hrm, that's the device that just was unplugged) 8. Unplug the mouse. Experience X without a mouse. 9. Check the state of all input devices: cat /proc/bus/input/devices | grep ^N: N: Name="AT Translated Set 2 keyboard" N: Name="HID 413c:3010" (that's the device we just unplugged) N: Name="Plantronics Plantronics Headset" (still here) 10. Plug in the mouse. Wait a while. Notice how you still cannot control the mouse in X. 11. Check the state of all input devices: cat /proc/bus/input/devices | grep ^N: N: Name="AT Translated Set 2 keyboard" N: Name="HID 413c:3010" (same old, nothing new) N: Name="Plantronics Plantronics Headset" (same old, nothing new) 12. Try to unload the hid module: rmmod usbhid (see how this will block) 13. Kill the application that is using the audio device. 14. See how all things unlock nicely: The mouse is back in X, rmmod is unlocked. 15. Check the state of all input devices: cat /proc/bus/input/devices | grep ^N: N: Name="AT Translated Set 2 keyboard" N: Name="HID 413c:3010" I expected that the applications that use the usb audio wouldn't block future hotplug events. Comments? Thanks, / magnus ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel