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

mesa-asahi: Desktop environment fails to load due to outdated vendor configuration. #261

Open
foldfree opened this issue Dec 31, 2024 · 11 comments

Comments

@foldfree
Copy link

foldfree commented Dec 31, 2024

Using Cosmic DE on a macbook air m2. Any graphics fails to load completely after updating from this commit.

I went asking for help to the cosmic flake maintainer and got this feedback:

vendor/default.nix looks rather out of date with nixpkgs mesa derivation and should be updated there.

She pointed out this commit as a reference: NixOS/nixpkgs@09cbcd6#diff-630909e9824dc40d9fef6c4c8b149321677e270d5be823fafd370baac098e408R306

@givtrah
Copy link

givtrah commented Dec 31, 2024

Same issue, just with KDE Plasma. SDDM fails to show, but I get a "[ OK ] Reached target Graphical Interface", but it never shows.

I have no idea how to bug fix this, dmesg shows nothing, sddm log show nothing, where do I begin?

@tpwrules
Copy link
Owner

tpwrules commented Jan 1, 2025

There was just a major change in how Mesa works in upstream unstable nixpkgs. I've had some discussion with them and will implement fixes in a bit.

@givtrah
Copy link

givtrah commented Jan 1, 2025

Awesome. I've had smooth sailing with your Asahi implementation on Nix so far, thanks for the good work!

@Isolaryn
Copy link

Isolaryn commented Jan 3, 2025

@tpwrules Is there a link to this upstream conversation/issue?

@marcusramberg
Copy link

Very hacky and not fit for a PR, but I managed to get mesa-asahi-edge built against the current version from nixpkgs-unstable here which works https://github.com/marcusramberg/nixos-apple-silicon/tree/mesa in case someone needs a temp fix until a proper one is released.

@marcusramberg
Copy link

Btw didn't 24.3 add support for the asahi driver? (https://www.altusintel.com/public-yycr5j/) so if NixOS/nixpkgs#371771 got merged it might be easier to override the upstream directly (nix-build --expr '((import ./. {}).pkgs.mesa.override { galliumDrivers = [ "llvmpipe" "radeonsi" "svga" "asahi" ]; vulkanDrivers = [ "asahi" "swrast" ]; }).drivers') on that PR builds on asahi for me and seems to include the ashi drivers in the result.

@darbster145
Copy link

I am getting this error when I use @marcusramberg fix. Is this related?

error: builder for '/nix/store/l0c7cvzc7hia9ln8pgp5fhfbb7fmrhgh-systemd-256.8.drv' failed with exit code 1;
       last 25 log lines:
       > applying patch /nix/store/fxyjp0r9qrfh0vl3vdrcjvf443db9zqs-0015-tpm2_context_init-fix-driver-name-checking.patch
       > patching file src/shared/tpm2-util.c
       > Hunk #1 succeeded at 685 with fuzz 1 (offset 15 lines).
       > applying patch /nix/store/bavm3w9dyzgjf38lwh3mbv2yykzfp2bq-0016-systemctl-edit-suggest-systemdctl-edit-runtime-on-sy.patch
       > patching file src/systemctl/systemctl-edit.c
       > applying patch /nix/store/cwg5gzh8dfdpwlgmsvvi23ad57hj7z5g-0017-meson.build-do-not-create-systemdstatedir.patch
       > patching file meson.build
       > Hunk #1 succeeded at 2733 (offset 81 lines).
       > applying patch /nix/store/k7h45911k5xgn8rhhclpp01bskd597vc-f8b02a56febf14adf2474875a1b6625f1f346a6f.patch?full_index=1
       > patching file src/boot/bootctl-install.c
       > Hunk #1 succeeded at 319 (offset 1 line).
       > Hunk #2 succeeded at 372 (offset 1 line).
       > Hunk #3 succeeded at 846 (offset 1 line).
       > patching file src/boot/bootctl-status.c
       > Hunk #1 succeeded at 188 (offset 1 line).
       > Hunk #2 succeeded at 214 (offset 1 line).
       > Hunk #3 succeeded at 273 (offset 1 line).
       > applying patch /nix/store/vr1sjz9rswr3xjnhd81pxj74id3rxihi-0018-timesyncd-disable-NSCD-when-DNSSEC-validation-is-dis.patch
       > patching file src/timesync/timesyncd.c
       > applying patch /nix/store/xvkm9kfll35kp52nwbig4qrdg748v0zc-0019-Revert-boot-Make-initrd_prepare-semantically-equival.patch
       > patching file src/boot/efi/boot.c
       > Hunk #4 FAILED at 2292.
       > Hunk #5 succeeded at 2382 (offset 9 lines).
       > Hunk #6 succeeded at 2402 (offset 9 lines).
       > 1 out of 6 hunks FAILED -- saving rejects to file src/boot/efi/boot.c.rej
       For full logs, run 'nix log /nix/store/l0c7cvzc7hia9ln8pgp5fhfbb7fmrhgh-systemd-256.8.drv'.
error: 1 dependencies of derivation '/nix/store/isfrfz27yvz0b9mg6fmi51ykdpslrzzz-nixos-system-nixi-25.05.20250107.8c9fd3e.drv' failed to build
error:
       … while calling the 'head' builtin
         at /nix/store/wzhdvy8pvcrfc1flrnhrbrpyb0q38pp8-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         else

       … while evaluating the attribute 'value'
         at /nix/store/wzhdvy8pvcrfc1flrnhrbrpyb0q38pp8-source/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/wzhdvy8pvcrfc1flrnhrbrpyb0q38pp8-source/nixos/modules/system/activation/top-level.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: 1 dependencies of derivation '/nix/store/z9lxnrkmp5ma95b567kgc8k6f8v2wc58-references.nix.drv' failed to build

@marcusramberg
Copy link

@darbster145 this seems to be a failure to apply a patch to systemd? I don't see how that could be related to my fix, which only afffects mesa.

@oliverbestmann
Copy link
Contributor

I've removed the vendored package from my fork for the time being. Works direkctly with latest nixpkgs-unstable.
https://github.com/oliverbestmann/nixos-apple-silicon

@darbster145
Copy link

Thank you @oliverbestmann I was able to get yours working

@darbster145
Copy link

@darbster145 this seems to be a failure to apply a patch to systemd? I don't see how that could be related to my fix, which only afffects mesa.

Ya, I am not sure, I dont have anything in my config patching systemd. I was able to get @oliverbestmann fix working though.

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

No branches or pull requests

7 participants