Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp557608iog; Fri, 17 Jun 2022 08:37:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sBMH2FB+0ht9aPhscSBKAQur+Ye5OGbXuaAPZkBozymAzvBvto+uGDvq2g2fgBudqyOkxT X-Received: by 2002:a17:90a:72c4:b0:1ea:fa07:1acd with SMTP id l4-20020a17090a72c400b001eafa071acdmr7930449pjk.192.1655480239947; Fri, 17 Jun 2022 08:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655480239; cv=none; d=google.com; s=arc-20160816; b=X9RYiEFIwZgzOFdkTqtBfdfGM9sBfwXe9ZZi1fdrARAsPotrlSbfZeOSnWb58QugBT yfFZdImBTX5nFvUf+SRjZJa+ELIFMIw+d5kObW8B7hXHCc+UhChARGyQz//5l/QecOcx U476NqglYJm4o7Ii9WykTfQAEmnsSSMzX/OZFPpEKVeWbSQ8iLcRyl33x6tUQ2weyot2 FGC3mzwRbTjXuvnp9xFRn0H/F0wWOpkZV1OHdK5jZ9NZkTAMYPXawZ77IQYc+WQkK+fu 4pDoRVkq2cdZMngFh2GFLBPUapVWWxK6Xw6Dch9n6rO7Hp4oOy9iEGBovUgvnMhpySQd 7n+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=HxvVkFUzCs4qenVnjzPCbRwCm5tFkulWqpi4YKpix1k=; b=Ij3HG6oBGuWcfK4oSTCgYhLBuclfa5aH9qbmG0Eg4uoTQrE556NPeLVT63F9D1lFoL DuKp4OzDdaJY90roehrd4cKUXFXInLB7b8hlCnRwSnp4w5NubmIadEnyaZHD1IbsHDCz u+Fzw0i/ZX1fhzUeZxxCWn9jIT1KaNteK3tFCWhl+eUfPXDF5Wr+KU95LRZeBWuiqR2Y dDqPel7SHiSHLGGLbhm/NNPKYM8wZuRyaJdelStGWMnBuBJyHv8cQMGHh0eD+CEZ4xqc KW/ebat14SbcCSGnJ/eBt99ac1+Nc0QmGMT0mk3PR9VS21sp9nTTlexWmeOLu+OFIosB Dq9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f126-20020a636a84000000b003fc6b3c8274si5754874pgc.16.2022.06.17.08.37.02; Fri, 17 Jun 2022 08:37:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382080AbiFQPFL (ORCPT + 99 others); Fri, 17 Jun 2022 11:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382201AbiFQPFK (ORCPT ); Fri, 17 Jun 2022 11:05:10 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 8C333205C5 for ; Fri, 17 Jun 2022 08:05:08 -0700 (PDT) Received: (qmail 768756 invoked by uid 1000); 17 Jun 2022 11:05:06 -0400 Date: Fri, 17 Jun 2022 11:05:06 -0400 From: Alan Stern To: Greg KH Cc: Mario Limonciello , Jiri Kosina , Benjamin Tissoires , "open list:USB HID/HIDBP DRIVERS \[USB KEYBOARDS, MICE, REM..." , "open list:HID CORE LAYER" , open list , Richard Gong Subject: Re: [PATCH v2] HID: usbhid: set mouse as a wakeup resource Message-ID: References: <20220616183142.14472-1-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 16, 2022 at 11:28:05PM +0200, Greg KH wrote: > On Thu, Jun 16, 2022 at 01:31:42PM -0500, Mario Limonciello wrote: > > The USB HID transport layer doesn't set mice for wakeup by default so users > > can not wake system from s2idle using wired USB mouse. However, users can > > wake the same system from Modern Standby on Windows with the same wired > > USB mouse. > > > > Microsoft documentation indicates that all USB mice and touchpads should > > be waking the system from Modern Standby. To align expectations from users > > make this behavior the same when the system is configured by the OEM and > > the user to use s2idle in Linux. > > > > Link: https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-wake-sources#input-devices-1 > > Link: https://lore.kernel.org/linux-usb/20220404214557.3329796-1-richard.gong@amd.com/ > > Suggested-by: Richard Gong > > Signed-off-by: Mario Limonciello > > --- > > More people keep coming to us confused that they couldn't wake a Linux system > > up from sleep using a mouse, so this patch is being revived. > > How many different devices did you test this on? Another issue is whether wakeup for a mouse means pressing a button or just moving the mouse. For a mouse that uses LEDs to sense motion, moving it won't generate a wakeup request -- USB suspend does not allow the mouse to use enough current to keep the LEDs illuminated. On the other hand, there's no reason why wakeup by pressing a button shouldn't always work. Also, the patch description doesn't seem to appreciate the difference between the default value for the wakeup setting and actually supporting wakeup. As long as the hardware supports it, the default wakeup setting doesn't matter all that much, because the user can change the setting during system startup or whenever he wants. But if the hardware doesn't support wakeup then the default setting makes no difference at all. Alan Stern