Skip to content
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

All Intel CPU based boards: tweak cpufreq=xen:hwp related settings in an attempt to fix xen related powersave/imstability issues (enabled by default under QubesOS) #1693

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented May 29, 2024

WiP

Related to enforcing suggestions under QubesOS/qubes-issues#4604

Preliminary testing

It is enabled on R4.2 by default. It causes issues on some specific firmware only (afair some lenovo but not thinkpad)

Sorry for the noise.

…xen related powersave issues that is not enabled by default under QubesOS

Added by:
sed -i 's/\(export CONFIG_BOOT_KERNEL_ADD="\)\(.*\)\("\)/\1\2cpufreq=xen:hwp\3/' boards/*/*.config

And then reverting change manually on kgpe-d16 and Talos II

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion tlaurion self-assigned this May 29, 2024
@tlaurion tlaurion marked this pull request as draft May 29, 2024 20:04
@tlaurion tlaurion changed the title All Intel CPU based boards: add cpufreq=xen:hwp in an attempt to fix xen related powersave issues that is not enabled by default under QubesOS All Intel CPU based boards: add cpufreq=xen:hwp in an attempt to fix xen related powersave issues (not enabled by default under QubesOS) May 29, 2024
Copy link
Collaborator

@JonathonHall-Purism JonathonHall-Purism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlaurion Thanks for finding this.

Does it negatively impact non-Xen distributions?

For Qubes, it's not specifically related to Heads is it? I'm on the fence here because users/vendors could also enable it by adding it to grub.cfg. If there's any downside, we're preventing the user from changing it if we enable it in Heads, it is not easy to override CONFIG_BOOT_KERNEL_ADD. (Somebody on the thread said typing input was noticeably slower, haven't tested it myself yet.)

@@ -32,7 +32,7 @@ export CONFIG_TPM=y
export CONFIG_BOOTSCRIPT=/bin/gui-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on"
export CONFIG_BOOT_KERNEL_ADD="intel_iommu=oncpufreq=xen:hwp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a space assuming we go ahead with the change (thoughts in review summary)

@@ -89,7 +89,7 @@ export CONFIG_BOOTSCRIPT=/bin/gui-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_RECOVERY_SERIAL="/dev/ttyS0"
export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0"
export CONFIG_BOOT_KERNEL_ADD="console=ttyS0 console=tty systemd.zram=0cpufreq=xen:hwp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't apply to qemu boards does it? (If so it would need a space though.)

@tlaurion
Copy link
Collaborator Author

tlaurion commented May 30, 2024

Actually, cpufreq=xen:hwp is now default and if anything, might need to be deactivated for older boards through KERNEL_REMOVE instead, confirmed by @marmarek on chat (eg instability for some, like the x230 maybe?)

@JonathonHall-Purism let's remember that anything added under KERNEL_ADD will passthrough init if not kernel related and then initramfs of OSes need to take it into consideration to apply it or else dismiss it.

Therefore, this would impact Xen based distributions only, which for today is only QubesOS. Other OSes would not be impacted, just as we saw in past PR when some parameters reached init and then normally init will tell that some parameters were not applied before dismissing them.

@tlaurion tlaurion changed the title All Intel CPU based boards: add cpufreq=xen:hwp in an attempt to fix xen related powersave issues (not enabled by default under QubesOS) All Intel CPU based boards: tweak cpufreq=xen:hwp related settings in an attempt to fix xen related powersave/imstability issues (enabled by default under QubesOS) May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants