LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kirill Elagin <kirelagin@gmail.com>
To: Oliver Neukum <oneukum@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: USB autosuspend causing trouble with bluetooth
Date: Sat, 24 Jan 2015 13:55:39 +0400	[thread overview]
Message-ID: <CABVT_geRjB12v8XnRvNbf_2h6-hQJwgxuFkqxBhwQv2nrZ-w9A@mail.gmail.com> (raw)
In-Reply-To: <1421790436.1112.14.camel@linux-0dmf.site>

On Wed, Jan 21, 2015 at 12:47 AM, Oliver Neukum <oneukum@suse.de> wrote:
> On Tue, 2015-01-20 at 23:25 +0400, Kirill Elagin wrote:
>
>> Hm, I'm pretty sure I never touched anything with `port` in its name,
>> all the ports are set to `auto` (that's what laptop-mode-tools does).
>
> Here we go.
>
>> Right now I think I see three possibly unrelated issues:
>>
>> Issue #1. BT trackpad not working properly when connected to the
>> builtin bluetooth adapter.
>> ----------
>>
>> The adapter is attached to a USB1.1 hub:
>>
>> ~~~~
>> # lsusb -t
>> ...
>> /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
>>     |__ Port 2: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
>>     |__ Port 2: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
>>     |__ Port 2: Dev 2, If 2, Class=Vendor Specific Class, Driver=, 12M
>>     |__ Port 2: Dev 2, If 3, Class=Application Specific Interface, Driver=, 12M
>> ...
>>
>> # cat usb3/power/control
>> auto
>>
>> # cat usb3/3-*/usb3-port*/power/control
>> auto
>> auto
>
> Try setting this to on.
>
>> # cat usb3/3-2/power/control
>> on
>
> Here "auto" should work. Please try.
> [..]
>> Issue #2. No hotplug with USB1.1:
>> ----------
>>
>> To see this I pick one physical port. When I plug a USB1.1 device it
>> appears on bus 4 port 2; a USB2.0 device appears on bus 1 port 4.
>>
>> ~~~~
>> # cat usb4/power/control
>> auto
>> # cat usb4/4-*/usb4-port*/power/control
>> auto
>> auto
>
> Please set this to "on"
>
>> # cat usb1/power/control
>> auto
>> # cat usb1/1-*/usb1-port*/power/control
>
> Please set this to "on"

I started with the defaults (`auto` everywhere) and did:

~~~~
for f in /sys/bus/usb/devices/usb*/*-*/*-port*/power/control; do echo
on > $f; done
~~~~

This had absolutely _no_ effect on hotplug. As before, when I insert
the keyboard receiver nothing happens until I echo `on` to
`usb6/power/control`.

>
> [..]
>>
>> Issue #3. No hot-plug-out for USB1.1.
>> --------
>
>> I think that the first two issues are fixed by keeping all the USB1.1
>> hubs and the builtin BT always `on`, but I just wanted to know whether
>> those are hardware or software bugs.
>
> I suspect this is caused by outdated laptop-mode-tools.

I have laptop-mode-tools-1.66 and actually I initially blamed the new
runtime-pm module. But it turns out, `laptop_mode` doesn't touch the
ports at all.

>
> Basically setting the port controls (as opposed to hub and device
> controls) to "auto" tells the kernel that it may disable hotplugging
> to save energy. Hotunplug for devices that need remote wakeup will
> still work. Likewise if you disable autosuspend of the attached devices.
>
>         Regards
>                 Oliver
>
>

  reply	other threads:[~2015-01-24  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 13:30 Kirill Elagin
2015-01-20 11:03 ` Oliver Neukum
2015-01-20 12:18   ` Kirill Elagin
2015-01-20 12:34     ` Kirill Elagin
2015-01-20 14:06     ` Oliver Neukum
2015-01-20 14:58       ` Kirill Elagin
2015-01-20 17:41         ` Oliver Neukum
2015-01-20 19:25           ` Kirill Elagin
2015-01-20 21:47             ` Oliver Neukum
2015-01-24  9:55               ` Kirill Elagin [this message]
2015-01-26 17:00                 ` Kirill Elagin
2015-01-27 18:00                   ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABVT_geRjB12v8XnRvNbf_2h6-hQJwgxuFkqxBhwQv2nrZ-w9A@mail.gmail.com \
    --to=kirelagin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    --subject='Re: USB autosuspend causing trouble with bluetooth' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).