[SOLVED] How to disable unused device without blacklisting a module
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This seems to be the case here. There are no rules matching my webcam but udev can still query the necessary information from sysfs.
$ cd /sys/class/video4linux/
$ ls -l
$ (...) video0 -> ../../devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/video4linux/video0
$ cat video0/uevent
So, I am guessing that /dev/video0 is created based on DEVNAME from sysfs.
So, there's either a rule in one of the rules.d directories, or there's a listing in the driver's data file for the major and minor device node numbers, or the UVC driver is doing it directly. If it's the two former scenarios, you need to edit those files.
I am not sure if I fully understand - what do you mean by the driver's data file?
I grepped the uvc source files from the kernel (3.5.3) for 5986 (vendorId), but found no result. The other webcam's vendorId (046d - Logitech) is explicitly listed in uvc_driver.c:
uvc_driver.c: case 0x046d: /* Logitech */
I do not know much about how the kernel determines which driver to load for which device. I was under the impression that the modules must explicitly list the supported devices.
5986 is already in hex - lsusb lists all vendorIds in hex.
I grepped the whole kernel tree and did not find any 5986 / 1762, except in some random places. Nothing related to my device though. (5986 _is_ actually mentioned in uvc_ctrl.c but in a non-related context). Maybe some drivers provide range of vendorIds rather then list of individual devices.
Eventually I used a simple and dirty hack in uvc_probe function in uvc_driver.c (22918 is DEC for 5986):
The problem with this solution though is that the uvc source needs to be hacked every time I build a new kernel, and being a Gentoo user I am used to be doing it at least once every two weeks ;-) I still have not found any better solution.