ec icon indicating copy to clipboard operation
ec copied to clipboard

[Feature Request] Un-hardcoded fan curves definable within OS

Open Raikiri opened this issue 3 years ago • 13 comments

Right now the only way of controlling the fan curves is by changing the hardcoded values in src/board/system76/oryp7/board.mk , recompiling, flashing, etc. It's not particularly user-friendly.

Is there a technical possibility of using a user-provided curve (somehow provided from inside OS) if it's available and use a hardcoded fan-curve as a fallback for all other cases?

I'm aware that there's an issue for pop-os https://github.com/pop-os/system76-acpi-dkms/issues/9 that requests practically that but for pop-os exclusively. I think this issue deserves to have a resolution for all platforms.

Raikiri avatar Jun 09 '21 10:06 Raikiri

Alternatively, if that's easier to implement, I'd be happy to edit them in bios too.

Raikiri avatar Jun 09 '21 15:06 Raikiri

@Raikiri

I'm aware that there's an issue for pop-os

It's not just for Pop!_OS. A sysfs interface would expose fan controls for all distros. OP even explicitly mentions that they are running Manjaro.

MilesBHuff avatar Jun 12 '21 03:06 MilesBHuff

@MilesBHuff "all distros" != "all os's" in this case "issue for pop os" assumes "issue on pop os issue tracker"

Raikiri avatar Jun 12 '21 06:06 Raikiri

That is true. But I believe System76 recommends the proprietary BIOS when switching to Windows. If so, that's a non-starter. And who would put OSX on a Sys76 computer? That just leaves edge cases, like BSD.

MilesBHuff avatar Jun 12 '21 07:06 MilesBHuff

i don't remember any recommendation related to using proprietary firmware with windows

Raikiri avatar Jun 12 '21 09:06 Raikiri

It seems I may be mistaken. I thought I'd read that in a System76 support article; but I am unable to find anything of the sort at the moment.

MilesBHuff avatar Jun 12 '21 17:06 MilesBHuff

I would love to have a fan curve config file!

internalfx avatar Oct 01 '21 20:10 internalfx

That would be a great feature to have. I am having trouble with the current configuration of the fan curve and it would make my life much easier to have access to config files

CourchesneA avatar Oct 11 '21 12:10 CourchesneA

I'd also like to see this feature. The hardcoded fan curve settings for oryp8 are awful, and cause my fan to constantly flicker on and off around the 55 degree threshold during normal use. I'm not able to modify the curve and flash the firmware because I'm using NixOS and can't build the firmware successfully with cargo.

iburzynski avatar Jan 25 '24 18:01 iburzynski

@iburzynski

The hardcoded fan curve settings for oryp8 are awful, and cause my fan to constantly flicker on and off around the 55 degree threshold during normal use.

They're just as bad on oryp7. I have much better fan settings here, but System76 refuses to adopt anything like them: https://github.com/system76/ec/pull/179

I'm not able to modify the curve and flash the firmware because I'm using NixOS and can't build the firmware successfully with cargo.

You don't need to build the entirety of the firmware; you only need to flash the ec, which is much easier.

MilesBHuff avatar Feb 07 '24 19:02 MilesBHuff

We're not refusing anything. If we were, we would have closed your PR. We just haven't had time to test it yet.

leviport avatar Feb 07 '24 19:02 leviport

@MilesBHuff

but System76 refuses to adopt anything like them: https://github.com/system76/ec/pull/179

It's been just 3 years, give them some time.

Raikiri avatar Feb 08 '24 05:02 Raikiri

Fans should only run when system is in S0, so possible solution to move the fan table from EC flash to system flash:

  • Rewrite EC fan logic to only implement the mechanism for accessing duty/RPM value
    • Probably have EC turn on fans with some non-zero value in case firmware hangs
  • Rewrite coreboot+EC ACPI access for writing the target values
  • Implement edk2 driver+lib that reads/writes fan data in system NVRAM space (SMMSTORE) and controls fans through ACPI methods
  • Implement edk2 app :vomiting_face: or system app that allows modifying the NVRAM data
  • Update system76-acpi for sysfs access

There probably needs to be an "auto/manual" fan mode" setting in this to allow switching between firmware controlled fan points and writing ACPI/sysfs values from a system application.

crawfxrd avatar May 13 '24 17:05 crawfxrd