Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

`m_sWLRRenderer was NULL!` error when installing Hyprland from Home Manager

Open Occhioverde opened this issue 2 years ago • 13 comments

Good morning.

As the title suggests, today I tried to switch from the NixOS Hyprland module to the Home Manager one, closely following the official instructions on the wiki. However, even if the NixOS module works flawlessly, after switching to the Home Manager one Hyprland started crashing at startup, reporting the m_sWLRRenderer was NULL! error that you can find in the log.

Reading from the threads in #40 and #913 I can understand that the problem may be caused by a graphic driver, but since the NixOS module-based installation works without any problem I don't think that my system is missing any package...

  • Log: https://privatebin.devol.it/?3da40b943ff8a61f#2BPSXNghfVJhKuhqx5Fj1tWs2dLUMFrTXUvKDgUP86CW
  • Coredump: https://privatebin.devol.it/?25f7f144cbee56a7#EhsTRGWjyvSgUyGheqjpaFBgpa33FKPatHCKodX3FEjt

Many thanks in advance for the help!

Occhioverde avatar Nov 06 '22 18:11 Occhioverde

do you have a GPU? There is no gpu information. Is this a VM?

Also cc @fufexan for nix

vaxerski avatar Nov 06 '22 19:11 vaxerski

do you have a GPU?

If you are asking if I have a dedicated graphics card, nope, my laptop only has integrated graphics.

Occhioverde avatar Nov 06 '22 19:11 Occhioverde

integrated graphics is a gpu. Oddly enough, information about it is absent. That's most likely why hyprland fails, your system fails to detect a gpu.

vaxerski avatar Nov 06 '22 19:11 vaxerski

integrated graphics is a gpu

Yes, yes, I thought that you were asking if I had a dedicated card.

your system fails to detect a gpu

Strange, since, as I reported in my initial comment, this issue happens in the Home Manager module but not in the NixOS one. Maybe the latter depends on some library that the other fails to load?

Occhioverde avatar Nov 06 '22 19:11 Occhioverde

@fufexan

vaxerski avatar Nov 06 '22 19:11 vaxerski

Can you send the config over? Specifically the Hyprland modules and how you set them up.

fufexan avatar Nov 07 '22 13:11 fufexan

Absolutely. Here it is: https://cloud.nexxontech.it/s/MsdtX9JAmeWbSy9

In the "NixOS" folder you can find my current NixOS config that includes the Hyprland module while in the "HomeManager" directory you can find the config with which I tried to install Hyprland and that triggered the issue we're talking about.

Occhioverde avatar Nov 07 '22 14:11 Occhioverde

After going through your config, I see a few issues:

      modules = [
        ./hardware-configuration.nix
        hyprland.nixosModules.default
        (import ./configuration.nix)
      ];

you do not need to import a module, just list it like you did with hardware-configuration.nix.

  environment.systemPackages = with pkgs; [
    git
    greetd.tuigreet
    vim
  ] ++ [
    home-manager.packages."x86_64-linux".default
  ];

You do not need that HM package. It manages itself in a standalone install, or doesn't need a binary at all if configured as a NixOS module.

I can see in your Home config that you are manually adding a home.file for hyprland.conf. There's no need for that, you can just use wayland.windowManager.hyprland.config, along with systemdIntegration and recommendedEnvironment. These may fix your previous issues.

Lastly, this isn't an issue per se, but you can have both HM and NixOS in the same flake, even though they're separate.

fufexan avatar Nov 07 '22 21:11 fufexan

Hey, I also have this problem. Logs and coredumps are exactly the same (modulo personal info). My config can be found here.

On the missing GPU info I can add that installing pciutils fixes the issue and prints the missing info. In my case I'm trying out NixOS on a spare Thinkpad x200s I have and the GPU info prints

00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07) (prog-if 00 [VGA controller])

Since I am not sure whether my pc is very very old, I also tried compiling with the LEGACY_RENDERER option. Here they suggest to set

package = pkgs.hyprland.overrideAttrs (_: {
  mesonFlags = [ "-DLEGACY_RENDERER:STRING=true" ];
});

but this gives a log with just

[CRITICAL] m_sWLRRenderer was NULL!

without any the system info.

Hope this helps!

dyamon avatar Nov 07 '22 22:11 dyamon

you do not need to import a module, just list it like you did with hardware-configuration.nix

You do not need that HM package. It manages itself in a standalone install, or doesn't need a binary at all if configured as a NixOS module.

Yes, I added these statements for some previous tests and then I forgot to remove them. Thanks for pointing out!

you can just use wayland.windowManager.hyprland.config, along with systemdIntegration and recommendedEnvironment. These may fix your previous issues

I tried to completely remove the ".config/hypr".source = ./configs/hypr; line to allow the Hyprland module to manage its configuration, but the crash doesn't seem to be solved.

Occhioverde avatar Nov 08 '22 23:11 Occhioverde

Since I am not sure whether my pc is very very old, I also tried compiling with the LEGACY_RENDERER option. Here they suggest to set

package = pkgs.hyprland.overrideAttrs (_: {
  mesonFlags = [ "-DLEGACY_RENDERER:STRING=true" ];
});

@dyamon i think your update does not work, because in the hyprland nixos pkgs, there is not have the mesonFlags attribute, i have also same error, and i would like also overlay this package, but i don't know where we must add the make flags

badele avatar Nov 09 '22 07:11 badele

@badele the flake package has an option for legacy renderer. You can use it with an override:

(inputs.hyprland.packages.${pkgs.system}.hyprland.override {legacyRenderer = true;})

Add the above in the HM module's package option.

fufexan avatar Nov 09 '22 07:11 fufexan

@badele the flake package has an option for legacy renderer. You can use it with an override:

@fufexan Very thanks, from hyprland flake i didn't need to use the legacy nixos flag, that working on dell latitude e5540 :+1: :tada:

badele avatar Nov 09 '22 18:11 badele

The issue has been fixed, closing.

fufexan avatar Nov 14 '22 21:11 fufexan

@Occhioverde I just had this same issue, and determined that the solution was this in my nixos (not home manager) configuration: https://github.com/hyprwm/Hyprland/blob/409ac12f236c06cbb28756239e1d1536078b33bb/nix/module.nix#L54

This is included in the nixos module (see above), but I don't think this can be done at the home manager level.

orangeturtle739 avatar Dec 04 '22 00:12 orangeturtle739

@fufexan I didnt understand your answer. Where do you put that line of code?

liyderek avatar Jan 27 '24 02:01 liyderek

@ImZedik

Add the above in the HM module's package option.

To be more explicit, in wayland.windowManager.hyprland.package.

fufexan avatar Jan 27 '24 09:01 fufexan