Zen 4/5 optimized Repository Testing

Hi together,

as some of you already know - we have worked on a Zen4 optimized repository.
This repository is aimed for Zen4 and Zen5 CPUs and we would like to start some public testing before it will be included as default in the auto detection of the installation process.
We have bought an additional server, which is based on a 7700 to not delay any other packages or equal.
The repository has been tested already by several people and several machines and it works pretty stable.

Following additional instruction set is applied compared to the x86-64-v4 target:

abm, adx, aes, avx512bf16, avx512bitalg, avx512ifma, avx512vbmi, avx512vbmi2, avx512vnni, avx512vpopctndq, clflushopt, clwb, clzero, fsgsbase, gfni, mwaitx, pclmul, pku. prfchw, rpdid, rdrnd, rdseed, sha, sse4a, vaes, vockmulqdq, wbnoinvd, savec, xsaveopt, xsaves

Also, the “scheduling” of the optimization is done for Zen4, which should also yield some more performance.

Instruction to change to this repository:

  1. Check support with gcc -march=native -Q --help=target 2>&1 | grep -Po "^\s+-march=\s+\K(\w+)\$", this should output “znver4” or “znver5” for support.
  2. Update the /etc/pacman.conf with changing cachyos-v4, cachyos-core-v4 and cachyos-extra-v4 to cachyos-znver4, cachyos-core-znver4, cachyos-extra-znver4. Here an example:
[cachyos-znver4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos-core-znver4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos-extra-znver4]
Include = /etc/pacman.d/cachyos-v4-mirrorlist
[cachyos]
Include = /etc/pacman.d/cachyos-mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
  1. Wipe the package cache with sudo pacman -Scc and confirm the deletion of cache and the database
  2. sudo pacman -Sy
  3. Reinstall all packages to get the Zen4 optimized packages with following command: pacman -Qqn | sudo pacman -S -
  4. Reboot the system

Feel free to report back in the #cachyos-repository channel.

8 Likes

Thanks, as a zen4 PC owner I love the initiative!
I didn’t do any benchmarks but it seems to work great.

1 Like

Glad to hear! This is mainly possible thanks to the community. The donation exceeded our monthly costs, so we wanted to bring something to the community and to cover all donations again.

4 Likes

My 7700x is happy to hear this!
I’d like to help out, but I’m an Arch noob and a little lost already. Is there value in someone like me trying some or all of this out right now or would I be more of a distraction to the team?

Well, we have internally and selected testers already tested it and did not found a issue.
Generally, it is important that nothing breaks from these optimizations.

Wow thank you team it has made cachyOS somehow even faster for me and my 7800X3D !

1 Like

Thank you very much for this. I wanted to install Timeshift and take a backup first before doing this but keep getting network errors (I tried changing my DNS to no avail):

Summary
(1/8) timeshift-24.01.1-1.1-x86_64
(2/8) vte3-0.76.1-1.2-x86_64
(3/8) xapp-2.8.2-2.1-x86_64
(4/8) cronie-1.7.2-1.1-x86_64
(5/8) vte-common-0.76.1-1.2-x86_64
xapp-2.8.2-2.1-x86_64.pkg.tar.zst failed to download 
vte3-0.76.1-1.2-x86_64.pkg.tar.zst failed to download 
timeshift-24.01.1-1.1-x86_64.pkg.tar.zst failed to download 
vte-common-0.76.1-1.2-x86_64.pkg.tar.zst failed to download 
cronie-1.7.2-1.1-x86_64.pkg.tar.zst failed to download[K 
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from mirror.fast0ne.com : The requested URL returned error: 404 
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from mirror.fast0ne.com : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from mirror.fast0ne.com : The requested URL returned error: 404 
warning: too many errors from mirror.fast0ne.com, skipping for the remainder of this transaction
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from mirror.fast0ne.com : The requested URL returned error: 404 
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from mirror.fast0ne.com : The requested URL returned error: 404 
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from cdn-1.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from cdn-1.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from cdn-1.cachyos.org : The requested URL returned error: 404 
warning: too many errors from cdn-1.cachyos.org, skipping for the remainder of this transaction
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from cdn-1.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from cdn-1.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from cdn.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from cdn.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from cdn.cachyos.org : The requested URL returned error: 404 
warning: too many errors from cdn.cachyos.org, skipping for the remainder of this transaction
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from cdn.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from cdn.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from mirror.albony.xyz : The requested URL returned error: 404 
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from mirror.albony.xyz : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from mirror.albony.xyz : The requested URL returned error: 404 
warning: too many errors from mirror.albony.xyz, skipping for the remainder of this transaction
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from mirror.albony.xyz : The requested URL returned error: 404 
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from mirror.albony.xyz : The requested URL returned error: 404 
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from kr.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from kr.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from kr.cachyos.org : The requested URL returned error: 404 
warning: too many errors from kr.cachyos.org, skipping for the remainder of this transaction
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from kr.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from kr.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from us.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from us.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from us.cachyos.org : The requested URL returned error: 404 
warning: too many errors from us.cachyos.org, skipping for the remainder of this transaction
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from us.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from us.cachyos.org : The requested URL returned error: 404 
error: failed retrieving file 'xapp-2.8.2-2.1-x86_64.pkg.tar.zst' from mirror.truenetwork.ru : The requested URL returned error: 404 
error: failed retrieving file 'vte3-0.76.1-1.2-x86_64.pkg.tar.zst' from mirror.truenetwork.ru : The requested URL returned error: 404 
error: failed retrieving file 'timeshift-24.01.1-1.1-x86_64.pkg.tar.zst' from mirror.truenetwork.ru : The requested URL returned error: 404 
warning: too many errors from mirror.truenetwork.ru, skipping for the remainder of this transaction
error: failed retrieving file 'vte-common-0.76.1-1.2-x86_64.pkg.tar.zst' from mirror.truenetwork.ru : The requested URL returned error: 404 
error: failed retrieving file 'cronie-1.7.2-1.1-x86_64.pkg.tar.zst' from mirror.truenetwork.ru : The requested URL returned error: 404 
warning: failed to retrieve some files 
error: failed to commit transaction (failed to retrieve some files) 
Errors occurred, no packages were upgraded.

Command finished with errors!

Won’t I get similar errors if I try to go ahead with instructions and reinstalling all repositories?
Thank you.

You might need to do sudo pacman -Sy before. Ive adjusted the guide above.

This is amazing! Everything runs perfectly on my zen4 laptop. CachyOS is undoubtedly my favorite among the nearly 20 GNU/Linux distributions I have tried. As a college student, I hope to have the opportunity to contribute to this incredible project in the future.
Love from China :heart:

1 Like

I get an invalid PGP signature error for « CachyOS admin@cachyos.org » on all of the packages.

After deleting the package cache (running all of the commands in the OP) and it failing on the PGP verification after downloading all of the packages, I have tried:

  1. sudo cachyos-rate-mirrors
  2. sudo pacman -Sy
  3. sudo pacman -S archlinux-keyring
  4. sudo pacman -S cachyos-keyring

The 2 keyrings get installed.

But updating to the zenver4 packages still doesn’t work.

1 Like

Works fine on my machine. No issues here.

Maybe you can try:

sudo rm -rf /etc/pacman.d/gnupg/
sudo pacman-key --init
sudo pacman-key --populate

sudo pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.com
sudo pacman-key --lsign-key F3B607488DB35A47
1 Like

sudo rm -f /var/cache/pacman/pkg/* fixed it.

It looks like yes | sudo pacman -Scc didn’t wipe all of the packages.

Because after running the commands from the OP it downloaded ~1140 packages, but verified and tried to install 1740 packages.

After sudo rm -f /var/cache/pacman/pkg/* it downloaded 1740.

So, yes | sudo pacman -Scc didn’t remove ~600 packages (including the linux-cachyos kernel, etc…).

I think I remember some x86_64_v4 getting installed during the past weeks. I am guessing these are probably (?) the 600 packages it didn’t download again.

ANYWAY: It works GREAT! Many Thanks!

Question:

The lto kernel isn’t available anymore since 6.9.3. Is this because it fails to build after 6.9.3, or have you perhaps removed it because (?) the new gcc is now better compared to the old llvm 17 from arch?

Great! Glad to hear.

The lto kernel isn’t available anymore since 6.9.3. Is this because it fails to build after 6.9.3, or have you perhaps removed it because (?) the new gcc is now better compared to the old llvm 17 from arch?

Pahole did break the llvm compilation, but weve pushed a fixed and LTO kernels are expected to be updated again with 6.9.6

1 Like

Ahhh… so this is perhaps also why handbrake-llvm-optimized (AUR) has been failing to build lately.

Thanks!

Unlikely, pahole is only for the kernel needed. :slight_smile:

Thank you this allowed me to install Timeshift however it cannot launch due to an error… I will make a separate topic for it…

Here can be also a fresh ISO found, which enables automatic detection for the Zen4 Repository:
https://mirror.cachyos.org/ISO/testing/

@MBK

Sadly, LTO Kernels are currently not compiling, if -march=znver* is set. This applies to all Zen -marches. I will look for a workaround.
I could compile it with -march=generic-v4, but then it could copy the lto kernels just from the cachyos-v4 repository, probably.

This issue should be fixed with llvm 19.

Thanks for the feedback.

Anyway, I think we need some new benchmarks to see what is better. Especially since the move to gcc 14 with znver vs the old llvm 17 with lto. So I’m happy to use the default kernel for the time being.

Well, everything worked fine. Until i start testing and breaking things.

No, just kidding. No issues from my side either so far.

1 Like