lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65260602-a1f4-fc8a-a823-ca5a6e4fca60@redhat.com>
Date:   Mon, 23 Aug 2021 13:45:49 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Luke Jones <luke@...nes.dev>, Bastien Nocera <hadess@...ess.net>
Cc:     linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v4 1/1] asus-wmi: Add support for custom fan curves

Hi,

On 8/23/21 1:26 PM, Luke Jones wrote:
> 
> 
> On Mon, Aug 23 2021 at 12:28:21 +0200, Bastien Nocera <hadess@...ess.net> 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
>>>  <hadess@...ess.net> 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
>>>  > >  <hadess@...ess.net> 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 ?

Regards,

Hans



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ