Re: Disabling per-device autosuspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 04, 2023 at 04:49:00PM +0100, Petr Tesařík wrote:
> On Wed, 4 Jan 2023 15:13:41 +0100
> Petr Tesařík <petr@xxxxxxxxxxx> wrote:
> 
> > Hi folks,
> > 
> > I'm struggling with autosuspend on my Samsung phone in download mode,

Wait...  Autosuspend is carried out by the host, but you appear to be 
stating that the Samsung phone is acting as a USB device (i.e., it's 
being autosuspended, not that it is autosuspending something else).  
Is that right?

> > as it apparently breaks heimdall/libusb on my Tumbleweed system. Here's
> > what I'm seeing:
> > 
> > - My device is autosuspended, because it has been idle for long enough.
> > - cd /sys/bus/usb/devices/1-4/  # my device's port
> > - echo -1 > power/autosuspend
> > - The device is reset and gets a new device ID.
> >   The current directory is no longer valid (becomes empty).
> 
> On a second thought, this looks like the actual bug. I don't think
> we're supposed to see a disconnect+reconnect whenever a suspended USB
> device is resumed. Then again, I'm no expert on USB...

In general there should not be a disconnect during a resume.  But it can 
happen, depending on how the device behaves.  Perhaps your phone is 
disconnecting deliberately.

The dmesg log ought to contain some useful information, particularly if 
you enable USB kernel debugging before starting the experiment:

	echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control

Alan Stern



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux