The promised instructions on rebuilding the kernel UVC kernel module. Here’s what I did on my Ubuntu 11.10 Aspire 1. If you substitute in your own kernel version number then you should be ok if you’re running other releases. I may experiment with something RedHat-ish later to find out how to do it there. Because I’m lazy, and because I’ve spent many years working as a sysadmin, I do this all whilst logged in as root. I’ve reconstructed the sequence of commands from my shell history, so it should be correct, but let me know if you have problems.
# apt-get install linux-source-3.0.0 kernel-package linux-headers-`uname -r` # cd /usr/src # tar jxvf linux-source-3.0.0.tar.bz2 # cd linux-source-3.0.0 # ln -s /boot/config-`uname -r` .config # ln -s /usr/src/linux-headers-`uname -r`/Module.symvers .
At this point you can patch the UVC driver, and assuming that went well, continue:
# make modules_prepare # make M=drivers/media/video/uvc
And you should now have a re-built driver. To load it manually you can just do:
# insmod drivers/media/video/uvc/uvcvideo.ko ctrltimeout=10000 timeout=10000
But to get it loaded into the kernel automagically a little more work is required:
# mkdir -p /lib/modules/`uname -r`/updates # cp drivers/media/video/uvc/uvcvideo.ko /lib/modules/`uname -r`/updates # depmod -a # echo "options uvcvideo ctrltimeout=10000 timeout=10000" > /etc/modprobe.d/uvcvideo.conf
The patched module should now be loaded when your camera is hooked up. To check that the settings have been changed you can see their current values using:
$ cat /sys/module/uvcvideo/parameters/ctrltimeout $ cat /sys/module/uvcvideo/parameters/timeout
Or if you want to reload the module manually:
# modprobe -r uvcvideo # modprobe -v uvcvideo