<?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>5166</bug_id>
          
          <creation_ts>2013-09-11 19:09:09 +0000</creation_ts>
          <short_desc>nuc: mouse is getting disabled after few seconds of inactivity</short_desc>
          <delta_ts>2013-09-18 15:11:27 +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-meta-intel</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5 M5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nitin Kamble">nitin.a.kamble</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>tom.zanussi</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>36555</commentid>
    <comment_count>0</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-11 19:09:09 +0000</bug_when>
    <thetext>keyboard use enables the mouse again, but it is a usability issue, which need to be addressed.
  a fix for similar issue went in v3.8 kernel. I believe that fix also got incorporated in the v3.10 kernel. I will double check it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36556</commentid>
    <comment_count>1</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-11 19:45:58 +0000</bug_when>
    <thetext>in the v3.10 kernel the usb autosuspend is on by default. It can be disabled by disabling CONFIG_PM_RUNTIME, but it is too big of a hammer for this task, it will disable dynamic suspend for all (non usb as well) devices.

So the other ways to fix this issue

1. Pass this kernel parameter to each of the BSPs
  usb.autosuspend=-1

2. change the kernel code to disable USB autosuspend for all the BSPs
   drivers/usb/core/usb.c: usb_autosuspend_delay = -1;

I think the 2nd way is better, but it still will ask for srcrev updates for all the BSP kernels.

Nitin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36557</commentid>
    <comment_count>2</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-11 19:58:05 +0000</bug_when>
    <thetext>yet another option is add this line to meta/recipes-kernel/linux/linux-yocto_3.10.bb from oecore.

APPEND_append = &quot; usb.autosuspend=-1&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36572</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-09-12 00:48:58 +0000</bug_when>
    <thetext>I prefer the kernel APPEND parameter over code changes. THe question is whether or not this is default policy. Given the number of failures we see with this, I suspect it should be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36579</commentid>
    <comment_count>4</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 05:15:05 +0000</bug_when>
    <thetext>Thanks Darren for the input.

Now what location the APPEND var be placed?

1. it can go in meta/recipes-kernel/linux/linux-yocto_3.10.bb recipe itself, which will fix the issue for all the BSPs using YP 3.10 kernel. 

2. or it can go in conf/machine/include/ia32-base.inc, which will fix all the Intel BSPs.

3. or add it to individual BSP v3.10 kernel bbappends.


IMO in this case the option 1 makes most sense, but we will be affecting non-intel BSPs here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36617</commentid>
    <comment_count>5</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-09-12 18:18:02 +0000</bug_when>
    <thetext>I agree, linux-yocto_3.10.bb is the best place given the number of times this failure has presented itself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36621</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-12 19:06:56 +0000</bug_when>
    <thetext>Just repeating what my input was on irc yesterday:

(03:06:52 PM) tomz: nakamble: i don&apos;t think we want to force it on everyone
(03:07:13 PM) nakamble: in fact this is a issue for any BSP (non intel also) with the v3.10 kernel
(03:09:51 PM) nakamble: tomz: so what do you suggest?
(03:10:18 PM) tomz: nakamble: well, if a company has a system that doesn&apos;t have broken hardware in their product (i&apos;d guess most of the time they wouldn&apos;t be using broken hardware), they shouldn&apos;t be forced to remove something to get things to the default intended by the kernel, right?

I can also see wanting to do it globally for everyone, but then why not send a patch to LKML to do that if it&apos;s really the right thing to do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36622</commentid>
    <comment_count>7</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 19:16:59 +0000</bug_when>
    <thetext>currently there is no mechanism, which will make the APPEND effective from linux-yocto_3.10.bb. The APPEND var is used by syslinux.bbclass &amp; grub-efi.bbclass which is inherited by boot-directdisk.bbclass and it can be influenced only from global config files such as machine.conf.

To influence all the BSPs there is no way other than adding the APPEND line to image.bbclass or global config file such as bitbake.conf . Which does not feel like right place to do this thing.

With this situation, now we can either do it just for Intel BSPs, or change the kernel sources and update the kernel srcrevs for all the BSPs, or add one of the above global oecore locations.

I also experimented disabling the USB autosuspend via udev rules, which technically should work, but I could not successfully do it yet.

If there any more thought to help here, please share.

Thanks,
Nitin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36623</commentid>
    <comment_count>8</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 19:24:48 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; Just repeating what my input was on irc yesterday:
&gt; 
&gt; (03:06:52 PM) tomz: nakamble: i don&apos;t think we want to force it on everyone
&gt; (03:07:13 PM) nakamble: in fact this is a issue for any BSP (non intel also)
&gt; with the v3.10 kernel
&gt; (03:09:51 PM) nakamble: tomz: so what do you suggest?
&gt; (03:10:18 PM) tomz: nakamble: well, if a company has a system that doesn&apos;t
&gt; have broken hardware in their product (i&apos;d guess most of the time they
&gt; wouldn&apos;t be using broken hardware), they shouldn&apos;t be forced to remove
&gt; something to get things to the default intended by the kernel, right?
&gt; 
&gt; I can also see wanting to do it globally for everyone, but then why not send
&gt; a patch to LKML to do that if it&apos;s really the right thing to do?

Makes sense. then we will be backporting a patch to v3.10 tree. I discussed this issue with Sarah yesterday, She says even though USB autosuspend delay is set in the kernel, the power/control should be set to &quot;on&quot; for all non-hub usb devices. Which also disables the usb autosuspend. But I am finding that in our kernel all the USB devices have power/control set to &quot;auto&quot;. She mentioned that udev rules of systemd may be turning it to &quot;auto&quot;, which I did not find happening in our images.
  From all these discussions seems like a new udev rule will be right way to fix this issue. But my udev rules are not helping. Maybe someone who is a udev-fu master in can help here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36624</commentid>
    <comment_count>9</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-12 19:28:20 +0000</bug_when>
    <thetext>As I also mentioned yesterday in IRC:

tomz: nakamble: in any case, i don&apos;t think the answer is to modify the code

and obviously the mention of sending a patch to LKML was just making the same point that I think it&apos;s actually the WRONG thing to do.

So yeah IMHO it should be a per-BSP policy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36625</commentid>
    <comment_count>10</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 20:14:44 +0000</bug_when>
    <thetext>Pulling in RP here, as this issue affects non-intel BSP also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36626</commentid>
    <comment_count>11</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-09-12 20:14:56 +0000</bug_when>
    <thetext>I would typically agree with Tom on this if it weren&apos;t for the number of times we&apos;ve seen this failure. However, so long as it is addressed, I don&apos;t feel like pushing on solution over the other. If we fix it per-BSP, we will likely need to do this frequently in a piecemeal way.

So, let&apos;s go ahead and do this via APPEND per-BSP to address this particular bug. If we get a slew of these post 1.5, then we can reconsider a global fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36627</commentid>
    <comment_count>12</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 20:22:27 +0000</bug_when>
    <thetext>Darren,
 In that case this fix also need to propogate non-intel BSPs. Can you check, wheather beaglebone is affected by this bug? If not, then it become meta-intel specific issue. If yes, then any BSP using linux-yocto-3.10 kernel is affected. I am not worried about non-intel BSPs as such, but the issue will be pointed back to linux-yocto-3.10 kernel from oecore/poky release, which IMO we should avoid.

Thanks,
Nitin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36628</commentid>
    <comment_count>13</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-09-12 20:33:51 +0000</bug_when>
    <thetext>No, I will not be able to test with Beagleboard.

Does this particular bug impact more than one BSP currently?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36629</commentid>
    <comment_count>14</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 20:35:24 +0000</bug_when>
    <thetext>Darren,
 As I see, this BSP affects all the BSPs using our linux-yocto-3.10 kernel.

Thanks,
Nitin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36630</commentid>
    <comment_count>15</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-12 20:37:12 +0000</bug_when>
    <thetext>(In reply to comment #14)
&gt; Darren,
&gt;  As I see, this BSP affects all the BSPs using our linux-yocto-3.10 kernel.
&gt; 
&gt; Thanks,
&gt; Nitin

correction, I mean: &quot;this issue affects&quot; and not &quot;this BSP affects&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36631</commentid>
    <comment_count>16</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-09-12 21:07:41 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; She says even though USB autosuspend delay
&gt; is set in the kernel, the power/control should be set to &quot;on&quot; for all
&gt; non-hub usb devices. Which also disables the usb autosuspend. But I am
&gt; finding that in our kernel all the USB devices have power/control set to
&gt; &quot;auto&quot;. She mentioned that udev rules of systemd may be turning it to
&gt; &quot;auto&quot;, which I did not find happening in our images.
&gt;   From all these discussions seems like a new udev rule will be right way to
&gt; fix this issue. But my udev rules are not helping. Maybe someone who is a
&gt; udev-fu master in can help here.

I can look at this tomorrow as I have a reliable test case on my desk.

Ross</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36660</commentid>
    <comment_count>17</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-09-13 09:09:30 +0000</bug_when>
    <thetext>Confirmed here, all devices are &quot;auto&quot;.  There&apos;s only one udev rule that manipulates the power/control and disabling that doesn&apos;t help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36665</commentid>
    <comment_count>18</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-09-13 09:49:14 +0000</bug_when>
    <thetext>Interesting data point is that my desktop has Debian&apos;s 3.10-2 kernel and that doesn&apos;t have this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36693</commentid>
    <comment_count>19</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-09-13 14:31:06 +0000</bug_when>
    <thetext>A quick check of the Ubuntu 3.10-2 kernel doesn&apos;t show any changes made by Ubuntu in this area.

There have been a couple more changes since then to fix things that aren&apos;t in 3.10.2 (that we already have in our kernel since they&apos;re also in stable and we&apos;ve of course merged those, but since you&apos;re ok with Debian 3.10.2, they wouldn&apos;t matter e.g.: 

    usb: core: don&apos;t try to reset_device() a port that got just disconnected
    usb: check usb_hub_to_struct_hub() return value
    USB: global suspend and remote wakeup don&apos;t mix
    usb: check usb_hub_to_struct_hub() return value

Incidentally, here&apos;s the justification for the original removal of CONFIG_USB_SUSPEND, for reference:

    USB: remove CONFIG_USB_SUSPEND option

    There&apos;s very little point in keeping CONFIG_USB_SUSPEND because almost
    everybody enables it.  The few that don&apos;t will find that the usbcore
    module has gotten somewhat bigger and they will have to take active
    measures if they want to prevent hubs from being runtime suspended.

So if everyone enables it and doesn&apos;t see problems, and Ubuntu with the same kernel doesn&apos;t see problems, it must be somewhere else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36697</commentid>
    <comment_count>20</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-13 14:35:04 +0000</bug_when>
    <thetext>Do usb devices on ubuntu show &quot;on&quot; setting or &quot;auto&quot; setting for the power/control in sysfs ?

My guess is &quot;on&quot;. if it is, then we need to see what is making it &quot;on&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36879</commentid>
    <comment_count>21</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2013-09-18 15:11:27 +0000</bug_when>
    <thetext>commit b925c752c07ff625386daf08d41744e1160fba6a
Author: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
Date:   Fri Sep 13 21:16:44 2013 +0000

    udev: avoid autosuspend of USB input devices
    
    Some of the external USB devices has internal USB hub, which
    make them look like &quot;fixed&quot; rather than &quot;removable&quot;. And USB
    autosuspend does not work with some of these devices resulting
    in inoperable pointing device.
    
    Now the code detect these false &quot;fixed&quot; devices by looking at their
    parents.  If any of their parent is &quot;removable&quot;, then USB autosuspend
    is not enabled for that device, which keeps the pointing device
    functional.
    
    Fixes bug:
    [YOCTO #5166]
    
    (From OE-Core rev: d74a0ecdbc85a482cab6e7eae8dcb48185d44d84)
    
    Signed-off-by: Nitin A Kamble &lt;nitin.a.kamble@intel.com&gt;
    Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
    Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>