Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2695465pxb; Tue, 24 Aug 2021 05:35:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb8m4tF+h65IAepZ3BuXImH+S5E5RWGY7e44wBH4Vz+u1U5HEPkX7Kces3/zH9SgdK0Ar4 X-Received: by 2002:a02:1083:: with SMTP id 125mr33991938jay.34.1629808508818; Tue, 24 Aug 2021 05:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629808508; cv=none; d=google.com; s=arc-20160816; b=ZNw+kHuLCu0mDWCA4HKimY04BNoR/RAYIeiRiyP8stlc1iqzeRvEHgTve4nsckxEUO ptYrDkGnyKuarIcdzf4wtkRprUe+AROnK6OMbraNXaXcr5WNBeKwTWW1DjKYTycIY8dV xGTivMRoB2e3SsPr55y8coVHw6HapVlaw3Ot1EuBlFPKmcrCO4NrXL7BgLPbE/TZVaoL ettBKemSgwOkgvi90L58hsUDmwn3i3w8f9yFuUghJ3SmHPo30uoOSuXp5GSCcGxMc1+Q 43ExxT0TzlxBF8L+cz0B2ntiuDoypO8fJGC9BLD9pccSBHxSCLvsb1EnS/TRnIb2UrZo Tn1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Pc5iD5/7DZCqCTSN9BhlnuNyOyOZIElTkgM29q1wk4k=; b=Gw3Fh5tHQLZSAJJ3kNkwS333fkjPZdXpLG5ME9xFJI9F2rHq3LOz+rJo/FvwHTnJ0k yY9HrwYOydQnLSuKZm8MO0S8c52WwZWBJLPJrIMDFov4ogeyrCI0O8p1Ipri3Q9Y0/RF AYtPR46hflhGlRHu9eqrqhqGayvFkrARABUUWxU0A0CmW7iKnnclGwkW68hlETZtW8xa /UqWqpVVu4sxZJ1JkJh7hG9oI1Z0GkzTmGOBnuTixQa7jO19hpPaoIamngbEK79+MoyW AKtVTS39lfO0gJo/+DjGpNZtgoUb4AWXMGSNwGomRCyQ9a1QCMVpnixbDBIKJ1eXr6ix Qedw== ARC-Authentication-Results: i=1; mx.google.com; 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 i7si16627374ils.74.2021.08.24.05.34.57; Tue, 24 Aug 2021 05:35:08 -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; 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 S237290AbhHXMef (ORCPT + 99 others); Tue, 24 Aug 2021 08:34:35 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:45623 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230132AbhHXMef (ORCPT ); Tue, 24 Aug 2021 08:34:35 -0400 Received: (Authenticated sender: hadess@hadess.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 164B16000C; Tue, 24 Aug 2021 12:33:48 +0000 (UTC) Message-ID: <3bc459afe71eb49c8c0c1f0a0b38855170ae507d.camel@hadess.net> Subject: Re: [PATCH v4 1/1] asus-wmi: Add support for custom fan curves From: Bastien Nocera To: Hans de Goede , Luke Jones Cc: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Date: Tue, 24 Aug 2021 14:33:48 +0200 In-Reply-To: <65260602-a1f4-fc8a-a823-ca5a6e4fca60@redhat.com> References: <20210820095726.14131-1-luke@ljones.dev> <20210820095726.14131-2-luke@ljones.dev> <321afe1a293be3a623a9be53feea3a008e044b31.camel@hadess.net> <1EQ5YQ.6O8MNIPTU6V4@ljones.dev> <7a8a8d56c4e6addfc41b5dd5262968bd169f538f.camel@hadess.net> <65260602-a1f4-fc8a-a823-ca5a6e4fca60@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.3 (3.40.3-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-08-23 at 13:45 +0200, Hans de Goede wrote: > Hi, > > On 8/23/21 1:26 PM, Luke Jones wrote: > > > > > > On Mon, Aug 23 2021 at 12:28:21 +0200, Bastien Nocera > > wrote: > > > On Sat, 2021-08-21 at 09:30 +1200, Luke Jones wrote: > > > > > > > > > > > >  On Fri, Aug 20 2021 at 13:39:02 +0200, Bastien Nocera > > > >   wrote: > > > >  > On Fri, 2021-08-20 at 23:00 +1200, Luke Jones wrote: > > > >  > > > > > >  > > > > > >  > >  On Fri, Aug 20 2021 at 12:51:08 +0200, Bastien Nocera > > > >  > >  wrote: > > > >  > >  > On Fri, 2021-08-20 at 12:43 +0200, Bastien Nocera > > > > wrote: > > > >  > >  > >  On Fri, 2021-08-20 at 22:33 +1200, Luke Jones wrote: > > > >  > >  > >  > > Am I going to get bug reports from Asus users > > > > that will > > > >  > >  > > complain > > > >  > >  > >  > > that > > > >  > >  > >  > > power-profiles-daemon doesn't work correctly, > > > > where I > > > >  > > will > > > >  > >  > > have > > > >  > >  > >  > > to > > > >  > >  > >  > > wearily ask if they're using an Asus Rog laptop? > > > >  > >  > >  > > > > >  > >  > >  > No. Definitely not. The changes to fan curves per- > > > > profile > > > >  > > need > > > >  > >  > > to > > > >  > >  > >  > be > > > >  > >  > >  > explicitly enabled and set. So a new user will be > > > > unaware > > > >  > > that > > > >  > >  > > this > > > >  > >  > >  > control exists (until they look for it) and their > > > > laptop > > > >  > > will > > > >  > >  > >  > behave > > > >  > >  > >  > exactly as default. > > > >  > >  > > > > > >  > >  > >  "The user will need to change the fan curves > > > > manually so > > > >  > > will > > > >  > >  > >  definitely remember to mention it in bug reports" is > > > > a very > > > >  > >  > > different > > > >  > >  > >  thing to "the user can't change the fan curves to be > > > >  > > nonsensical > > > >  > >  > > and > > > >  > >  > >  mean opposite things". > > > >  > >  > > > > > >  > >  > >  I can assure you that I will eventually get bug > > > > reports > > > >  > > from > > > >  > >  > > "power > > > >  > >  > >  users" who break their setup and wonder why things > > > > don't > > > >  > > work > > > >  > >  > >  properly, > > > >  > >  > >  without ever mentioning the changes they made > > > > changes to > > > >  > > the > > > >  > > fan > > > >  > >  > >  curves, or anything else they might have changed. > > > >  > >  > > > > >  > >  > A way to taint the settings that power-profiles-daemon > > > > could > > > >  > > catch > > > >  > >  > would be fine by me. I absolutely don't want to have to > > > >  > > support > > > >  > >  > somebody's tweaks until they undo them. > > > >  > > > > > >  > >  Definitely understood. Do you have something in mind? > > > >  > > > > >  > A sysfs attribute with boolean data that shows whether > > > > custom fan > > > >  > curves are used would be enough. > > > > > > > >  The path /sys/devices/platform/asus-nb- > > > > wmi/active_fan_curve_profiles > > > >  should be usable like this? I added this as the method for > > > >  controlling > > > >  which fan curves for which profiles are active. > > > > > > > >  If empty, then no custom fan curves are active at all. If it > > > > contains > > > >  any combination of strings "quiet, balanced, performance" then > > > > those > > > >  associated (named) platform_profiles have an active fan curve > > > > and you > > > >  can throw up a general warning, maybe add the contents of that > > > > file > > > >  too? > > > > > > That works for me, although I would probably have preferred a way > > > that > > > wasn't specific to the asus-wmi module, I'm sure I can made do > > > with > > > that. > > > > Oh I see, you were looking to get a more general solution > > implemented? Maybe something like "/sys/devices/platform/asus-nb- > > wmi/platform_profile_tainted"? This could be an opportunity to > > maybe make a standardised naming scheme for it. > > That would standardize the name, but not the location (path to the > name); > so I'm not sure how helpful that would be. I think that for now > going with /sys/devices/platform/asus-nb- > wmi/active_fan_curve_profiles is fine > and if we hit the same situation with a 2nd driver then maybe do > something under the /sys/firmware/acpi/platform_profile* namespace. > > Maybe something like: > > /sys/firmware/acpi/platform_profile_flags or something which can > communicate a bunch of 0 (keyword not present) / 1 values > by containing a list of space separated keywords like: > "custom-fan-profiles", where "custom-fan-profiles" would only > show up when they are activated ? That would work for me but let's wait until there's something to make more generic before doing it, as you mentioned.