-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable uclamp
configs to save oodles of battery life and update some kernel configs
#5
Conversation
@@ -185,6 +186,7 @@ CONFIG_FAIR_GROUP_SCHED=y | |||
CONFIG_CFS_BANDWIDTH=y | |||
# CONFIG_RT_GROUP_SCHED is not set | |||
CONFIG_SCHED_MM_CID=y | |||
CONFIG_UCLAMP_TASK_GROUP=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above three enable uclamp, just like Fedora and ubuntu does:
- https://copr-dist-git.fedorainfracloud.org/cgit/@asahi/kernel/kernel.git/tree/kernel-aarch64-16k-fedora.config?h=f40#n8953
- https://github.com/UbuntuAsahi/linux/blob/master/debian.master/config/annotations#L14138-L14140
Also recommended in the wiki:
CONFIG_RUSTC_LLVM_VERSION_TEXT="17.0.6" | ||
CONFIG_BINDGEN_VERSION_TEXT="bindgen 0.65.1" | ||
CONFIG_BINDGEN_VERSION_TEXT="bindgen 0.69.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two text values changed automatically by make menuconfig
.
@joske Should we keep it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not matter much, it's only informational
@@ -750,8 +752,7 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y | |||
# end of GCOV-based kernel profiling | |||
|
|||
CONFIG_HAVE_GCC_PLUGINS=y | |||
CONFIG_GCC_PLUGINS=y | |||
# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set | |||
# CONFIG_GCC_PLUGINS is not set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wiki says not to set CONFIG_GCC_PLUGINS
:
Also not set in Fedora and Ubuntu:
@@ -2692,7 +2693,7 @@ CONFIG_SWPHY=y | |||
CONFIG_LED_TRIGGER_PHY=y | |||
CONFIG_PHYLIB_LEDS=y | |||
CONFIG_FIXED_PHY=y | |||
# CONFIG_RUST_PHYLIB_ABSTRACTIONS is not set | |||
CONFIG_RUST_PHYLIB_ABSTRACTIONS=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already mentiond in the initial commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not mentioned in the wiki, but if fedora and ubuntu do this, let's add it too
@@ -3149,7 +3151,80 @@ CONFIG_TABLET_USB_HANWANG=m | |||
CONFIG_TABLET_USB_KBTAB=m | |||
CONFIG_TABLET_USB_PEGASUS=m | |||
# CONFIG_TABLET_SERIAL_WACOM4 is not set | |||
# CONFIG_INPUT_TOUCHSCREEN is not set | |||
CONFIG_INPUT_TOUCHSCREEN=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for CONFIG_TOUCHSCREEN_APPLE_Z2
# CONFIG_TOUCHSCREEN_ADS7846 is not set | ||
# CONFIG_TOUCHSCREEN_AD7877 is not set | ||
# CONFIG_TOUCHSCREEN_AD7879 is not set | ||
CONFIG_TOUCHSCREEN_APPLE_Z2=m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend in the wiki and build as module in Fedora and Asahi as well:
@@ -4920,6 +4995,7 @@ CONFIG_VIDEO_CMDLINE=y | |||
CONFIG_VIDEO_NOMODESET=y | |||
# CONFIG_AUXDISPLAY is not set | |||
CONFIG_DRM=y | |||
CONFIG_DRM_MIPI_DSI=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was enabled as dependency automatically... Also enabled by ubuntu anyway:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks unnecessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -5078,7 +5211,7 @@ CONFIG_DRM_SIMPLEDRM=y | |||
# CONFIG_DRM_LIMA is not set | |||
# CONFIG_DRM_PANFROST is not set | |||
# CONFIG_DRM_TIDSS is not set | |||
# CONFIG_DRM_ADP is not set | |||
CONFIG_DRM_ADP=m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommended by wiki and enabled in Fedora and Ubuntu:
@@ -5741,7 +5874,7 @@ CONFIG_USB_MON=m | |||
CONFIG_USB_XHCI_HCD=m | |||
# CONFIG_USB_XHCI_DBGCAP is not set | |||
CONFIG_USB_XHCI_PCI=m | |||
# CONFIG_USB_XHCI_PCI_RENESAS is not set | |||
CONFIG_USB_XHCI_PCI_RENESAS=y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again recommended in wiki and enabled in Fedora and Ubuntu
@@ -6826,7 +6959,7 @@ CONFIG_MULTIPLEXER=m | |||
# | |||
# CONFIG_MUX_ADG792A is not set | |||
# CONFIG_MUX_ADGS1408 is not set | |||
# CONFIG_MUX_APPLE_DPXBAR is not set | |||
CONFIG_MUX_APPLE_DPXBAR=m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again recommended in wiki and enabled in Fedora and Ubuntu
@mkurz Thanks for taking the time to go over this! Can you sign off your commits please? This may be handy 😉 https://stackoverflow.com/questions/13043357/git-sign-off-previous-commits |
Signed-off-by: Matthias Kurz <m.kurz@irregular.at>
Signed-off-by: Matthias Kurz <m.kurz@irregular.at>
Signed-off-by: Matthias Kurz <m.kurz@irregular.at>
8f63b1d
to
ec3213d
Compare
|
If you are building a general arm64 16k kernel for Arch Linux ARM intended to be bootable on any arm64 16k hardware (much like how Fedora does it), you will want to build as many Asahi configuration options as modules as you can. If you are building a kernel that's only ever intended to run on Apple Silicon Macs, I think it makes a lot more sense to build more of the Asahi code into the kernel image directly. My kernel config recommendations on the Asahi wiki reflect this opinion. |
First commit:
Enables uclamp, which is necessary that
speakersafetd
will be "pushed" to the e (efficiency) cpu cores, which safes lots of battery (you feel the difference). I got that hint from this chat log:Then I remembered I did read about that somewhere... which was the Asahi Blog entry here 😉 (also marcan wrote about it)
E.g., currently, when
speakersafetd
starts up you get following error:With uclamp enabled
speakersafetd
works correctly:Precious battery life saved! 🚀
See:
Second commit:
Updates some configs according to wiki and Fedora config:
It seems the wiki recommends to include most configs instead of building them as module. @joske This is up to you, please review if we should keep the configs modules or not.
I will comment separately on configs which have not been enabled yet.
Third commit:
I saw that
CONFIG_RUST_PHYLIB_ABSTRACTIONS
is enabled in both the Fedora and the Ubuntu kernel, so I thought because this is rust related maybe we should enable it too?What do you think?
Of course I tested this config on my MacBook Pro (14-inch, M1 Pro, 2021) (J314sAP) and it works.
BTW:
While working on this I found out the asahi wiki page is not up to date for the 6.8 kernel config: