Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp1278298pxy; Sun, 15 Aug 2021 16:09:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrrHKAqnkiIdR6ueMUCFGXxiw4ZjF5dCDsGhRSbGAk4/FU96+od3RzvSXfnZHu/EdYaQZU X-Received: by 2002:a17:906:72c8:: with SMTP id m8mr13007348ejl.508.1629068949357; Sun, 15 Aug 2021 16:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629068949; cv=none; d=google.com; s=arc-20160816; b=QRe98+mBYImZVHXvZMlV9njpVVpd3QZmxrGhtECayrq3XGfVYPWgthBfsv8T4atcT3 yCE/U2lE98gY045b9f3HtWVANNQSBsV+9krVUb9/w6ZjjYZ7Ilmrd3CDN7at20rVCN0L ZbDG7CRTVVf3ZcLuUFTOsayKtdJ1b/f1oyCRuRsz44bsKYLlI4Ny/pMry5R7v7dkwwBx aKJRB2FYb2n69lwDqkBrm7Wny3C6zo5uPWfMFnME+9C3dbJgWCcaWrrPaUV98gBVDTcO S2DDfE8tAMYsjtMIOr0EwA5GTdPntPh+NwWkIVANVqJzirz2DLBNIUtKTiEolOBbpuSW LIqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :cc:to:subject:from:date:dkim-signature; bh=8iTDKuFf6sIK5qkD+04LYSEIHov0bH0Yf7Smj73cGDo=; b=tjH4kqNDEjFP7t6gta0SCqsR11M8puDsnbAk0gkthLFDO/82bvNkS+cCvl0NyEtmll iRudFeBH3lLNZwUiorpg0bLg0Jh0FCk4yJtK3qxJyBRKNTL9M5U/AJFRMgkCzPUDjlnc 4dnopHnlx3s/ouuJp8ab9xySjdhNB6zsEgkY7q1mvm9Rnz2+nrwrp0i9tNAg2HcL8YeP S2lPcP8yG4nZXWCe6fPlSddPvZ3/WCa+KN1dRO22gUCvEL5YPJvHRe/5pDOs91RgsedL mXxPR54/NnW9DEDiiwlXudILLCwuG+LBjQ41nCFI1aBUkWJ/li/AWSJAhReuGbmm3XAp TMxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=urQujKKq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si10541906eje.573.2021.08.15.16.08.17; Sun, 15 Aug 2021 16:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=urQujKKq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbhHOXAw (ORCPT + 99 others); Sun, 15 Aug 2021 19:00:52 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:57785 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbhHOXAv (ORCPT ); Sun, 15 Aug 2021 19:00:51 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 3101432008FE; Sun, 15 Aug 2021 19:00:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 15 Aug 2021 19:00:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=8iTDKu Ff6sIK5qkD+04LYSEIHov0bH0Yf7Smj73cGDo=; b=urQujKKqso9YornYGdsq6C hMcJS95tNpEOqYksQuKfLkauJNN0k4432D+hApYbs8asGc8OV9hAK+VdiLUdH0tF dmu0lFoEwSn46YZjifE1qRvsAvZw/EO3LlDlWpp9/0PdW+6aKsldR+1i3gh5uxxH shs6F6TBvLsUqQDI06CzqjF9RE/S0NLnFyCh5xcmO1TjAAMVB3Mk92fDA2B+cS52 nnZVXNFSbIWIcyn8uR12OqiqAl+DHq+3bh7OzKcA5P1d3cR8cLKzK8qn8XU7yjSI NEZpzuZeDR7oITh3o61CgxBVbYXVt9hJun+buPvoy3xir0q0ziviZ/tDgY3GWj0A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrledtgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffuvffkjghfofggtgesthdtredtredtvdenucfhrhhomhepnfhukhgvucfl ohhnvghsuceolhhukhgvsehljhhonhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgf effedufffhgfeuheegffffgeegveeifeeutefhieejffetudfgueevteehtdetnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhhukhgvsehljh honhgvshdruggvvh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 Aug 2021 19:00:15 -0400 (EDT) Date: Mon, 16 Aug 2021 11:00:01 +1200 From: Luke Jones Subject: Re: [PATCH v3 0/1] asus-wmi: add platform_profile support To: Hans de Goede Cc: linux-kernel@vger.kernel.org, hadess@hadess.net, platform-driver-x86@vger.kernel.org Message-Id: <18LWXQ.AIB2DGCZUVMW@ljones.dev> In-Reply-To: References: <20210814043103.2535842-1-luke@ljones.dev> X-Mailer: geary/40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 15 2021 at 15:48:49 +0200, Hans de Goede wrote: > Hi, > > On 8/14/21 9:51 AM, Luke Jones wrote: >> >> >> On Sat, Aug 14 2021 at 16:31:02 +1200, Luke D. Jones >> wrote: >>> Changelog: >>> - V2 >>> + Correctly unregister from platform_profile if >>> throttle_thermal_policy fails >>> + Do platform_profile_notify() in both >>> throttle_thermal_policy_store() >>> and in throttle_thermal_policy_switch_next() >>> + Remove unnecessary prep for possible fan-boost modes as this >>> doesn't match expected platform_profile behaviour >>> - V3 >>> + Add missing declaration for err in >>> throttle_thermal_policy_switch_next >>> >>> Luke D. Jones (1): >>> asus-wmi: Add support for platform_profile >>> >>> drivers/platform/x86/asus-wmi.c | 139 >>> +++++++++++++++++++++++++++++++- >>> 1 file changed, 135 insertions(+), 4 deletions(-) >>> >>> -- >>> 2.31.1 >> >> Hi, >> >> I teested the patch again and it appears that the >> platform_profile_notify() in both throttle_thermal_policy_store() >> and throttle_thermal_policy_switch_next() updates the >> /sys/firmware/acpi/platform_profile sysfs path fine, but userspace >> isn't updated? >> >> The way I'm checking is: >> 1. echo 1 |sudo tee >> /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy >> 2. cat -p /sys/firmware/acpi/platform_profile >> - performance (updated correctly by platform_profile_notify) >> 3. Check gnome-settings, not updated. >> >> Doing `echo "performance" |sudo tee >> /sys/firmware/acpi/platform_profile` updates both >> throttle_thermal_policy and userspace as expected. I'm wondering if >> I've missed something? > > If you add a printk where you call platform_profile_notify() and you > see that > happening, then you are likely seeing a userspace bug. Possibly your > power-profile-daemon is simply a bit old and therefor does not support > the combination of profiles which asus-wmi offers, IIRC it falls back > to > using intel-pstate in that case. It's possible that it's a userspace bug then. The power-profile-daemon I'm using is fresh from git (0.9+). To be clear updating via /sys/firmware/acpi/platform_profile works perfectly fine and power-profile-daemon updates etc. But if I do platform_profile_notify() then it doesn't seem to be updated. Nevertheless I will finalise the patch as it is and submit for merging and we can go from there. > > You could try building the latest power-profile-daemon from git and > run > it in verbose mode. If it sees the changes and the control-panel > applet is > still not updating then I would not worry about that. The userspace > code > is still somewhat new and I'm not sure which version your distro is > running and how well it is keeping up with gnome-updates. > > Regards, > > Hans >