[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/47142: usbhidctl vs. SDL et al.
>Synopsis: usbhidctl vs. SDL et al.
>Arrival-Date: Tue Oct 30 17:05:00 +0000 2012
>Originator: Thomas Klausner
>Release: NetBSD 6.99.14
Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
System: NetBSD yt.nih.at 6.99.14 NetBSD 6.99.14 (YT) #27: Sat Oct 20 15:01:54
Programs using SDL and some others would hang during startup.
I've tracked it down to the reason that usbhidctl is started together with
my X session (.xinitrc). If that is still running, SDL hangs when trying
to access /dev/uhid0. Such a program can't even be killed with -9.
When I kill usbhidctl first, SDL-using programs start fine.
When I kill usbhidctl after starting an SDL-using programs (which hangs
trying to access /dev/uhid0), I get a kernel panic.
I don't see the panic, since I'm in X, but in the next boot's log I see
Oct 16 21:28:41 yt savecore: reboot after panic: 836 1835 1834 1833 1832 1831
1830 1829 1828 1827 1826 1825 1824 1823 1822 1821 1820 1819 1818 1817 1816 1815
-rw------- 1 root wheel 8292230744 Oct 16 21:35 netbsd.2.core.gz
-rw------- 1 root wheel 372043 Oct 16 21:35 netbsd.2.gz
exist, but netbsd.2.gz looks too small to be useful (separate issue).
This leaves me with some questions:
Why is /dev/uhid0 blocked when usbhidctl is active?
Why does SDL care, and not just try opening non-blocking?
Why can't I kill -9 such programs?
Why do I get a kernel panic (see above)?
cat > .usbhidconf << EOF
Consumer:Play/Pause 1 mpc toggle
Consumer:Scan_Next_Track 1 mpc next
Consumer:Scan_Previous_Track 1 mpc prev
Consumer:Volume_Up 1 mixerctl -w outputs.master2++
Consumer:Volume_Down 1 mixerctl -w outputs.master2--
Consumer:Mute 1 mixerctl -w outputs.master7.mute--
usbhidctl -f 0 -c $(pwd)/.usbhidconf
(other SDL-using programs should be fine too)
Main Index |
Thread Index |