Hyprland
Hyprland copied to clipboard
Hyprland on NixOS vm/QEMU
Currently trying to build my nixos configuration to a vm image via nixos-rebuild build-vm
. However, when in the vm, all that is produced when running Hyprland
is a black screen. I have the following qemu options enabled:
"-device virtio-vga-gl" "-display gtk,gl=on"
Are any more necessary? ( note - I've also included the flag mentioned in this thread )
Thanks for any help :)
@fufexan
I have no idea, I've never used NixOS in a VM.
provide the log from WLR_RENDERER_ALLOW_SOFTWARE=1 HYPRLAND_LOG_WLR=1 Hyprland
(/tmp/hypr/)
@patrickaldis Are you using an Nvidia GPU? I think I had this issue on Nvidia but not on an Intel GPU although it's been a few months since I tried to run my config in a qemu vm
Ran into a similar issue in VMware Fusion, ended up running with WLR_NO_HARDWARE_CURSORS=1 in addition to WLR_RENDERER_ALLOW_SOFTWARE=1 (and the exports in the quickstart guide) which made it work
@patrickaldis is this resolved for you ??
I'm having the same experience of a blank black screen. hyprland config works on my native machine but not for nix build .#nixosConfiguration.nixos.config.system.build.vm
generated VM.
I tested the recommendations in this issue + #797 without success.
My machine is a 11th Gen Framework laptop with Intel TigerLake-LP GT2 [Iris Xe Graphics]
GPU.
In case this is helpful, my hyprland log file is https://gist.github.com/dantefromhell/98e57482ca87ff0a63cf41014f8a12a3
If required I can see if I can distill my nix configuration down to a flake that reproduces the error.
Out of curiosity I've been testing @donovanglover config at https://github.com/donovanglover/nix-config/ and this one works.
I'm not sure how to proceed with dissecting/ diffing the changes between the 2 configurations, any suggestions?
Hi, make sure you have -device virtio-vga-gl
and -display sdl,gl=on,show-cursor=off
in your QEMU options, as well as WLR_NO_HARDWARE_CURSORS = "1"
in your environment.sessionVariables
. Example.
make sure you have -device virtio-vga-gl and -display sdl,gl=on,show-cursor=off in your QEMU options, as well as WLR_NO_HARDWARE_CURSORS = "1"
Yes I already copied that code (plus some of the virtualisation.vmVariant
) directly from your flake. Thx for writing it 👍🏽
However the issue still persists.
The next step I could think of is testing the different version combinations.
My system generally runs on nixos-23.05
, but I was using the hyprland flake and the package it exports since nixos-23.05
is still on hyprland-0.25
and hyprland-0.28
promises improved performance.
I was able to extract a minimal flake that (hopefully) reproduces the problem https://gist.github.com/dantefromhell/899f0f85f828c9486f3d725dff1f49ec Gist also contains the log-file.
It tries to run hyprland-v0.28.0
on nixos-23.05
. Bare metal it works, in NixOS VM the screen stays blank.
I was able to verify behaviour on 2 different laptops building & running the VM. Can someone test if they can reproduce the behaviour?
@dantefromhell I can reproduce the black screen issue with your flake.nix and greetd + auto-login as well. Don't know what the missing option is unfortunately.
this is not an issue with hl but with the vm. Make sure to allow software rendering. Anything else, your issue.
Turns out this was related to running weston in sddm under NixOS using this configuration:
services.xserver.displayManager = {
sddm = {
enable = true;
enableHidpi = true;
settings = {
General.DisplayServer = "wayland";
Wayland.CompositorCommand = "${pkgs.westonLite}/bin/weston --shell=fullscreen-shell.so";
};
};
During a NixOS upgrade I had to disable the weston pieces in settings
as they were producing a blank screen in SDDM. This also fixed my hyprland black screen in the VM.
Not sure if this is worth re-opening, but maybe this finding will be helpful for someone else someday.