Open ByteAssembler opened 2 months ago
does sway work? or any other wayland session?
This looks like an nvidia issue anyways. @fufexan for nix though
Cinnamon (experimental) runs under Wayland on the system. Sway, on the other hand, has similar problems to Hyprland.
Have you tried hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
?
Yes, I've tried that too. I tried different nix channels and also different Linux kernels, but Hyprland would never start.
Try this config and if it still does not work for you maybe try create a NixOS live CD and boot from it? The iso built from this config does work on my 1080 Ti machine (many options here are probably not required)
Save this as flake.nix
and run nix build .#nixosConfigurations.hyprlandIso.config.system.build.isoImage
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ { self, nixpkgs, home-manager }: {
nixosConfigurations.hyprlandIso = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
modules = [
("${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix")
("${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix")
({ pkgs, config, ... }: {
boot.kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
hardware.nvidia = {
powerManagement.enable = true;
open = false;
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
services.xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
};
services.displayManager = {
sddm.enable = true;
sessionPackages = [ pkgs.hyprland ];
};
})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.nixos = {
imports = [ ];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
extraConfig = ''
misc {
vfr=off
}
'';
};
home.sessionVariables = {
GBM_BACKEND = "nvidia-drm";
LIBSEAT_BACKEND = "logind";
LIBVA_DRIVER_NAME = "nvidia";
QT_QPA_PLATFORM = "wayland";
WLR_NO_HARDWARE_CURSORS = "1";
XDG_SESSION_TYPE = "wayland";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1";
};
home.stateVersion = "24.05";
};
}
];
};
};
}
Thank you so much for your detailed suggestion and the NixOS configuration, @sifmelcara. I really appreciate your effort to help me troubleshoot this issue. I've followed your recommendations, and here's what I've found:
1. Existing NixOS Configuration: I integrated your provided configuration into my current NixOS setup. After restarting, I was able to see the SDDM login screen. However, when I attempted to log in, nothing happened. (The hyprland logs show the same error as before.)
2. ISO Build: Following your recommendation, I proceeded to build the ISO using the provided flake.nix. The build process completed without any errors. For reference, the SHA-256 hash of the resulting ISO is (https://github.com/NixOS/nixpkgs/tree/8f48c9241de143e8e60a826d405fa8dec5e49343):
7fe21509a7ed28e3e1909e6d555df332f6f2345ddb41df3104e93a15b04f29c3
It would be helpful to know if this hash matches what you'd expect, as it could confirm whether the ISO was built correctly.
3. Booting from ISO: Unfortunately, when I tried to boot from this ISO, I encountered a black screen. On one of my monitors, I could see the backlight, while the others remained “off” (actually as before). I suspect this might be because the login screen is typically skipped during live boot, and Hyprland may have failed to start again, similar to my previous attempts.
Since this was a live system, I don't have logs from this boot process. However, I believe the underlying issue might be the same as what I've been experiencing before.
I must admit, I'm feeling a bit disheartened at this point. I'm wondering if there might be some underlying issue with my NixOS configuration or perhaps some hardware-specific problem that we haven't identified yet.
I'm particularly intrigued that this configuration works on your system with a NVIDIA GTX 1080 Ti. This makes me think that there must be some critical difference between our setups. While I don't believe it's related to my CPU (I'm using an AMD Ryzen), at this point, I'm open to considering all possibilities.
Do you have any thoughts on what might be causing this persistent issue? Are there any additional logs or system information I could provide that might help pinpoint the problem?
Despite the setbacks, I would like to continue trying to get Hyprland to work on my system. If you have any suggestions or need additional information, please let me know.
Thank you for your assistance.
I suspect this might be because the login screen is typically skipped during live boot, and Hyprland may have failed to start again, similar to my previous attempts
It should show sddm login screen first. User will need to type password ("nixos") to log into Hyprland session.
On one of my monitors, I could see the backlight, while the others remained “off” (actually as before)
I have 3 monitors plugging into nvidia card and they all shows sddm login screen and Hyprland properly
While I don't believe it's related to my CPU (I'm using an AMD Ryzen)
FWIW I have Intel CPU
Do you have any thoughts on what might be causing this persistent issue? Are there any additional logs or system information I could provide that might help pinpoint the problem?
It sounds like you have multiple monitors, maybe try using single HDMI monitor first?
Have you ever update NVIDIA firmware? My card have https://www.nvidia.com/en-us/drivers/nv-uefi-update-x64/ applied, and I feel this could be relevant to your "black screen" issue.
This sounds like this nvidia issue I am seeing reports a lot of reports of. I would say downgrade the NVIDIA drivers. https://forums.developer.nvidia.com/t/555-release-feedback-discussion/293652/173
I've had a very similar crash message, and managed to solve it by setting WLR_DRM_DEVICES. Followed this comment https://github.com/hyprwm/Hyprland/issues/2622#issuecomment-1616067379, In my case /dev/dri/card0 was pointing to simple-framebuffer, and card1 was the correct one.
Is this still a thing?
Regression?
No
System Info and Version
System Information:
Relevant Configuration: Here are the NVIDIA-related configurations in my
configuration.nix
:Description
Hello Hyprland team,
I'm encountering an issue where Hyprland fails to start on my NixOS system. I've tried various configurations but haven't been able to resolve the problem. I would greatly appreciate any guidance or assistance you could provide. Here are the details:
Issue Description: When attempting to start Hyprland, it immediately crashes.
Error Message:
I've reviewed the documentation and tried the suggested solutions, but I'm still encountering this issue. If there's any additional information I can provide to help diagnose the problem, please let me know.
Thank you for your time and assistance. I appreciate the work you're doing on Hyprland and look forward to being able to use it.
How to reproduce
Steps to Reproduce:
Additional Information:
lsmod | grep nvidia
)Crash reports, logs, images, videos
Crash report: hyprlandCrashReport1701.txt
Crash report - the most important: Here's the relevant part of the Hyprland crash report:
lspci
(VGA):lsmod
for nvidia:journalctl
for hyprland: