Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Remove mesa panfork override #48

Closed
wants to merge 1 commit into from
Closed

Remove mesa panfork override #48

wants to merge 1 commit into from

Conversation

phaitonican
Copy link
Contributor

@phaitonican phaitonican commented Oct 8, 2024

Is not online anymore. It says use upstream, otherwise I get compilation error because 404 not found
https://gitlab.com/panfork/mesa

does it still need this? and other stuff there?

          ...
          (pkgs.mesa.override {
            galliumDrivers = ["panfrost" "swrast"];
            vulkanDrivers = ["swrast"];
          })
         ...

@HeroBrine1st
Copy link
Contributor

HeroBrine1st commented Oct 8, 2024

I have done some research about it and it there are some mirrors available, although I can't tell about their authenticity - #32

Recheckling that, I found that linked "mirror" is deleted too. I also remember that I saved it locally, but can't find it (deleted?).

Anyway, I think it should be replaced with throw. It doesn't work now and won't work even with this PR, and here's why: Panfrost driver needs a Panthor kernel driver, which is included into Linux 6.10 and newer. And, looking on armbian folks, I see that their "edge" kernel is lacking hardware support (would be good if I misunderstood).

P.s. Is there anybody with panfork driver? Does it actually work, like, can you use it for everyday tasks or even playing some light OpenGL games?

@phaitonican
Copy link
Contributor Author

phaitonican commented Oct 8, 2024

sorry did not wanna remove your part i just didnt know what it was doing. i reverted it back and just delete the gitlab part

@phaitonican
Copy link
Contributor Author

phaitonican commented Oct 8, 2024

I have done some research about it and it there are some mirrors available, although I can't tell about their authenticity - #32

Recheckling that, I found that linked "mirror" is deleted too. I also remember that I saved it locally, but can't find it (deleted?).

Anyway, I think it should be replaced with throw. It doesn't work now and won't work even with this PR, and here's why: Panfrost driver needs a Panthor kernel driver, which is included into Linux 6.10 and newer. And, looking on armbian folks, I see that their "edge" kernel is lacking hardware support (would be good if I misunderstood).

P.s. Is there anybody with panfork driver? Does it actually work, like, can you use it for everyday tasks or even playing some light OpenGL games?

I don't know really. So we need new kernel for this to work?... so unfortunate, i was getting everything to work

@HeroBrine1st
Copy link
Contributor

HeroBrine1st commented Oct 8, 2024

maybe one of those options makes upstream mesa "work" idk really...

No, it won't, because it needs Panthor driver. You can't run Panfrost driver without Linux 6.10 or newer:

https://www.collabora.com/news-and-blog/news-and-events/release-the-panthor.html

But you can try incorporating armbian's edge kernel. I'm tempted to do that (particularly because of bcachefs), but I use my OPi5 as production server (mission-critical in a sense, non-commercial though - just self-hosting) and so I don't want to risk my system being fried or filesystem corrupted due to kernel panics.

sorry did not wanna remove your part i just didnt know what it was doing

Take it easy, it's no offence. That's why we have comments, after all.

Why Armbian Kernel not support this yet?

Looks like their Edge kernel does.


Btw, your latest change won't compile, It looks like opengl.package = ().drivers which won't work. Also, if we use mainstream Mesa drivers, I propose throwing error like that instead:

Patch
-      opengl.package =
-        (
-          (pkgs.mesa.override {
-            galliumDrivers = ["panfrost" "swrast"];
-            vulkanDrivers = ["swrast"];
-          })
-          .overrideAttrs (_: {
-            pname = "mesa-panfork";
-            version = "23.0.0-panfork";
-            src = pkgs.fetchFromGitLab {
-              owner = "panfork";
-              repo = "mesa";
-              rev = "120202c675749c5ef81ae4c8cdc30019b4de08f4"; # branch: csf
-              hash = "sha256-4eZHMiYS+sRDHNBtLZTA8ELZnLns7yT3USU5YQswxQ0=";
-            };
-          })
-        )
-        .drivers
+      opengl.package = throw "OpenGL is not supported yet";

But I think there are people with working panfork driver. If panfork is removed, it will remove it from their machines, although they have it cached in their /nix/store and so are not affected by repository removal. So it breaks OpenGL for some people for nothing. And that's why I did not submit a PR when I got this error, if you're curious.

Upstream nixpkgs somehow make warnings when they change package names, it should be useful here.


Also, looks like nix is new for you. I see that you want to test mainstream Mesa drivers, and that's how you do that:

{ pkgs, lib, ... }: {
  hardware.opengl.enable = true;
  hardware.opengl.package = lib.mkForce pkgs.mesa.drivers;
}

You can overwrite almost everything in your system without patching upstream flakes 🙃

@phaitonican
Copy link
Contributor Author

phaitonican commented Oct 8, 2024

Panthor needs CONFIG_DRM_PANTHOR=y kernel config line for armbian kernel as it is a module. I recompile now and check if it work... Idk how to "check", glxinfo says no display but it was without panthor. i will jsz try to get hyprland work

@phaitonican phaitonican closed this Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants