Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyprland crashes at start on NixOS 23.05 #2416

Closed
erahhal opened this issue Jun 2, 2023 · 11 comments
Closed

Hyprland crashes at start on NixOS 23.05 #2416

erahhal opened this issue Jun 2, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@erahhal
Copy link

erahhal commented Jun 2, 2023

@fufexan this is on NixOS 23.05, using the nixpkgs hyprland and the home-manager flake.

Steps to reproduce

  • Start Hyprland

Expected outcome

  • Hyprland starts successfully

Noted outcome

  • Hyprland crashes

The Hyprland log

[LOG] Instance Signature: 9cf72a30fc040f0bd2fb4651ec7f8e82df962278_1685679835
[LOG] Hyprland PID: 1004563
[LOG] ===== SYSTEM INFO: =====
[LOG] System name: Linux
[LOG] Node name: upaya
[LOG] Release: 6.1.31
[LOG] Version: #1-NixOS SMP PREEMPT_DYNAMIC Tue May 30 13:03:33 UTC 2023


[LOG] GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:591b] (rev 04) (prog-if 00 [VGA controller])


[LOG] os-release:
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="23.05.20230531.3a70dd9"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 23.05 (Stoat)"
SUPPORT_END="2023-12-31"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="23.05 (Stoat)"
VERSION_CODENAME=stoat
VERSION_ID="23.05"

[LOG] ========================



[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/


[LOG] 
Current splash: h


[LOG] Creating the HookSystem!
[LOG] Creating the KeybindManager!
[LOG] Creating the AnimationManager!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 29.65µs. Estimated average calc time: 0.08µs.
[LOG] Creating the ConfigManager!
[LOG] Creating the CHyprError!
[LOG]  [hookSystem] New hook event registered: focusedMon
[LOG]  [hookSystem] New hook event registered: preRender
[LOG] Creating the LayoutManager!
[LOG] Reloading the config!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 16.16µs. Estimated average calc time: 0.06µs.
[LOG] Registered dynamic var "$mod" -> SUPER
[LOG] Registered dynamic var "$term" -> /nix/store/ivnamh59wggwqikgh93yay9924p7w8rq-kitty-0.28.1/bin/kitty
[LOG] Registered dynamic var "$screenshotarea" -> hyprctl keyword animation "fadeOut,0,0,default"; grimblast --notify copysave area; hyprctl keyword animation "fadeOut,1,4,default"
[LOG] Disabling stdout logs! Check the log for further logs.
[CRITICAL] Hyprland has crashed :( Consult the crash report at /home/erahhal/.cache/hyprland/hyprlandCrashReport1004563.txt for more information.

Config

exec-once=/nix/store/w2rxmc5wqlw28r23rrsvl1qwxq3qlhra-dbus-1.14.6/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && systemctl --user start hyprland-session.target
$mod = SUPER

$term = /nix/store/ivnamh59wggwqikgh93yay9924p7w8rq-kitty-0.28.1/bin/kitty

## Refresh services
exec = systemctl --user restart kanshi
exec = systemctl --user restart mako
exec = systemctl --user restart network-manager-applet
exec = systemctl --user restart wlsunset

exec-once = /nix/store/fwmq6np88xzxmffsi4hb39wclr66kmv8-hyprpaper-0.2.0/bin/hyprpaper

## scale Xorg apps
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 1.75

# exec-once = systemctl --user start clight
# exec-once = eww open bar
exec = pkill waybar; /nix/store/awz73md388nsjkiz6qnhri16l2h04mwx-waybar-0.9.17/bin/waybar

misc {
}

# touchpad gestures
gestures {
  workspace_swipe = 1
  workspace_swipe_forever = 1
}

input {
  kb_layout = ro
  repeat_rate = 50
  repeat_delay = 255

  # focus change on cursor move
  follow_mouse = 2
  # accel_profile = flat
  touchpad {
    scroll_factor = 0.3
  }
  accel_profile = adaptive
}

general {
  gaps_in = 5
  gaps_out = 5
  border_size = 1
}

decoration {
  rounding = 8
  blur = 1
  blur_size = 3
  blur_passes = 3
  blur_new_optimizations = 1

  drop_shadow = 1
  shadow_ignore_window = 1
  shadow_offset = 2 2
  shadow_range = 4
  shadow_render_power = 1
  col.shadow = 0x55000000
}

animations {
  enabled = 1
  animation = border, 1, 2, default
  animation = fade, 1, 4, default
  animation = windows, 1, 3, default, popin 80%
  animation = workspaces, 1, 2, default, slide
}

dwindle {
  # keep floating dimentions while tiling
  pseudotile = 1
  preserve_split = 1
  # aka monocle mode
  no_gaps_when_only = 1
}

workspace = LG Electronics LG Ultra HD, 1
workspace = LG Electronics LG Ultra HD, 4
workspace = LG Electronics LG Ultra HD, 5
workspace = LG Electronics LG HDR 4K, 22
workspace = eDP-1, 3
workspace = eDP-1, 6

# telegram media viewer
windowrule = float, title:^(Media viewer)$

# make Firefox PiP window floating and sticky
windowrule = float, title:^(Picture-in-Picture)$
windowrule = pin, title:^(Picture-in-Picture)$

# throw sharing indicators away
windowrule = workspace special silent, title:^(Firefox — Sharing Indicator)$
windowrule = workspace special silent, title:^(.*is sharing (your screen|a window)\.)$

# workspace 1
windowrule = workspace 1, silent, class:^(chromium)$

# workspace 2
windowrule = workspace 2, silent, class:^(kitty)$

# workspace 3
windowrule = workspace 3 silent, class:^(slack)$

# workspace 4
windowrule = tile, class:^(Spotify)$
windowrule = workspace 4 silent, class:^(Spotify)$
windowrule = tile, class:^(Brave)$
windowrule = workspace 4 silent, class:^(Brave)$

# workspace 5
windowrule = workspace 5 silent, class:^(firefox)$

# workspace 6
windowrule = workspace 6, title:^(.*Discord.*)$
windowrule = workspace 6, title:^(WebCord)$
windowrule = workspace 6, title:^(Signal)$

# idle inhibit while watching videos
windowrule = idleinhibit focus, class:^(mpv)$
windowrule = idleinhibit fullscreen, class:^(firefox)$
## @TODO: Make sure class matches for these two
windowrule = idleinhibit fullscreen, class:^(chromium)$
windowrule = idleinhibit fullscreen, class:^(brave)$

# mouse movements
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow
bindm = $mod ALT, mouse:272, resizewindow

# compositor commands
bind = $mod SHIFT, E, exec, pkill Hyprland
bind = $mod, Q, killactive,
bind = $mod, F, fullscreen,
bind = $mod, G, togglegroup,
bind = $mod SHIFT, N, changegroupactive, f
bind = $mod SHIFT, P, changegroupactive, b
bind = $mod, T, togglesplit,
bind = $mod, SPACE, togglefloating,
# bind = $mod, P, pseudo,
bind = $mod ALT, , resizeactive,

# utility
# launcher
bind = $mod, P, exec, /nix/store/sprfkvl9adpacg6ya9pfkwcry8m22a5y-wofi-1.3/bin/wofi --show run -W 400 -H 300
# terminal
# bind = $mod, Return, exec, run-as-service $term
bind = $mod, Return, exec, $term
# logout menu
bind = $mod, Escape, exec, wlogout -p layer-shell
# lock screen
bind = $mod, X, exec, loginctl lock-session
# emoji picker
bind = $mod, E, exec, /nix/store/nnvn6bhj1r0qlxfcn002w4wrl7ycwvwy-wofi-emoji-unstable-2022-08-19/bin/wofi-emoji
# select area to perform OCR on
bind = $mod, O, exec, run-as-service wl-ocr

# move focus
bind = $mod, H, movefocus, l
bind = $mod, L, movefocus, r
bind = $mod, K, movefocus, u
bind = $mod, J, movefocus, d

# window resize
bind = $mod, S, submap, resize

# Close window
bind = $mod, C, killactive

submap = resize
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
bind = , escape, submap, reset
submap = reset

# media controls
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = , XF86AudioNext, exec, playerctl next

# volume
bindle = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%+
bindle = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%-
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle

# backlight
bindle = , XF86MonBrightnessUp, exec, light -A 5
bindle = , XF86MonBrightnessDown, exec, light -U 5

# screenshot
# stop animations while screenshotting; makes black border go away
$screenshotarea = hyprctl keyword animation "fadeOut,0,0,default"; grimblast --notify copysave area; hyprctl keyword animation "fadeOut,1,4,default"
bind = , Print, exec, $screenshotarea
bind = $mod SHIFT, R, exec, $screenshotarea

bind = CTRL, Print, exec, grimblast --notify --cursor copysave output
bind = $mod SHIFT CTRL, R, exec, grimblast --notify --cursor copysave output

bind = ALT, Print, exec, grimblast --notify --cursor copysave screen
bind = $mod SHIFT ALT, R, exec, grimblast --notify --cursor copysave screen

# workspaces
# binds mod + [shift +] {1..10} to [move to] ws {1..10}
bind = $mod, 1, workspace, 1
bind = $mod SHIFT, 1, movetoworkspace, 1

bind = $mod, 2, workspace, 2
bind = $mod SHIFT, 2, movetoworkspace, 2

bind = $mod, 3, workspace, 3
bind = $mod SHIFT, 3, movetoworkspace, 3

bind = $mod, 4, workspace, 4
bind = $mod SHIFT, 4, movetoworkspace, 4

bind = $mod, 5, workspace, 5
bind = $mod SHIFT, 5, movetoworkspace, 5

bind = $mod, 6, workspace, 6
bind = $mod SHIFT, 6, movetoworkspace, 6

bind = $mod, 7, workspace, 7
bind = $mod SHIFT, 7, movetoworkspace, 7

bind = $mod, 8, workspace, 8
bind = $mod SHIFT, 8, movetoworkspace, 8

bind = $mod, 9, workspace, 9
bind = $mod SHIFT, 9, movetoworkspace, 9

bind = $mod, 0, workspace, 10
bind = $mod SHIFT, 0, movetoworkspace, 10


# special workspace
bind = $mod SHIFT, grave, movetoworkspace, special
bind = $mod, grave, togglespecialworkspace, eDP-1

# cycle workspaces
bind = $mod, bracketleft, workspace, m-1
bind = $mod, bracketright, workspace, m+1

# cycle monitors
bind = $mod SHIFT, braceleft, focusmonitor, l
bind = $mod SHIFT, braceright, focusmonitor, r

Hyprland Crash Report

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Well this is awkward.

Hyprland received signal 11 (Segmentation fault)

Version: 9cf72a30fc040f0bd2fb4651ec7f8e82df962278

System info:
	System name: Linux
	Node name: upaya
	Release: 6.1.31
	Version: #1-NixOS SMP PREEMPT_DYNAMIC Tue May 30 13:03:33 UTC 2023

GPU:
	00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:591b] (rev 04) (prog-if 00 [VGA controller])


os-release:
	BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
	BUILD_ID="23.05.20230531.3a70dd9"
	DOCUMENTATION_URL="https://nixos.org/learn.html"
	HOME_URL="https://nixos.org/"
	ID=nixos
	LOGO="nix-snowflake"
	NAME=NixOS
	PRETTY_NAME="NixOS 23.05 (Stoat)"
	SUPPORT_END="2023-12-31"
	SUPPORT_URL="https://nixos.org/community.html"
	VERSION="23.05 (Stoat)"
	VERSION_CODENAME=stoat
	VERSION_ID="23.05"
	


Backtrace:
	#0 | /etc/profiles/per-user/erahhal/bin/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x824) [0x5497d4]
		_ZN13CrashReporter18createAndSaveCrashEi
		??:?
	#1 | /etc/profiles/per-user/erahhal/bin/Hyprland(_Z25handleUnrecoverableSignali+0x3f) [0x599e3f]
		_Z25handleUnrecoverableSignali
		??:?
	#2 | /nix/store/x33pcmpsiimxhip52mwxbb5y77dhmb21-glibc-2.37-8/lib/libc.so.6(+0x38d60) [0x7f1459632d60]
		??
		??:0
	#3 | /run/opengl-driver/lib/gbm/nvidia-drm_gbm.so(+0x1556b) [0x7f142741556b]
		??
		??:0
	#4 | /run/opengl-driver/lib/gbm/nvidia-drm_gbm.so(+0x15838) [0x7f1427415838]
		??
		??:0
	#5 | /nix/store/i6lyl9hkrpy6h6kf61mr9q81fxn7dmpx-mesa-23.0.3/lib/libgbm.so.1(+0x3626) [0x7f14595c6626]
		??
		??:0
	#6 | /nix/store/i6lyl9hkrpy6h6kf61mr9q81fxn7dmpx-mesa-23.0.3/lib/libgbm.so.1(+0x37a3) [0x7f14595c67a3]
		??
		??:0
	#7 | /nix/store/i6lyl9hkrpy6h6kf61mr9q81fxn7dmpx-mesa-23.0.3/lib/libgbm.so.1(gbm_create_device+0x44) [0x7f14595c6894]
		??
		??:0
	#8 | /nix/store/kjdd7syxic2njvqg9krpfgd9ak9cad9q-wlroots-hyprland-2023-05-31_3f0487d/lib/libwlroots.so.12(wlr_gbm_allocator_create+0x7e) [0x7f145a17440e]
		??
		??:0
	#9 | /nix/store/kjdd7syxic2njvqg9krpfgd9ak9cad9q-wlroots-hyprland-2023-05-31_3f0487d/lib/libwlroots.so.12(+0x522ca) [0x7f145a1732ca]
		??
		??:0
	#10 | /etc/profiles/per-user/erahhal/bin/Hyprland(_ZN11CCompositor10initServerEv+0x197) [0x5a9f77]
		_ZN11CCompositor10initServerEv
		??:?
	#11 | /etc/profiles/per-user/erahhal/bin/Hyprland(main+0x470) [0x47c380]
		main
		??:?
	#12 | /nix/store/x33pcmpsiimxhip52mwxbb5y77dhmb21-glibc-2.37-8/lib/libc.so.6(+0x23ace) [0x7f145961dace]
		??
		??:0
	#13 | /nix/store/x33pcmpsiimxhip52mwxbb5y77dhmb21-glibc-2.37-8/lib/libc.so.6(__libc_start_main+0x89) [0x7f145961db89]
		??
		??:0
	#14 | /etc/profiles/per-user/erahhal/bin/Hyprland(_start+0x25) [0x47d4d5]
		_start
		??:?


Log tail:
[LOG] Node name: upaya
[LOG] Release: 6.1.31
[LOG] Version: #1-NixOS SMP PREEMPT_DYNAMIC Tue May 30 13:03:33 UTC 2023


[LOG] GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 630 [8086:591b] (rev 04) (prog-if 00 [VGA controller])


[LOG] os-release:
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="23.05.20230531.3a70dd9"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 23.05 (Stoat)"
SUPPORT_END="2023-12-31"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="23.05 (Stoat)"
VERSION_CODENAME=stoat
VERSION_ID="23.05"

[LOG] ========================



[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/


[LOG] 
Current splash: h


[LOG] Creating the HookSystem!
[LOG] Creating the KeybindManager!
[LOG] Creating the AnimationManager!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 29.65µs. Estimated average calc time: 0.08µs.
[LOG] Creating the ConfigManager!
[LOG] Creating the CHyprError!
[LOG]  [hookSystem] New hook event registered: focusedMon
[LOG]  [hookSystem] New hook event registered: preRender
[LOG] Creating the LayoutManager!
[LOG] Reloading the config!
[LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 16.16µs. Estimated average calc time: 0.06µs.
[LOG] Registered dynamic var "$mod" -> SUPER
[LOG] Registered dynamic var "$term" -> /nix/store/ivnamh59wggwqikgh93yay9924p7w8rq-kitty-0.28.1/bin/kitty
[LOG] Registered dynamic var "$screenshotarea" -> hyprctl keyword animation "fadeOut,0,0,default"; grimblast --notify copysave area; hyprctl keyword animation "fadeOut,1,4,default"
[LOG] Disabling stdout logs! Check the log for further logs.
@erahhal erahhal added the bug Something isn't working label Jun 2, 2023
@NotAShelf
Copy link
Member

How did you install Hyprland? Do you have graphic drivers installed? What GPU?

@erahhal
Copy link
Author

erahhal commented Jun 2, 2023

How did you install Hyprland? Do you have graphic drivers installed? What GPU?

As mentioned at the top, I used the nixpkgs hyprland and the home-manager flake on NixOS 23.05.

This is on a Dell XPS 9560 laptop with both and Intel and nVidia GeForce GTC 1050 GPU with 4G ram.

I do have the Nvidia proprietary driver installed, using whatever is available through nix. I can look up the exact version.

I did install using the nvidiaPatches flag, but looking at the logs, it looks like it's trying to use the Intel GPU.

@vaxerski
Copy link
Member

vaxerski commented Jun 2, 2023

cucked by mesa, not really a hl problem. Does sway-git work?

@erahhal
Copy link
Author

erahhal commented Jun 2, 2023

sway does work fine, it's been solid for a while for me. Posting from sway right now. I'm switching to Hyprland for the better functionality and hidpi Xwayland.

@erahhal
Copy link
Author

erahhal commented Jun 2, 2023

cucked by mesa, not really a hl problem. Does sway-git work?

Should I be looking for help elsewhere? Mesa project? What is the failure mode here? I don't really understand what is happening from the logs. My setup is pretty straightfoward btw.

@NotAShelf
Copy link
Member

is your nixos configuration available somewhere?

@erahhal
Copy link
Author

erahhal commented Jun 4, 2023

Yes, it's here:

https://github.com/erahhal/nixcfg

The host with the issue is upaya, loaded from the root flake.nix.

Thanks!~~

@NotAShelf
Copy link
Member

I have a rising suspicion that it's the

   # NVidia support
    LIBVA_DRIVER_NAME = "nvidia";
    GBM_BACKEND = "nvidia-drm";
    __GLX_VENDOR_LIBRARY_NAME = "nvidia";
    WLR_NO_HARDWARE_CURSORS = "1";

section. I have had trouble with those variables (more specifically GBM_BACKEND and __GLX_VENDOR_LIBRARY_NAME ones), please try removing nvidia related env vars one by one (except the hardware cursors one.)

@erahhal
Copy link
Author

erahhal commented Jun 4, 2023

Awesome, thank you. In the end it was only one var that caused the problem:

GBM_BACKEND

Posting this from Hyprland :) Thanks again.

@NotAShelf
Copy link
Member

Happy to help.

@vaxerski
Copy link
Member

vaxerski commented Jun 4, 2023

Assuming this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants