Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp68378lqc; Thu, 7 Mar 2024 10:29:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6l7G5VDB0fFvhzIVkefbHW6y3ZUKMx3RnQ7ZtgKkTgg4H9clVf8xvZ6EQ+wRKXKhlHx7sgbleJvT7EMG5nd1xhYn3XL92FFQoG96Lrg== X-Google-Smtp-Source: AGHT+IEDyBaBhwiCxsipFS9Bu48bLjDGNJTG2wbifriUo0I6UdcAAd7quXvBz/xj3DUS/czC1eoE X-Received: by 2002:a17:90a:f68e:b0:29b:4b7e:a016 with SMTP id cl14-20020a17090af68e00b0029b4b7ea016mr12315901pjb.8.1709836157688; Thu, 07 Mar 2024 10:29:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709836157; cv=pass; d=google.com; s=arc-20160816; b=nIN4pjaCrTWWEW33BUk1Hp78+BdJnGuYLTgh5IjeafRvy0P7pcUYCAs+fU8UxBBWCp sMrvO52lSXfGkp8q6iDX0GwwaZl6rrLdJwrpz+aMKMUG3MoCkTXTgurkBUGj2Dn2CaKB h1Ci3ntC1jxvehznW6ueyDUAHbCFsj7yQbjxL8qYk6VlcAJwMGQcKFsHTOUr4jGpr0BH WYhNqOhV/Z7MsFw/OgqbwqToU5cbNlwtyx6FmRlnxX7LyW8jvskL62x8pa5Um0BU2cT3 b8rIoeBIN5Dh6/sr+jh/BgsZqzRb2bIKcnR0//Ij0e2u53wUwtRqQS/qJfecVbHAS5Q1 oBHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZNpOPY6J6NoDjcYUmT22gL0RoTRGL1EqV0mF/U5iDE0=; fh=pQh4UbafaEszK6p41u9oEeaocnuQZg43wdGOhblOHl0=; b=OrG7ATnlj+dsAjZb/BfVQG7Lt4FhR8DWuhnO6/oVZyKZwOVd8XwVvxWetjcxsrgocc S20FqrQJ3lxkB0FGTHDio2Pjc7T0Z/yDnkPu6XNexUi7EIirIzvSRhYvvopRRZARKC/q YATrl9qLJ20gRQSlu1LKdsf0ONevl4G7N5DIsyRPbaqkLJdDR7UhpyYDjMgS6PzVRKvY FJSfM4GtO4Uljhw3HZxrCKGBarOZhBYOrwlM+lGkcRo7qJc7g8CtTW5KVEMzusCYB9JL gHGeB40t4xdCOb6lQ2DFWdTYZI3/UB4lBV2sdJA49qiJSkdtvVS482joY97Pw0ZOEVMU 0Khw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=l3HHOofO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96013-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96013-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m14-20020a17090a2c0e00b0029969ee2a08si2097689pjd.52.2024.03.07.10.29.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 10:29:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96013-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=l3HHOofO; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96013-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96013-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 54E77283AFD for ; Thu, 7 Mar 2024 18:29:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13602133405; Thu, 7 Mar 2024 18:29:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="l3HHOofO" Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6B912C180; Thu, 7 Mar 2024 18:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709836149; cv=none; b=VhnpsSF2CA3Wl3C3bQNE0UpbZplvg0fmw+lk0vbh2ssa0fiOkYkDkqBasVtJH8SuaoqWCk8VtM156Fb/I3YolUlga88hPhPap6n6H6jVj2Ox0678kKS7Gxi0mGYMdiDl9JEFV9Pbd+xrv/O1CTbWCObwgXDogeo0FDBeEg7+F2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709836149; c=relaxed/simple; bh=eBSebctmO6Ythh8P9I3Tu0FhUlKA5IX3lUZ879cQR8M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b7s51NLqLJXF/IZPxLA3Un6r6qESE4zcXpDj1OVjRHB3Cs4uYMOMvzu/eICobPQpJ8+KZ30pA3+mdrl5jzEnbxrb887xzlBT9i/c1F0X9w38uq4n4coT1uTv8iCY0DuQ++mSDsOSMtWI6hBfJp2SFFG2Avgt9MlghRJA0RDgWuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=l3HHOofO; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso957020a12.3; Thu, 07 Mar 2024 10:29:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709836147; x=1710440947; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ZNpOPY6J6NoDjcYUmT22gL0RoTRGL1EqV0mF/U5iDE0=; b=l3HHOofOCkuPZcUgo/1dXDVs9fhjs5/z+rwBc0AVyEJxr1EBhemoFNRcxE+nn+MhjQ BNNp32tcF29xWJqN5rUw92ue+wWT6KI+jrOSrSbCiCYDII7KpArNyo/5LGYSy0EAJjg0 0fgitrFkq5A5FE7XCsqFKcYuZ33/RnnQKCX4Yauih3SV+UMGWleCoAu0gEB/Xel0heZS sj9b8jldPblsUpKUspNILkaM2UxyJsgBtMyDw2fRo9BE5vCkKFtTcXR2E1F+dWBHkXse ewYi1admE+oATpdRGrlA4amqkIzNyiA7/zX/oaE+hiNtYLsqG5MhwymRxh2RGwE+lPGV jOLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709836147; x=1710440947; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZNpOPY6J6NoDjcYUmT22gL0RoTRGL1EqV0mF/U5iDE0=; b=ILeRJuR+x5foYDKKfwVw63qhFkBH4CynVPvQEJY8Su2JnFQKCX3nk7015BNDL9b1Oj DNrUjLKiRGP3KTlgakMZLkM6cg94L55hILX/MqdqrXx21MLUNrwXpzUov3Qyf9a5n4Xh VkOwfqu5RoGx6IJcHwnj7edJBaasJGaRZzyYPoF9L5UWNNcoSFpS/FqsG3fKhAZtCSFS jZ9UbJ5jNRqZbEDYyQ9ataE1aCe+HeKfY1LjrJsChHA40vzmjoaPTVkakjTTgEE9tbc7 zb7GkDkpDGdGFOtb4BwnE4gMGFH9ycK13c+BjRmiK7tHHYejUgxCvhvRclb42YaWWxsI fKBA== X-Forwarded-Encrypted: i=1; AJvYcCWkq4r2p7fbmHSdEbHjXwUKzsMCcmckD9v0no3nnoYnzbyNbZZ374pKDXk8lLX2rS4nDw8rj0XZuWUvOmjQIyJ1xIb6UiQXXG9Um+BhYhnCciriyFzPePyOP6HzzfoEpQnuJSEqtg7XW9ONbCleZz1R X-Gm-Message-State: AOJu0Yzken+fQUc7mxM7ivWXVfYXOQP37ZGRgKZF7nTw8ZgwYzGAnbgR Cmist5qQJeSRwl4J8tx8p2i+YzAd+68fAa4jOkhfNvw/yFCdetpNkPbOpOku X-Received: by 2002:a05:6a20:3d27:b0:1a1:6f2c:ceb7 with SMTP id y39-20020a056a203d2700b001a16f2cceb7mr3808492pzi.8.1709836146949; Thu, 07 Mar 2024 10:29:06 -0800 (PST) Received: from google.com ([2620:15c:9d:2:7cdb:7132:a03e:7749]) by smtp.gmail.com with ESMTPSA id c11-20020aa781cb000000b006e4362d0d8csm12935384pfn.36.2024.03.07.10.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 10:29:06 -0800 (PST) Date: Thu, 7 Mar 2024 10:29:04 -0800 From: Dmitry Torokhov To: Jonathan Denose Cc: LKML , jefferymiller@google.com, Jonathan Denose , Raul Rangel , linux-input@vger.kernel.org, Ike Panhc , Hans de Goede , platform-driver-x86@vger.kernel.org Subject: Re: [PATCH] Input: psmouse - add resync_on_resume dmi check Message-ID: References: <20231102075243.1.Idb37ff8043a29f607beab6440c32b9ae52525825@changeid> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Mar 04, 2024 at 11:17:31AM -0600, Jonathan Denose wrote: > I disabled the ideapad driver by rebuilding the kernel without the > ideapad_laptop module. That does fix the suspend/resume issue! > > Attached are the logs. Is there a way to make this permanent? > > On Thu, Feb 29, 2024 at 12:23 PM Dmitry Torokhov > wrote: > > > > On Mon, Feb 12, 2024 at 02:57:08PM -0600, Jonathan Denose wrote: > > ... > > > [ 50.241235] ideapad_acpi VPC2004:00: PM: calling acpi_subsys_resume+0x0/0x5d @ 4492, parent: PNP0C09:00 > > > [ 50.242055] snd_hda_intel 0000:00:0e.0: PM: pci_pm_resume+0x0/0xed returned 0 after 13511 usecs > > > [ 50.242120] snd_hda_codec_realtek hdaudioC0D0: PM: calling hda_codec_pm_resume+0x0/0x19 [snd_hda_codec] @ 4518, parent: 0000:00:0e.0 > > > [ 50.247406] i8042: [49434] a8 -> i8042 (command) > > > [ 50.247468] ideapad_acpi VPC2004:00: PM: acpi_subsys_resume+0x0/0x5d returned 0 after 6220 usecs > > ... > > > [ 50.247883] i8042 kbd 00:01: PM: calling pnp_bus_resume+0x0/0x9d @ 4492, parent: pnp0 > > > [ 50.247894] i8042 kbd 00:01: PM: pnp_bus_resume+0x0/0x9d returned 0 after 0 usecs > > > [ 50.247906] i8042 aux 00:02: PM: calling pnp_bus_resume+0x0/0x9d @ 4492, parent: pnp0 > > > [ 50.247916] i8042 aux 00:02: PM: pnp_bus_resume+0x0/0x9d returned 0 after 0 usecs > > ... > > > [ 50.248301] i8042 i8042: PM: calling platform_pm_resume+0x0/0x41 @ 4492, parent: platform > > > [ 50.248377] i8042: [49434] 55 <- i8042 (flush, kbd) > > > [ 50.248407] i8042: [49435] aa -> i8042 (command) > > > [ 50.248601] i8042: [49435] 00 <- i8042 (return) > > > [ 50.248604] i8042: [49435] i8042 controller selftest: 0x0 != 0x55 > > > > So here I see the ideapad-laptop driver trying to access i8042 before it > > even starts resuming. I wonder, does it help if you disable > > (temporarily) the ideapad driver? OK, so I tried to cook up a patch that would allow ideapad-laptop driver to establish device link with i8042 so that the resume will be processed after i8042 resumes, but the longer I think about it, the more I think that ideapad driver should not be messing with the touchpad state directly. The disable event may come up in a middle of the touchpad resume transition, or when we decide to change touchpad mode for one reason or another. It also does not respect inhibit/uninhibit controls for input devices. I think that the proper way for ideapad driver to handle this is to only send KEY_TOUCHPAD_OFF/KEY_TOUCHPAD_ON to userspace and let userspace deal with toggling touchpad input (via inhibit or by other means). CC-ing ideapad maintainers for their thoughts. Thanks. -- Dmitry