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

NixOS instructions to fix mesa version mismatch outdated #970

Open
julius-boettger opened this issue Feb 8, 2025 · 3 comments
Open

NixOS instructions to fix mesa version mismatch outdated #970

julius-boettger opened this issue Feb 8, 2025 · 3 comments

Comments

@julius-boettger
Copy link

As of writing this, the wiki contains the following lines here:

If you start experiencing lag and FPS drops in games or programs like Blender on
**stable** NixOS when using the Hyprland flake, it is most likely a `mesa`
version mismatch between your system and Hyprland.

You can fix this issue by using `mesa` from Hyprland's `nixpkgs` input:

```nix {filename="configuration.nix"}
{pkgs, inputs, ...}: let
  pkgs-unstable = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
  hardware.opengl = {
    package = pkgs-unstable.mesa.drivers;

    # if you also want 32-bit support (e.g for Steam)
    driSupport32Bit = true;
    package32 = pkgs-unstable.pkgsi686Linux.mesa.drivers;
  };
}

This is outdated, as the NixOS option hardware.opengl was removed with the release of NixOS 24.11 a few months ago.

This should either be updated (if still relevant and possible) or removed.

I am not aware of any way to achieve similar results with the new options of NixOS 24.11, maybe @fufexan knows more?

@fufexan
Copy link
Member

fufexan commented Feb 8, 2025

hardware.opengl has been renamed to hardware.graphics. The inner options are the same. Afaik it's only a deprecation and it will be finally removed next release or in 25.11.

@julius-boettger
Copy link
Author

julius-boettger commented Feb 8, 2025

Ah, I see. But hardware.graphics only seems to have an extraPackages attribute, but no package(32), are you sure the inner options are the same?

@fufexan
Copy link
Member

fufexan commented Feb 9, 2025

Sure, they're not listed in the options search anymore, but they're still accessible https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/hardware/graphics.nix#L123-L124.

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

2 participants