From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f177.google.com (mail-dy1-f177.google.com [74.125.82.177]) (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 55CE03AEB5D for ; Tue, 12 May 2026 15:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778598884; cv=none; b=eOjHEYBusQV5uMlSbv3ODeksZ5MGukYR/0Z6/rbBBFLXevpXDJrjbsSs3QbwI6GLCOrl72VfssxRAdUyDtJRB+z2huYqOV3YDPwL8RQsihNM8DTgZqsn0D2f1EdmW8OPQ+0CxUJdpa7rj7bnmvJUY4mgQtWi9FDt/RF7ex/8jDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778598884; c=relaxed/simple; bh=+ISAD2AXoO6YZBg+GF0shNCMYFjbxBpDGdGY8+knDMI=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=tIiNfax4rKrleedQxItRJOD3waTaCuNENhhG9PWC+zG2zQ6b1rLGYtCW99xj/1WS9fGvZLMmqpQPhZKkLYt4MVfeAb2ssH7p8koTEyEGpGi+QhOQL7ikhGJLNzhwWZiPCNY+VlRG3Wg4htK1nWOqjclDkhHVqQ1eMwZXhINpW4c= 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=F2yJQgHA; arc=none smtp.client-ip=74.125.82.177 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F2yJQgHA" Received: by mail-dy1-f177.google.com with SMTP id 5a478bee46e88-2f36da5c8fbso5552664eec.0 for ; Tue, 12 May 2026 08:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778598882; x=1779203682; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=SHn1yqg/UiE28tkXt42cYV8RLNNyeHXsTAHsG4ZY05Q=; b=F2yJQgHAEswlAwtfTvF+gCi+Z7UwZGo7ZyZVW7tUP2d6HVYaZXM57K3ZkddlZCEBZx zJSnpTCAEBDwXPCncsc4reL+rYc7rE8SlAq7tTEtCAD5efhfNXzKOmQD7bKYiiuitoC6 DCfxepMzrYeM9BDrTES6B3c0r3sOJsJeNJV4V3WzrnNA/Dzj4EuZzeWYmJHH4Vq3ZMC3 +uG+Il6t0hmyF2kOtPxoW0bVl1tZ4gRz0yQBOW5M8Oo0eZxva5F3HKlFD4P9Gyy8d8Uf u7P5/J+gk0c3OPeNW1lBtqv+8WIsnzMNMAxeuN7iJMrMo+w8o/kfOqQBtNAEVXNhHcvU td6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778598882; x=1779203682; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SHn1yqg/UiE28tkXt42cYV8RLNNyeHXsTAHsG4ZY05Q=; b=ZlQVnrGULP0sRVmjRviXf/cE2yltO/rT/Bc/vIqD6hg4pDOKOXzycNFQQ3h7EqkW9o ImOsEE4UrxwlU4Y1U5gny9j75rM7G1L+NSFxtPox+u4um44+qUI/BXG4Esufu9KYQAGd M+gW+pv1v3rpnyKY+ADV24Hn3bAVmnRv1Z+rhGa0RPWV77Rxrf0Z9VyL8drWcg1izYN/ jCoKH3pOOCg1y8WlBohDgqSYF1djhviWoK9NkjVui30lTSCZaI2B3Oo/nBhs+VJgff4b PAZGMrjNRn3gh9IQ3l08OPBJQMZJSZn0aut1jB3jnURZ9rejPxgvqZf2c3BQXtEoTefk jPww== X-Forwarded-Encrypted: i=1; AFNElJ9mNCyTQ1IGlWI1lXzBayP8Tq567sLquBbXObqjBuKjCe8UpLAGW65s1Y+D0yNSgCORvnAAhyiI/Wi61Io=@vger.kernel.org X-Gm-Message-State: AOJu0YzjXc31OkknF5/uzEkPBQgo6udcCmQ/uWa6ixSSbrZD2hE5w0Y/ 5C975jdALJjwqO2vH9t0hCEvd8e/NA/adGBNGHyfPrkGt7vs112QYwSq X-Gm-Gg: Acq92OF31V3IyRcvTNp/pXYsgXsQUsGUJRo+65Wl0Huj+YvNTO4/tUE0LPsnqVz0nlL UBE0gXbnY+lT17zhvTrnvg+FmEq1qYG7DAPKOgILxKg4f4aWtQx0bIqTJe0bNa8G7qrc0buYVQK OY0CLta1jtmIhs3ufWrEC6F+11SeTwlsksweFnrxoy7K0dqsIOIinFOYFEdarIiUBkhLmzseGo0 ApbYOIdrtddo0YYZ0Db/7U7xx3SuyqOKwDgg9bvFxmeyNTe92S7wZ6ezz9WSsW8unMXA+wqiLaq QNV6lPsWxzv+gInXXlCTeug7tWAZ7/NDbxO8MT12OqoSgKxYmGuf/8Tz0sHmn7dbFEE8ZCsL562 qrg9LBk1e22rOPRr4dWPxvrqqrpL1qCcKrP9quVQn6m5ow2a7e4bhnlStFOElkFVSvL2EPBZdsv tQ6MOb9/ZI/9jGL/u23O6yWLHV6U2O3MlK0MJRWWG0mCs= X-Received: by 2002:a05:7301:4601:b0:2fc:9aa8:83da with SMTP id 5a478bee46e88-2fc9aa88c76mr4296780eec.29.1778598882219; Tue, 12 May 2026 08:14:42 -0700 (PDT) Received: from ehlo.thunderbird.net ([2607:fb90:8b60:89af:ad3:e552:812a:cc1f]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2f8862d43b4sm17788583eec.11.2026.05.12.08.14.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 May 2026 08:14:41 -0700 (PDT) Date: Tue, 12 May 2026 08:14:31 -0700 From: "Derek J. Clark" To: Ahmed Yaseen , platform-driver-x86@vger.kernel.org CC: yaseen@ghoul.dev, corentin.chary@gmail.com, luke@ljones.dev, denis.benato@linux.dev, hansg@kernel.org, ilpo.jarvinen@linux.intel.com, prasanth.ksr@dell.com, mpearson-lenovo@squebb.ca, Dell.Client.Kernel@dell.com, linux-kernel@vger.kernel.org, asus-linux@lists.linux.dev, mario.limonciello@amd.com Subject: Re: [PATCH 0/2] asus-armoury: gate PPT writes on active fan curves User-Agent: Thunderbird for Android In-Reply-To: <20260511061901.907540-1-yaseen@ghoul.dev> References: <20260511061901.907540-1-yaseen@ghoul.dev> Message-ID: <79556116-6362-4C2B-ADBA-00A325D79CB5@gmail.com> 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-Transfer-Encoding: quoted-printable On May 10, 2026 11:19:14 PM PDT, Ahmed Yaseen wrote: >My first kernel patch series, posted in agreement with Denis Benato (Cc'd= )=2E > >On 28 ASUS ROG laptop models flagged with requires_fan_curve in the >asus-armoury DMI power_data table, the BIOS ACPI method SPLX silently >discards Package Power Tracking (PPT) writes unless the fan mode is >set to Manual (FANM=3D4)=2E FANM is set to 4 by the DEFC method when a >custom fan curve is written=2E Until then, the WMI DEVS call returns >success but the firmware ignores the value, so userspace sees no >effect from writes to ppt_pl1_spl, ppt_pl2_sppt, ppt_pl3_fppt, >ppt_apu_sppt or ppt_platform_sppt=2E > This very nearly touches on an issue that has been present in the asus_arm= oury driver for a while, and presents a possible avenue to correct it=2E Wh= en originally adding PPT adjustments it was discussed that doing so should = be gated under the "custom" platform profile [1]=2E This was simple to do f= or the Lenovo WMI drivers because that interface includes a BIOS custom mod= e and requires it to be set for PPT settings to take effect=2E This soft "r= equirement" was missed when asus_armoury was accepted, and it currently all= ows PPT settings to override manufacturer intent=2E Please correct me if I'= m wrong, but I believe the fan curves associated in BIOS for low-power, bal= anced, and performance will not automatically adjust if a user changes the = TDP outside of the window=2E I=2Ee=2E setting low power and then maximum SP= L would leave the fans in a quiet mode=2E Since some devices require this bit to be set, it seems like a good opport= unity to gate the platform profile under custom, and use custom to set the = performance mode and this bit, then allow userspace to set the curve and pp= t values=2E Adding Mario to CC for his SA/comments on this proposal=2E - Derek 1: https://lore=2Ekernel=2Eorg/platform-driver-x86/20241206031918=2E1537-1= 7-mario=2Elimonciello@amd=2Ecom/ >The requires_fan_curve flag has existed in the per-model power_data >entries for some time but was never read=2E This series wires it up: > > Patch 1: Adds the actual gate=2E Exports > asus_wmi_custom_fan_curve_is_enabled() from asus-wmi so > asus-armoury can query fan-curve state across module boundaries, > and returns -ENODEV with a pr_warn() from the PPT write path on > affected models when no fan curve is active=2E > > Patch 2: Exposes the same flag to userspace as a read-only sysfs > attribute (requires_fan_curve) so tools like asusctl and rogcc > can surface the prerequisite to the user before issuing PPT > writes=2E Documented in > Documentation/ABI/testing/sysfs-class-firmware-attributes=2E > >Testing: > Verified on G835LW (ROG Strix SCAR 18 2025, requires_fan_curve=3Dtrue): > - With no fan curve active, writes to ppt_pl1_spl return -ENODEV > and the cached value is unchanged=2E > - With pwm1_enable=3D1 on /sys/class/hwmon/=2E=2E=2E/asus_custom_fan_cu= rve, > PPT writes succeed and readback matches=2E > - The pr_warn fires exactly once per rejected write=2E > > I do not have access to the other 27 affected models=2E Testers from > any of these would be appreciated: FX507VI, FX507VV, FX507Z, > GA402X, GA403UI, GA403UV, GA403WM, GA403WR, GA403WW, GA605W, > GU605CR, GU605CW, GU605CX, GU605M, G513I, G513QM, G513QY, G513R, > G614J, G615LR, G634J, G713PV, G733C, G733P, G814J, G834J, G835LR=2E > >Ahmed Yaseen (2): > platform/x86: asus-armoury: gate PPT writes behind active fan curve > platform/x86: asus-armoury: expose requires_fan_curve via sysfs > > =2E=2E=2E/testing/sysfs-class-firmware-attributes | 25 +++++++++++++ > drivers/platform/x86/asus-armoury=2Ec | 35 +++++++++++++++++++ > drivers/platform/x86/asus-wmi=2Ec | 28 +++++++++++++++ > include/linux/platform_data/x86/asus-wmi=2Eh | 5 +++ > 4 files changed, 93 insertions(+) >