Hyprland
Hyprland copied to clipboard
`m_sWLRRenderer was NULL!` error when installing Hyprland from Home Manager
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!
do you have a GPU? There is no gpu information. Is this a VM?
Also cc @fufexan for nix
do you have a GPU?
If you are asking if I have a dedicated graphics card, nope, my laptop only has integrated graphics.
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.
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?
@fufexan
Can you send the config over? Specifically the Hyprland modules and how you set them up.
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.
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.
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!
you do not need to
importa module, just list it like you did withhardware-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 withsystemdIntegrationandrecommendedEnvironment. 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.
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 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.
@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:
The issue has been fixed, closing.
@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.
@fufexan I didnt understand your answer. Where do you put that line of code?
@ImZedik
Add the above in the HM module's
packageoption.
To be more explicit, in wayland.windowManager.hyprland.package.