tpwrules / nixos-apple-silicon

Resources to install NixOS bare metal on Apple Silicon Macs
MIT License
742 stars 73 forks source link

Update to latest FEDORA ASAHI REMIX linux kernel config. #162

Closed liarokapisv closed 4 months ago

liarokapisv commented 4 months ago

It appears that the kernel config does not include the latest kernel config updates that among other things fix some issues with the energy aware scheduling.

I think the only relevant options are:

CONFIG_UCLAMP_TASK=y
CONFIG_UCLAMP_TASK_GROUP=y
CONFIG_UCLAMP_BUCKETS_COUNT=5
zzywysm commented 4 months ago

This is a fools' errand. This project has been hostile to kernel changes for a very long time.

https://github.com/tpwrules/nixos-apple-silicon/pull/33 https://github.com/tpwrules/nixos-apple-silicon/pull/113 https://github.com/tpwrules/nixos-apple-silicon/pull/134

liarokapisv commented 4 months ago

I think these changes are more in line with @tpwrules 's maintenance policy. I basically did what they usually do and just git diffed the redhat/config directory from the fedora-asahi repo, so they just follow upstream. Anecdotally, these changes increased my pipewire setup 's battery life by 30-40% or so.

vs49688 commented 4 months ago

I was wondering when someone would bring this up, missing uclamp support's been bugging me for a while.

This is what I've been using in the meantime:

  boot.kernelPatches = [
    {
      name = "asahi-uclamp";
      patch = null;
      extraConfig = ''
        UCLAMP_BUCKETS_COUNT 5
        UCLAMP_TASK_GROUP y
        UCLAMP_TASK y
      '';
    }
  ];
liarokapisv commented 4 months ago

Same thing here pretty much identical.

diegobfernandez commented 4 months ago

Wow, copied the config to my M1 Pro and I got a very nice battery boost. Thanks a lot 🙏

It seems idling or low power tasks demand much less from the CPU, no visual performance impact.

If there are some reason not to merge these configs it would be nice to have that behind an option in the module.

tpwrules commented 4 months ago

Apologies for missing this, my diff didn't catch it. These options will be in the next release.

zzywysm commented 4 months ago

Apologies for missing this, my diff didn't catch it. These options will be in the next release.

Technically you missed this when I proposed the exact same config changes on December 27 in pull request 134:

https://github.com/tpwrules/nixos-apple-silicon/pull/134/commits/43ebc3b32e3a0b1cf37fc78404f19cba561b888f