Bug 4992

Summary: Mouse unusable on NUC
Product: [Build System, Metadata & Runtime] BSPs Reporter: Paul Eggleton <bluelightning>
Component: bsps-meta-intelAssignee: Nitin Kamble <nitin.a.kamble>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: dvhart, ionutx.chisanovici, ross.burton, tom.zanussi
Version: unspecified   
Target Milestone: 1.5 M4   
Hardware: NUC   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2013-08-07 17:05:21 UTC
With a fairly standard Logitech USB mouse, if it is plugged into the NUC during boot it is powered off and non-functional by the time X starts up. Unplugging it and plugging it back in makes it work, but after 3 seconds of inactivity it powers off and stops working. I strongly suspect this has to do with USB auto-suspend; the problem though is there doesn't seem to be any way of waking it up other than re-plugging, which is somewhat impractical.
Comment 1 Nitin Kamble 2013-08-07 17:24:47 UTC
Paul,
  You are right about this being a USB suspend issue. FYI, key press on keyboard wakes up the mouse. There is also a kernel parameter to disable USB suspend to overcome the issue, if you need that let me know. But IMO this needs further investigation, to understand why is it happening.
Comment 2 Paul Eggleton 2013-08-07 17:50:07 UTC
If I press keys on the keyboard it does not wake up the mouse. The way I have things currently plugged in (mostly by chance) I have the keyboard plugged into the front port and the mouse into one of the ones on the rear, so at first I thought that maybe this was because the front and rear ports were on separate hubs. However, lsusb -t seems to show that this is not the case.
Comment 3 Ross Burton 2013-08-07 18:32:08 UTC
I note that meta-nuc turns on autosuspend globally for all devices via a kernel parameter.  I'm pretty sure this isn't encouraged by upstream (as it's not default) and they're taking the approach of whitelisting devices that *do* suspend or letting people with known working configurations turn it on globally on a case-by-case basis.

(I've got a ThinkPad USB keyboard/trackpoint, and when it suspends only keyboard input wakes it, and that takes ~one second to actually wake fully)
Comment 4 Darren Hart 2013-08-08 14:39:32 UTC
Nitin, could you please have a look at this today or tomorrow?
Comment 5 Nitin Kamble 2013-08-08 17:19:21 UTC
Darren,
  ok, I will to some poking here. I think this is not NUC specific. Possibly the generic kernel config meta data in v3.8 kernel repo.

Nitin
Comment 6 Nitin Kamble 2013-08-08 17:59:32 UTC
I think a udev rules like this should solve the issue. I will be testing it out soon.

SUBSYSTEM=="input", ACTION=="add", ATTR{power/control}="on"
Comment 7 Nitin Kamble 2013-08-09 00:57:06 UTC
A fix sent to linux-yocto mailing list.
Comment 8 Ross Burton 2013-08-09 09:12:42 UTC
So my thought that autosuspend was globally enabled on NUC was incorrect, it's globally enabled on atom-pc (which is why I was seeing on my NUC occasionally).  I'll send a patch to fix that too.
Comment 9 Nitin Kamble 2013-08-09 15:09:39 UTC
The linux-yocto-3.8 kernel repo is updated to change the kernel config for Intel BSPs. Now all Intel BSPs using linux-yocto-3.8 kernel need to update the commit of their meta branch, which will solve the issue. I will be doing this for bunch of BSPs from meta-intel layer. Rest of the Intel BSPs need to be updated by their maintainers.

Thanks,
Nitin
Comment 10 Nitin Kamble 2013-08-13 03:20:24 UTC
commit a6b7129fa25bf295a5b0f6ae5fd3f28ef04974ad
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Fri Aug 9 17:14:58 2013 +0000

    nuc:linux-yocto-3.8: update meta branch srcrev
    
    This fixes USB autosuspend issues related to non-responsive mice & keyboards.
    
    Fixes bug:
    [YOCTO #4992]
    
    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Comment 11 Ionut Chisanovici 2013-10-21 13:19:28 UTC
Verified, usb mouse and keyboard are working normally without interruptions on NUC, mouse is working/functional after minutes of inactivity.