Open johnbchron opened 2 weeks ago
I've been using this fork from @zzywysm, which has had Vulkan support for a couple of weeks. It also includes several noticeable performance improvements which could not be upstreamed, notably:
It has been pretty much plug and play after I updated my CPU features list to the M2's. Boot times are decreased and I've noticed longer battery life, so until @tpwrules adds Vulkan support I recommend trying it! It should be clear how to add Honeykrisp to the kernel from looking at that repo.
There is also the separate, and more difficult, issue of how to package Fedora's userspace microvm/FEX/WINE/DXVK stack--I have been struggling to get this to work. Right now only running (a specific version of) Steam is supported and my impression is that it still fairly buggy, so it might make sense to wait until it is in a less-alpha state to consider packaging.
@waltmck How did you packaged MicroVM/FEX/WINE/DXVK? I've looked to the fork you mentioned, but I've not found it. I've also looked at your fork and your config. We can package that stack in this repo using something like ...wineSupport.enable to enable that microVM
@matteocavestri Nothing you listed is packaged. Those have nothing to do with vulkan support.
@rowanG077 I know it, but @waltmck spoke about that stack and It could be interesting to adopt here since fedora asahi remix have packaged that.
@matteocavestri I haven't tried packaging "the right way" with Nix, but should be possible to get working in a Fedora distrobox with their packaging (and I managed to run Steam with FEX and the microvm this way). However, I haven't had time to figure out why mesa drivers are not visible inside of the container (I tried symlinking in several different files from the Nix store but glxinfo -B
still fails to load Honeykrisp and falls back to llvmpipe
).
I’ve tried zzywysm’s fork but the Vulkan driver is not loading at all, even on native programs. Do I need to configure something ? I am on unstable using hyprland without flakes.
You can also try my fork, vulkan works perfectly (e.g zeditor now runs). Contrary to zzywysm, I have not changed anything from tpwrules repository, except mesa & kernel.
Thank you Oliver. I was actually using your fork before ;) but had the same issue. I’m on a m2 air. Should I change anything in my config?
hardware.asahi = {
withRust = true;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "replace";
setupAsahiSound = true;
};
hardware.asahi.peripheralFirmwareDirectory = ./firmware;
boot = {
consoleLogLevel = 0;
kernelParams = [ "apple_dcp.show_notch=1" ];
};
What problem do you have? This looks fine. If you want to try vulkan you can run vkgears -info
mpv fail to load the vulkan decoder, zeditor does not open, it’s as if there is no vulkan driver.
My EFI stub for asahi is macOS 13.5
but i’m on 15.0.1
on the macOS partition. Could it be the reason?
Also does vkgears looks good?
I can compare once I am home. My efi stub is from a similar time. I assume you're on Wayland, not in xorg? I am using gnome as compositor.
Thank you for taking the time. I’m using Hyprland v0.44.1-b (Wayland). Could be a bug with Hyprland.
The vkgears output is exactly the same, except mine is a m1 pro, not a m2. I will push an update to nixpkgs & kernel soonish, maybe that helps.
Updated the fork to use nixpkgs 41dea55321e5a999b17033296ac05fe8a8b5a257
as well as the most recent kernel.
thank you i successfully updated, in the meantime I found the issue! https://github.com/hyprwm/Hyprland/issues/8158#issuecomment-2422189625 this is needed for honeykrisp to load in hyprland:
render {
explicit_sync = 0
}
Thanks for helping, without you i assumed there was something wrong with my nix config and didn’t thought i had to tweak some obscure option in hyprland.
@matteocavestri I haven't tried packaging "the right way" with Nix, but should be possible to get working in a Fedora distrobox with their packaging (and I managed to run Steam with FEX and the microvm this way). However, I haven't had time to figure out why mesa drivers are not visible inside of the container (I tried symlinking in several different files from the Nix store but
glxinfo -B
still fails to load Honeykrisp and falls back tollvmpipe
).
@waltmck To use Vulkan, you need to use the Asahi Mesa drivers within the Fedora container. I've tested this with fedora:40
and fedora:rawhide
, and it works without issues. I wrote a bash script because some parameters need to be modified from the default Copr repo to install the multilib x86_64 and i386 drivers:
#!/bin/bash
sudo dnf upgrade --refresh
sudo dnf install 'dnf-command(copr)'
# Asahi Mesa (Optional: Change the filename according to your release)
cat <<EOF | sudo tee /etc/yum.repos.d/group_asahi-mesa-fedora-rawhide.repo > /dev/null
[copr:copr.fedorainfracloud.org:group_asahi:mesa]
name=Copr repo for mesa owned by @asahi
baseurl=https://download.copr.fedorainfracloud.org/results/@asahi/mesa/fedora-\$releasever-\$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/@asahi/mesa/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
EOF
# Asahi Mesa x86_64 & i386 (Optional: Change the filename according to your release)
cat <<EOF | sudo tee /etc/yum.repos.d/group_asahi-mesa-fedora-rawhide-x86.repo > /dev/null
[copr:copr.fedorainfracloud.org:group_asahi:mesa:x86_64]
name=Copr repo for mesa owned by @asahi (x86_64)
baseurl=https://download.copr.fedorainfracloud.org/results/@asahi/mesa/fedora-\$releasever-x86_64/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/@asahi/mesa/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
[copr:copr.fedorainfracloud.org:group_asahi:mesa:ml]
name=Copr repo for mesa owned by @asahi (i386)
baseurl=https://download.copr.fedorainfracloud.org/results/@asahi/mesa/fedora-\$releasever-i386/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/@asahi/mesa/pubkey.gpg
repo_gpgcheck=0
cost=1100
enabled=1
enabled_metadata=1
EOF
# Enable Asahi Steam Repository
sudo dnf copr enable @asahi/steam
sudo dnf upgrade --refresh
# Install Steam
sudo dnf install steam
This setup provides working Mesa drivers and the Asahi-packaged version of Steam. If it helps, I also have benchmark comparisons between vkmark
and glmark2
on the host and within Distrobox (macmini 2020 M1 8GB):
Host | Distrobox | |
---|---|---|
glmark2 |
4597 | 3895 |
vkmark |
5773 | 5429 |
The only remaining issue is linking libc.so.6
within the microVM and FEX to launch Steam. Maybe you've already managed to address this, as you've previously mentioned. Log for reference:
bin_steam.sh[276]: Setting up Steam content in /home/matteocavestri/Container/distrobox/fedora-steam-test/.local/share/Steam
steam.sh[276]: Running Steam on fedora 40 64-bit
steam.sh[276]: STEAM_RUNTIME is enabled automatically
setup.sh[360]: Updating Steam runtime environment...
100%
/home/matteocavestri/Container/distrobox/fedora-steam-test/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh: line 85: steam-runtime-identify-library-abi: command not found
run.sh[3185]: steam-runtime-identify-library-abi --ldconfig-paths failed, falling back to ldconfig
steam.sh[276]: Couldn't find /home/matteocavestri/Container/distrobox/fedora-steam-test/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/srt-logger, logging to console-linux.txt
steam.sh[276]: Error: You are missing the following 32-bit libraries, and Steam may not run:
libc.so.6
Error:
You are missing the following 32-bit libraries, and Steam may not run:
libc.so.6
P.S. I know this discussion focuses on Vulkan, but since it’s somewhat resolved, this thread seems quite relevant to Vulkan support, especially as it’s been promoted by the Asahi community.
HoneyKrisp is released, so I was wondering what steps need to be taken to port this over here, and what I can do to help.
My knowledge of this is pretty much "we need to update our mesa branch and update some kernel flags or smth, right?" so I don't know much, but I am very willing to help.