14
6
I've just reinstalled Debian on my Sony VAIO laptop, and my dmesg
and virtual consoles all get spammed with the same messages over and over again.
[ 59.662381] hub 1-1:1.0: unable to enumerate USB device on port 2
[ 59.901732] usb 1-1.2: new high-speed USB device number 91 using ehci_hcd
[ 59.917940] hub 1-1:1.0: unable to enumerate USB device on port 2
[ 60.157256] usb 1-1.2: new high-speed USB device number 92 using ehci_hcd
I believe these messages are coming from an internally connected USB device, most likely the webcam (since that's the only thing that doesn't work). The only way I can seem to have it shut up (without killing my actually useful USB ports) is to disable one of the USB host controllers:
# echo "0000:00:1a.0" > /sys/bus/pci/drivers/ehci_hcd/unbind
This also takes down my Bluetooth interface, but I'm fine with that.
I would like this setting to persist, so that I can painlessly use my virtual console again in case I need it. I want my operating system (Debian amd64) to never wake it up, but I don't know how to do this. I've tried to blacklist the module alias for the PCI device, but it seems to be ignored:
$ cat /sys/bus/pci/devices/0000\:00\:1a.0/modalias
pci:v00008086d00003B3Csv0000104Dsd00009071bc0Csc03i20
$ cat /etc/modprobe.d/blacklist
blacklist pci:v00008086d00003B3Csv0000104Dsd00009071bc0Csc03i20
How do I ensure that this specific PCI device is never automatically activated, without disabling its driver altogether?
-edit- The module was renamed recently, now the following works from userland:
echo "0000:00:1a.0" > /sys/bus/pci/drivers/ehci-pci/unbind
Still, I'm looking for a way to stop the kernel from binding that device in the first place.
1Would an acceptable approach be to disable this particular USB device through the USB bus rather than the PCI bus? – slm – 2013-02-20T14:06:12.103
Also are you sure you can blacklist using a pci:... string like that? I've only ever seen kernel modules blacklistable in the /etc/modprobe.d/blacklist file. Couldn't you use lspci -k to identify which module the device wants and then black list that instead? – slm – 2013-02-20T14:13:51.150
After adding the entry to the blacklist, did you
update-initramfs -u -k all
? – Stefan Seidel – 2013-02-21T10:14:29.200@StefanSeidel: Good point. I have now, but it doesn't seem to help. Perhaps slm is right in thinking that blacklisting a modalias like this needs a different syntax or method. – Rhymoid – 2013-02-21T14:55:19.023
@slm: I'm not sure if I can block modaliases through the modprobe blacklist (my system seems to ignore the line I gave it), but I can't just remove the module (
ehci_hcd
), since that would disable all USB hosts on my system. I just want to disable this specific device, based on its vendor, dev, subvendor, and subdev. – Rhymoid – 2013-02-21T14:58:58.567I wasn't able to figure out a way to accomplish what you want, have you had any further luck? – slm – 2013-02-25T04:03:55.817
Not yet. I had the idea to hack around in
/lib/modules/\
uname -r`/modules.alias`, but I'm not sure if that'll work at all. – Rhymoid – 2013-02-25T11:25:34.833If that PCI device is an EHCI controller, disabling it will probably knock out at least some, and possibly all, of your computer's external USB ports as well. USB uses a tree topology, where a single controller can support many devices; it's unlikely that your motherboard has a separate EHCI controller just for the webcam.
– Wyzard – 2013-03-05T00:23:44.207@Wyzard: there are two PCI devices on my laptop that have EHCI controller functions. The controller for my external ports is a different PCI device than the controller for hardwired devices. Maybe unlikely, but still true. – Rhymoid – 2013-03-05T12:28:49.560
I have a similar problem with the PCI devices for the HDMI output on my ATI video cards. Best solution so far is to disable them in rc.local but it would be nice to be able to tell the kernel to ignore them completely. – Raman – 2013-07-30T15:03:19.943