Hi,
I wanted to start my hyprland configuration and wanted to use the build-vm function so I can test out until I have a stable enough configuration, but I found a problem that I could not solve.
When trying to run the vm I get a black screen and after a short while I am logged out. When I log in with my user I see the black screen again and I am logged out again. When I start Hyprland from the tty. I get an error saying that “Could not successfully create backend on any GPU”.
Although It seems there is some GPU:
Here is the minimum configuration needed to replicate:
flake.nix
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = { self, nixpkgs }: {
nixosConfigurations = {
desktop = nixpkgs.lib.nixosSystem {
system = "x86_64";
modules = [
./configuration.nix
];
};
};
};
}
configuration.nix
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.grub.enable = true;
services.xserver.enable = true;
# Enable the Plasma 5 Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
services.xserver.displayManager.defaultSession = "hyprland";
services.openssh = {
enable = true;
passwordAuthentication = true;
};
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Configure keymap in X11
services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.test = {
isNormalUser = true;
initialPassword = "test";
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
packages = with pkgs; [
firefox
tree
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
wget
];
system.stateVersion = "23.05";
}
and I use
nixos-rebuild build-vm --flake .#desktop && ./result/bin/run-nixos-vm
to run the vm.
I have tried sway, but it does the same thing.
plasmawayland
seems to work, but I don’t know if it just fallbacks to x11.
The system I use is ryzen 2600 and AMD rx580.