<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4180</bug_id>
          
          <creation_ts>2013-04-03 14:45:59 +0000</creation_ts>
          <short_desc>usb devices unpower when inactive</short_desc>
          <delta_ts>2013-10-03 14:24:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-runtime</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stoicescu Cornel">corneliux.stoicescu</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>dvhart</cc>
    
    <cc>tom.zanussi</cc>
    
    <cc>yp.kernel.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>31453</commentid>
    <comment_count>0</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-04-03 14:45:59 +0000</bug_when>
    <thetext>poky 
master:bdca49274173153b1b0a72887de6321b4756b684
meta-intel:2e8760d272aa2c62b41cbf768445c99569604c5e

1) install and boot core-image-sato-sdk-sugarbay on hardware
2) notice that USB devices (mouse, keyboard) become inactive after a few (2-3) seconds of inactivity. User must click once or tap key in order to use the USB device.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31527</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-04-04 14:38:53 +0000</bug_when>
    <thetext>There is an auto off kernel parameter which may help here:

usbcore.autosuspend=-1

Can you try that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31584</commentid>
    <comment_count>2</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-04-05 00:02:48 +0000</bug_when>
    <thetext>Stoicescu Cornel,

I am not seeing this issue with latest branches. Can you try with the latest branches and see if you see the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32343</commentid>
    <comment_count>3</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-04-18 11:35:12 +0000</bug_when>
    <thetext>I am still seeing this issue in:
dylan:
meta-intel:

Here is some useful output: 

root@sugarbay:/# tail /sys/bus/usb/devices/usb2/power/autosuspend
0
root@sugarbay:/# tail /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms
0
root@sugarbay:/# tail /sys/bus/usb/devices/usb1/power/autosuspend_delay_ms
0
root@sugarbay:/# tail /sys/bus/usb/devices/usb1/power/autosuspend
0
root@sugarbay:/# tail /sys/module/usbcore/parameters/autosuspend
2

As per documentation: 
&quot;
Each USB device directory will contain a file named power/autosuspend.  This file holds the time (in seconds) the device must be idle before it will be autosuspended. 0 means the device will be autosuspended as soon as possible.  Negative values will prevent the device from being autosuspended at all, and writing a negative value will resume the device if it is already suspended.
&quot;

Doing this solves the problem: 
echo &quot;-1&quot; &gt; /sys/module/usbcore/parameters/autosuspend</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32344</commentid>
    <comment_count>4</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-04-18 11:36:26 +0000</bug_when>
    <thetext>I forgot to add the commits:

dylan:87eb70243749e0e2431f98770746fa42002f4441
meta-intel:76f70c337e5daa9593153dfdf5107aec08610a44</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32369</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-04-18 23:30:33 +0000</bug_when>
    <thetext>So it sounds like the autosuspend is working as advertised.

The question then is what changed the settings and is it the same on other BSPs including core BSPs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32374</commentid>
    <comment_count>6</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-04-19 07:31:14 +0000</bug_when>
    <thetext>I will get this information during the current full pass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32397</commentid>
    <comment_count>7</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-04-19 12:52:33 +0000</bug_when>
    <thetext>This issue is present on sato-sdk-FRI2, lsb-sdk-jasperforest, sato-sdk-sugarbay

Also I noticed /sys/module/usbcore/parameters/autosuspend is set to 2 in both Ubuntu and Fedora and the issue is not present there; therefore that might not be the source of the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32398</commentid>
    <comment_count>8</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-04-19 12:54:18 +0000</bug_when>
    <thetext>The real issue here might be that way autosuspend is done. I think it should not miss inputs on behalf of autosuspend, thus not making it a problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32403</commentid>
    <comment_count>9</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-04-19 14:27:52 +0000</bug_when>
    <thetext>All the images you mention have -sdk in common.  Is that a requirement, or just what you tested i.e. does it happen with just -sato?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32407</commentid>
    <comment_count>10</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-04-19 19:00:56 +0000</bug_when>
    <thetext>With core-image-sato on crownbay, I don&apos;t see this problem, and the settings there are the same as in comment 3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32408</commentid>
    <comment_count>11</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-04-19 19:28:59 +0000</bug_when>
    <thetext>The target milestone says 1.5, but this was mentioned in yesterday&apos;s staff meeting as something that should be fixed for 1.4?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32411</commentid>
    <comment_count>12</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-04-19 21:49:54 +0000</bug_when>
    <thetext>Has anyone tried the kernel parameter from comment 1? If that works, this can be easily documented for the release.

This appears to be a behavior preference as opposed to a bug, I don&apos;t see this as critical for 1.4. So unless RP or Saul would like to override that, I&apos;d like to see us test the kernel param and document for 1.4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32412</commentid>
    <comment_count>13</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-04-19 22:12:00 +0000</bug_when>
    <thetext>I&apos;m having USB problems with my sugarbay, so can&apos;t even reproduce the problem at this point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32413</commentid>
    <comment_count>14</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-04-19 22:13:33 +0000</bug_when>
    <thetext>I will test this on my sugarbay here with the kernel parameter: 

usbcore.autosuspend=-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32414</commentid>
    <comment_count>15</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-04-19 22:30:55 +0000</bug_when>
    <thetext>The USb device inactive issue does go away with the kernel parameter usbcore.autosuspend=-1 on sugarbay hardware</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35597</commentid>
    <comment_count>16</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-08-13 03:22:42 +0000</bug_when>
    <thetext>Fixed in linux-yocto-3.8 kernel repository:

commit 5995fa5838b843b5393e3a6cfdee8b508cb95ba8
Author: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
Date:   Fri Aug 9 00:57:33 2013 +0000

    meta: features/power/intel.cfg
    
    Disable USB autosuspend configuration. This is causing unusable
    keyboards &amp; mice issues for many Intel BSPs.
    Also by default this config is disabled in the kernel.
    
    Fixes bug:
    [YOCTO #4992]
    
    Signed-off-by: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
    Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37562</commentid>
    <comment_count>17</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-10-03 14:24:39 +0000</bug_when>
    <thetext>VERIFIED in:
poky master:a02280f99f05b1c21de2a78de9222a2f62a0dabc</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>