[clug] bluetooth drops out

Kevin Pulo kev at pulo.com.au
Mon Jul 23 22:13:40 MDT 2012

On Mon, Jul 23, 2012 at 10:41:31PM +1000, Eyal Lebedinsky wrote:

> Looking again I see another sequence very often leading to this device
> going down:
> Jul 23 17:29:20 e7 kernel: [1933460.704052] hub 5-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
> Jul 23 17:29:20 e7 kernel: [1933460.704057] usb 5-1: USB disconnect, device number 125
> Jul 23 17:29:20 e7 bluetoothd[1102]: HCI dev 0 down
> Jul 23 17:29:20 e7 bluetoothd[1102]: bluetoothd[1102]: HCI dev 0 down
> .... etc.
> Possibly the 're-enabling...' does not always succeed.
> Other times the disconnect is the first message in this event.
> >A cold usb bus re-scan maybe?

I would say that based on these messages, this is worth a shot.

I believe the simplest way to simulate unplugging and then replugging
*all* USB devices is to unload and then reload your *hci_hcd kernel
modules (ie. the drivers for the usb ports themselves).

Use lsmod to see which ones you have loaded, then the next time this
happens try rmmod'ing them, then modprobe'ing the ones that were
loaded (in the correct order, which I think is xhci_hcd, then
ehci_hcd, then uhci_hcd, but I can't remember for sure and there
should be dmesg entries if you get the order wrong).

If this works then you could consider writing a cronjob that checks
for the BT USB device (eg. does "hciconfig hci0 > /dev/null 2>&1"
return 0 or 1?), and if it's not there, does this little dance to try
to revive it.

I use a similar trick to "unplug" all USB devices before a software
suspend (to ram or disk), and then "replug" them when the system comes
back again, because I've had trouble with some errant USB devices (eg.
the bluetooth dongle that's hardwired inside the laptop) causing
crashes/deadlocks during suspends or resumes.


Kevin Pulo
kev at pulo.com.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/linux/attachments/20120724/62d1105b/attachment.pgp>

More information about the linux mailing list