hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.52k stars 818 forks source link

m_pAqBackend couldn't start, hyprland crashes #6967

Open alyraffauf opened 1 month ago

alyraffauf commented 1 month ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: 2024-06-25 Tag: v0.41.2, commits: 918d8340afd652b011b937d29d5eea0be08467f5 flags: (if any) System Information: System name: Linux Node name: petalburg Release: 6.9.10 Version: #1-NixOS SMP PREEMPT_DYNAMIC Thu Jul 18 11:22:56 UTC 2024 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.05.20240719.0c53b6b" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.05 (Uakari)" SUPPORT_END="2024-12-31" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.05 (Uakari)" VERSION_CODENAME=uakari VERSION_ID="24.05" plugins: ======Config-Start====== Config File: /home/aly/.config/hypr/hyprland.conf: Read Succeeded exec-once = /nix/store/g56mlyricr13dqsra9ag6kh8m5v66r70-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target $mod=SUPER animations { bezier=myBezier,0.05,0.9,0.1,1.05 animation=border,1,10,default animation=borderangle,1,8,default animation=fade,1,7,default animation=specialWorkspace,1,6,default,slidevert animation=windows,1,7,myBezier animation=windowsOut,1,7,default,popin 80% animation=workspaces,1,6,default enabled=true } decoration { blur { enabled=true passes=1 size=8 } col.shadow=rgba(1A1A1AEE) dim_special=0.500000 drop_shadow=true layerrule=blur,launcher layerrule=blur,logout_dialog layerrule=blur,notifications layerrule=blur,swayosd layerrule=blur,waybar layerrule=ignorezero,notifications layerrule=ignorezero,swayosd layerrule=ignorezero,waybar rounding=10 shadow_range=4 shadow_render_power=3 } dwindle { preserve_split=true } general { allow_tearing=false border_size=2 col.active_border=rgba(CA9EE6EE) rgba(78AEEDEE) 45deg col.inactive_border=rgba(242424AA) gaps_in=5 gaps_out=6 layout=dwindle } gestures { workspace_swipe=true workspace_swipe_touch=true } input { tablet { output=eDP-1 } touchdevice { output=eDP-1 } touchpad { clickfinger_behavior=true drag_lock=true middle_button_emulation=true natural_scroll=true tap-to-click=true } follow_mouse=1 kb_layout=us kb_variant=altgr-intl sensitivity=0 } master { always_center_master=true new_status=false } misc { disable_hyprland_logo=true disable_splash_rendering=true focus_on_activate=true vfr=true } xwayland { force_zero_scaling=true } bind=$mod CONTROL,F12,exec,/nix/store/j2zy9f6mch1s5nmw5a0pya2spva2m9xx-hyprshot-1.2.3/bin/hyprshot -m region -o /home/aly/pics/screenshots bind=$mod CONTROL,L,exec,/nix/store/yp0fgqqr036ziishc7k522071n558apw-swaylock-1.7.2/bin/swaylock bind=$mod SHIFT,S,movetoworkspace,special:magic bind=$mod SHIFT,V,togglefloating bind=$mod SHIFT,W,fullscreen bind=$mod SHIFT,backslash,togglesplit bind=$mod SHIFT,comma,exec,/nix/store/yqby2lr3gqfhlc64b4vj7j64c10sdd5n-hyprnome-0.3.0/bin/hyprnome --previous --move bind=$mod SHIFT,period,exec,/nix/store/yqby2lr3gqfhlc64b4vj7j64c10sdd5n-hyprnome-0.3.0/bin/hyprnome --move bind=$mod,B,exec,/nix/store/l94h73y1pnyr8m3jpwgy91x0vfv02vz9-firefox-128.0/bin/firefox bind=$mod,C,killactive bind=$mod,E,exec,/nix/store/6xk0j54s5fcsf7ivxysy0nb58d6iw4ii-zed-0.141.3/bin/zed bind=$mod,F,exec,/nix/store/mjxi1wppnv7j5dq7lw6akakym7h7rksm-nemo-6.0.2/bin/nemo bind=$mod,F11,exec,pkill -SIGUSR1 waybar bind=$mod,M,exec,/nix/store/lmz5zs0j5h01lkac21fwns88ms799gwc-wlogout-1.2.2/bin/wlogout bind=$mod,PRINT,exec,/nix/store/j2zy9f6mch1s5nmw5a0pya2spva2m9xx-hyprshot-1.2.3/bin/hyprshot -m region -o /home/aly/pics/screenshots bind=$mod,R,exec,/nix/store/q9ihfyl7jsvigxp6r0zgxibwpffbkd5n-fuzzel-1.10.2/bin/fuzzel bind=$mod,S,togglespecialworkspace,magic bind=$mod,T,exec,/nix/store/n27akl2hawkr9bcxq8rq6yawrxvgnp23-alacritty-0.13.2/bin/alacritty bind=$mod,comma,exec,/nix/store/yqby2lr3gqfhlc64b4vj7j64c10sdd5n-hyprnome-0.3.0/bin/hyprnome --previous bind=$mod,mouse_down,workspace,+1 bind=$mod,mouse_up,workspace,-1 bind=$mod,period,exec,/nix/store/yqby2lr3gqfhlc64b4vj7j64c10sdd5n-hyprnome-0.3.0/bin/hyprnome bind=,PRINT,exec,/nix/store/j2zy9f6mch1s5nmw5a0pya2spva2m9xx-hyprshot-1.2.3/bin/hyprshot -m output -o /home/aly/pics/screenshots bind=CONTROL,F12,exec,/nix/store/j2zy9f6mch1s5nmw5a0pya2spva2m9xx-hyprshot-1.2.3/bin/hyprshot -m output -o /home/aly/pics/screenshots bind=CTRL ALT,M,submap,move bind=CTRL ALT,R,submap,resize bind=$mod SHIFT,1,movetoworkspace,1 bind=$mod SHIFT,2,movetoworkspace,2 bind=$mod SHIFT,3,movetoworkspace,3 bind=$mod SHIFT,4,movetoworkspace,4 bind=$mod SHIFT,5,movetoworkspace,5 bind=$mod SHIFT,6,movetoworkspace,6 bind=$mod SHIFT,7,movetoworkspace,7 bind=$mod SHIFT,8,movetoworkspace,8 bind=$mod SHIFT,9,movetoworkspace,9 bind=$mod,1,workspace,1 bind=$mod,2,workspace,2 bind=$mod,3,workspace,3 bind=$mod,4,workspace,4 bind=$mod,5,workspace,5 bind=$mod,6,workspace,6 bind=$mod,7,workspace,7 bind=$mod,8,workspace,8 bind=$mod,9,workspace,9 bind=$mod CONTROL SHIFT,down,movecurrentworkspacetomonitor,d bind=$mod CONTROL SHIFT,h,movecurrentworkspacetomonitor,l bind=$mod CONTROL SHIFT,j,movecurrentworkspacetomonitor,d bind=$mod CONTROL SHIFT,k,movecurrentworkspacetomonitor,u bind=$mod CONTROL SHIFT,l,movecurrentworkspacetomonitor,r bind=$mod CONTROL SHIFT,left,movecurrentworkspacetomonitor,l bind=$mod CONTROL SHIFT,right,movecurrentworkspacetomonitor,r bind=$mod CONTROL SHIFT,up,movecurrentworkspacetomonitor,u bind=$mod SHIFT,down,movewindow,d bind=$mod SHIFT,h,movewindow,l bind=$mod SHIFT,j,movewindow,d bind=$mod SHIFT,k,movewindow,u bind=$mod SHIFT,l,movewindow,r bind=$mod SHIFT,left,movewindow,l bind=$mod SHIFT,right,movewindow,r bind=$mod SHIFT,up,movewindow,u bind=$mod,down,movefocus,d bind=$mod,h,movefocus,l bind=$mod,j,movefocus,d bind=$mod,k,movefocus,u bind=$mod,l,movefocus,r bind=$mod,left,movefocus,l bind=$mod,right,movefocus,r bind=$mod,up,movefocus,u bind=SUPER SHIFT,N,movetoworkspace,special:notes bind=SUPER,N,togglespecialworkspace,notes bind=SUPER,P,exec,/nix/store/glgd94v3pcxd0r06pl84w0lc6inz4105-keepassxc-2.7.7/bin/keepassxc bind=,xf86launch4,exec,/nix/store/9rwpjxczncraig088ldahlxc3gabcq9b-python3.11-pp-adjuster-0.1.0/bin/pp-adjuster bind=,xf86launch2,exec,/nix/store/b1p7mz52j9cvcj3vk90an3nxqzs47h0w-playerctl-2.4.1/bin/playerctl play-pause bindl=,xf86audiomute,exec,/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-client --output-volume=mute-toggle bindl=,xf86audiomicmute,exec,/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-client --input-volume=mute-toggle bindl=,xf86audioplay,exec,/nix/store/b1p7mz52j9cvcj3vk90an3nxqzs47h0w-playerctl-2.4.1/bin/playerctl play-pause bindl=,xf86audioprev,exec,/nix/store/b1p7mz52j9cvcj3vk90an3nxqzs47h0w-playerctl-2.4.1/bin/playerctl previous bindl=,xf86audionext,exec,/nix/store/b1p7mz52j9cvcj3vk90an3nxqzs47h0w-playerctl-2.4.1/bin/playerctl next bindl=,switch:Lenovo Yoga Tablet Mode Control switch,exec,/nix/store/fpfc5pkx56k3n30l1r83apgfgvp2anzm-hyprland-tablet bindl=,switch:on:Lid Switch,exec,/nix/store/bf69sivqidca2a0j07m8wzwijv8l3zma-hyprland-clamshell on bindl=,switch:off:Lid Switch,exec,/nix/store/bf69sivqidca2a0j07m8wzwijv8l3zma-hyprland-clamshell off bindle=,xf86monbrightnessup,exec,/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-client --brightness=raise bindle=,xf86monbrightnessdown,exec,/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-client --brightness=lower bindle=,xf86audioraisevolume,exec,/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-client --output-volume=raise bindle=,xf86audiolowervolume,exec,/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-client --output-volume=lower bindm=$mod,mouse:272,movewindow bindm=$mod,mouse:273,resizewindow exec-once=/nix/store/ynacjfkl4y7zyp0i9f22lm1pzrhvjjnb-hyprland-randomWallpaper exec-once=/nix/store/1zyfdh4j724ap0l80w2phd47v4jnxbd3-waybar-0.10.3/bin/waybar exec-once=/nix/store/gp6w06pibkly75wdyazlbys3iqv2i6il-hyprland-idled exec-once=/nix/store/cip79l4krhgbamc2jk795nljrxh54llk-wayland-pipewire-idle-inhibit-0.5.1/bin/wayland-pipewire-idle-inhibit exec-once=/nix/store/969y31x2b218wy4ldc8zmp3lmfi1czfs-blueman-2.4.1/bin/blueman-applet exec-once=/nix/store/x8p7fm3yzii8wgz658gix058rnqvnbrv-network-manager-applet-1.36.0/bin/nm-applet exec-once=/nix/store/b1p7mz52j9cvcj3vk90an3nxqzs47h0w-playerctl-2.4.1/bin/playerctld exec-once=/nix/store/r11x153jkmsl7z0xvsnldaikvsq36l7s-swayosd-0-unstable-2024-04-15/bin/swayosd-server exec-once=/nix/store/8nnfmqwa36aiza4mpc2d7byqfrzhx9lp-mako-1.9.0/bin/mako exec-once=/nix/store/k09qk6h6ai6q4j0smnq3dgix1z0fk1c0-mate-polkit-1.28.1/libexec/polkit-mate-authentication-agent-1 exec-once=/nix/store/yai4qgijay26jxfwxq3gap9zing7dan4-gammastep-2.0.9/bin/gammastep -l 33.74:-84.38 exec-once=sleep 1 && /nix/store/glgd94v3pcxd0r06pl84w0lc6inz4105-keepassxc-2.7.7/bin/keepassxc exec-once=/nix/store/w8vkw9c216ypgkm23dsq0ppn8dwcjzgr-iio-hyprland-unstable-2023-09-27/bin/iio-hyprland "desc:Samsung Display Corp. 0x4152" monitor=,preferred,auto,auto monitor=desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0 monitor=desc:Guangxi Century Innovation Display Electronics Co. Ltd 27C1U-D 0000000000001,preferred,-2400x0,1.6 monitor=desc:HP Inc. HP 24mh 3CM037248S,preferred,-1920x0,auto monitor=desc:LG Electronics LG IPS QHD 109NTWG4Y865,preferred,-2560x0,auto windowrulev2=center(1),class:(.blueman-manager-wrapped) windowrulev2=center(1),class:(com.github.wwmm.easyeffects) windowrulev2=center(1),class:(pavucontrol) windowrulev2=float, class:^(firefox)$, title:^(Picture-in-Picture)$ windowrulev2=float,class:(.blueman-manager-wrapped) windowrulev2=float,class:(com.github.wwmm.easyeffects) windowrulev2=float,class:(pavucontrol) windowrulev2=move 70% 20%, class:^(firefox)$, title:^(Picture-in-Picture)$ windowrulev2=pin,class:^(firefox)$, title:^(Picture-in-Picture)$ windowrulev2=size 40% 60%,class:(.blueman-manager-wrapped) windowrulev2=size 40% 60%,class:(com.github.wwmm.easyeffects) windowrulev2=size 40% 60%,class:(pavucontrol) windowrulev2=suppressevent maximize, class:.* windowrulev2=center(1),class:(org.keepassxc.KeePassXC) windowrulev2=float,class:(org.keepassxc.KeePassXC) windowrulev2=size 80% 80%,class:(org.keepassxc.KeePassXC) windowrulev2=workspace 1,class:(brave-browser) windowrulev2=workspace 1,class:(firefox) windowrulev2=workspace 2,class:(codium-url-handler) windowrulev2=workspace 2,class:(dev.zed.Zed) windowrulev2=workspace 3,class:(firework) windowrulev2=workspace 3,class:(google-chrome) windowrulev2=workspace special:magic,class:(WebCord) windowrulev2=workspace special:magic,class:(org.gnome.Fractal) workspace=1,defaultName:web,on-created-empty:/nix/store/l94h73y1pnyr8m3jpwgy91x0vfv02vz9-firefox-128.0/bin/firefox workspace=2,defaultName:code,on-created-empty:/nix/store/6xk0j54s5fcsf7ivxysy0nb58d6iw4ii-zed-0.141.3/bin/zed workspace=special:magic,on-created-empty:/nix/store/0dx2dzxnb2d3iwryvxhrd05j5k8xyg8i-fractal-7/bin/fractal workspace=special:notes,on-created-empty:/nix/store/yxl6gw0nxr28qnvh0h5dq3a9wcvs893i-obsidian-1.5.12/bin/obsidian submap=resize binde=,down,resizeactive,0 10 binde=,left,resizeactive,-10 0 binde=,right,resizeactive,10 0 binde=,up,resizeactive,0 -10 binde=,j,resizeactive,0 10 binde=,h,resizeactive,-10 0 binde=,l,resizeactive,10 0 binde=,k,resizeactive,0 -10 bind=,escape,submap,reset submap=reset submap=move bind=CONTROL,down,movecurrentworkspacetomonitor,d bind=CONTROL,h,movecurrentworkspacetomonitor,l bind=CONTROL,j,movecurrentworkspacetomonitor,d bind=CONTROL,k,movecurrentworkspacetomonitor,u bind=CONTROL,l,movecurrentworkspacetomonitor,r bind=CONTROL,left,movecurrentworkspacetomonitor,l bind=CONTROL,right,movecurrentworkspacetomonitor,r bind=CONTROL,up,movecurrentworkspacetomonitor,u bind=,down,movewindow,d bind=,h,movewindow,l bind=,j,movewindow,d bind=,k,movewindow,u bind=,l,movewindow,r bind=,left,movewindow,l bind=,right,movewindow,r bind=,up,movewindow,u bind=,1,workspace,1 bind=,2,workspace,2 bind=,3,workspace,3 bind=,4,workspace,4 bind=,5,workspace,5 bind=,6,workspace,6 bind=,7,workspace,7 bind=,8,workspace,8 bind=,9,workspace,9 bind=,comma,exec,/nix/store/yqby2lr3gqfhlc64b4vj7j64c10sdd5n-hyprnome-0.3.0/bin/hyprnome --previous --move bind=,period,exec,/nix/store/yqby2lr3gqfhlc64b4vj7j64c10sdd5n-hyprnome-0.3.0/bin/hyprnome --move bind=,escape,submap,reset submap=reset ======Config-End======== ```

Description

Hyprland (post-aquamarine) is crashing on startup, claiming it can not find a GPU.

How to reproduce

Start Hyprland with greetd or from tty, it crashes almost instantly.

Crash reports, logs, images, videos

hyprlandCrashReport111372.txt

Ciflire commented 1 month ago

I've had the same problem Changing AQ_WLR_DEVICES to WLR_DRM_DEVICES fixed it for some reason

izmyname commented 1 month ago

https://github.com/hyprwm/Hyprland/issues/6956 might be related.

AQ_WLR_DEVICES

what? It's AQ_DRM_DEVICES

alyraffauf commented 1 month ago

hyprlandCrashReport57187.txt

Same error on another PC, neither are multi-GPU setups.

alyraffauf commented 1 month ago

set env = AQ_DRM_DEVICES,/dev/dri/card1, same crash.

GimmeDataNow commented 1 month ago

I have the same exact issue, I have tested AQ_WLR_DEVICES, WLR_DRM_DEVICES, AQ_DRM_DEVICES, none change the crash message.

(in order:) hyprlandCrashReport133.txt hyprlandCrashReport152.txt hyprlandCrashReport1423.txt

bjsemrad commented 1 month ago

If I try to launch from Gdm login as well, I get the same / similar error as the other crash reports. If this helps at all, I'll grab crash report later.

ikalco commented 1 month ago

can you give hyprland log with HYPRLAND_TRACE=1 and AQ_TRACE=1

GimmeDataNow commented 1 month ago

I am not sure if you mean setting export HYPRLAND_TRACE=1 and export AQ_TRACE=1 in the shell and then running Hyprland or setting this as an env var in the hyprland.conf, but I've done both. Here are the logs:

hyprlandCrashReport1334.txt hyprlandCrashReport1479.txt

ikalco commented 1 month ago

i meant something like this HYPRLAND_TRACE=1 AQ_TRACE=1 Hyprland from tty then give log from /run/user/1000/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log btw $HYPRLAND_INSTANCE_SIGNATURE will prob be unset when you crash back to tty so just grab the newest file from there

GimmeDataNow commented 1 month ago

Ok, this is weird. when I do HYPRLAND_TRACE=1 AQ_TRACE=1 Hyprland then Hyprland runs just fine, but Hyprland doesn't wtf. Anyways here is the log of it running:

hyprland.log

Btw I am running nixos, so I can share my whole system if you want

Edit: After another reboot this no longer happens and it just doesn't work anymore.

ikalco commented 1 month ago

try setting AQ_DRM_DEVICES to intel igpu when running from tty aswell and give the same log the hyprland.log you gave is using an nvidia gpu

GimmeDataNow commented 1 month ago

I don't have an intel igpu. Here is what lspci | grep -E 'VGA|3D' returns: 07:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)

Anyways, here are some more logs in case you care (Hyprland crashes):

hyprland.log

hyprland.log

EDIT: I have set AQ_WLR_DEVICES, WLR_DRM_DEVICES, AQ_DRM_DEVICES all to /dev/dri/card1 in the hyprland config. And it now works even after several reboots (without the HYPRLAND_TRACE=1 AQ_TRACE=1 ). Could anybody else also set all these to verify?

ikalco commented 1 month ago

this seems like you have simple-framebuffer enabled in your kernel, could be from upgrading to 6.10.0 try putting initcall_blacklist=simpledrm_platform_driver_init in your kernel params

ikalco commented 1 month ago

EDIT: I have set AQ_WLR_DEVICES, WLR_DRM_DEVICES, AQ_DRM_DEVICES all to /dev/dri/card1 in the hyprland config. And it now works even after several reboots (without the HYPRLAND_TRACE=1 AQ_TRACE=1 ). Could anybody else also set all these to verify?

you only need AQ_DRM_DEVICES env var to be set also setting explicit gpu will make AQ not use simple-framebuffer which fixes your issue

GimmeDataNow commented 1 month ago

this seems like you have simple-framebuffer enabled in your kernel, could be from upgrading to 6.10.0 try putting initcall_blacklist=simpledrm_platform_driver_init in your kernel params

Does initcall_blacklist=simpledrm_platform_driver_init affect any other applications?

Regardless this issue seems to be fixed on my end somehow. I'll keep testing and if there is an issue I'll be back

ikalco commented 1 month ago

this seems like you have simple-framebuffer enabled in your kernel, could be from upgrading to 6.10.0 try putting initcall_blacklist=simpledrm_platform_driver_init in your kernel params

Does initcall_blacklist=simpledrm_platform_driver_init affect any other applications?

Regardless this issue seems to be fixed on my end somehow. I'll keep testing and if there is an issue I'll be back

it might, but you're right you should just use AQ_DRM_DEVICES instead

bjsemrad commented 1 month ago

I have a different error with AQ saying it cannot find the GPU..... hyprlandCrashReport7871.txt

ikalco commented 1 month ago

[LOG] [AQ] drm: Explicit device list /dev/dri/card1 [ERR] [AQ] drm: Explicit device /dev/dri/card1 not found

are you sure /dev/dri/card1 is there if it is give the same trace hyprland.log as the other guy did

bjsemrad commented 1 month ago

I am sure.....

> lspci | grep -E 'VGA|3D' 0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] (rev c1)

> ls -l /dev/dri/by-path
total 0
lrwxrwxrwx 1 root root  8 Jul 22 20:59 pci-0000:0a:00.0-card -> ../card1
lrwxrwxrwx 1 root root 13 Jul 22 20:59 pci-0000:0a:00.0-render -> ../renderD128

Anyway attached the latest crash log, which now atleast shows a different error, I just removed AQ explicit env and tried again now it looks like just wayland.

Attached for reference. hyprlandCrashReport7109.txt

Or did I miss understand the log you wanted?

ikalco commented 1 month ago

sorry i meant the /run/user/1000/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprlandd.log and the new crash seems related to the other issue so i might know what it is

bjsemrad commented 1 month ago

Whoops sorry I missed that here you go:

hyprland.log

fiskhest commented 1 month ago

Setting env = AQ_DRM_DEVICES,/dev/dri/card1 fixed it for me, on a multi-GPU intel / Nvidia setup (albeit with the Nvidia GPU disabled)

ikalco commented 1 month ago

@bjsemrad try aquamarine with this patch patch.txt

sjcobb2022 commented 1 month ago

I am having the same issue. Also on NixOS with a hybrid /Nvidia laptop.

With wlroots I had a symlink to /.config/hypr/card. This no longer works, and says that the card does not exist. This may be a totally separate issue, as this means aquamarine may not be able to resolve symlinks.

Hardcoding the path (to my amd iGPU) gives me this crash log:

hyprlandCrashReport5291.txt

It seems to find the card, start aquamarine and the Wayland backend, but the backend is unable to start.

Every single post on this thread is using NixOS, so I assume it is a nix path issue, which would make total sense given the logs.

I hope this info helps.

vaxerski commented 1 month ago

the wayland fail is expected as you are running from a tty and not on a wayland compositor. That's a non-issue.

The issue is:

[ERR] [AQ] Couldn't open a GBM device at fd 25
[ERR] [AQ] Cannot create a GBM Allocator: gbm failed to create a device.
sjcobb2022 commented 1 month ago

Ah so a different issue @vaxerski?

vaxerski commented 1 month ago

I dont remember all the reports but most were about this I believe

sjcobb2022 commented 1 month ago

I am sure.....

> lspci | grep -E 'VGA|3D' 0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] (rev c1)

> ls -l /dev/dri/by-path
total 0
lrwxrwxrwx 1 root root  8 Jul 22 20:59 pci-0000:0a:00.0-card -> ../card1
lrwxrwxrwx 1 root root 13 Jul 22 20:59 pci-0000:0a:00.0-render -> ../renderD128

Anyway attached the latest crash log, which now atleast shows a different error, I just removed AQ explicit env and tried again now it looks like just wayland.

Attached for reference. hyprlandCrashReport7109.txt

Or did I miss understand the log you wanted?

Ah I didn't see this post getting the same error. With a different file descriptor but nevertheless, the same GBM error.

After quick search (I'm on my phone because I haven't gotten round to pinning hypr to an older version yet), it seems that similar issues on different platforms are caused by outdated or broken Mesa drivers.

Not sure if this helps. Thank you for all your hard work and support @vaxerski

bjsemrad commented 1 month ago

the wayland fail is expected as you are running from a tty and not on a wayland compositor. That's a non-issue.

The issue is:


[ERR] [AQ] Couldn't open a GBM device at fd 25

[ERR] [AQ] Cannot create a GBM Allocator: gbm failed to create a device.

Ok that clarifies it, if I try from Gnome login (GDM) I get the same behavior, I'll have to check if it's running Wayland. This worked fine under WLroots so just trying to understand what is different now.

ikalco commented 1 month ago

vaxry im pretty sure the issue is that gbm_create_device wants the fd from the /dev/dri/card1 but reopenDRMNode gives it a drm lease thats what the patch above removes btw

vaxerski commented 1 month ago

well then I'll let the people speak if it works. On my system it does the lease and we ok.

bjsemrad commented 1 month ago

well then I'll let the people speak if it works. On my system it does the lease and we ok.

What are you using to launch? I will try the patch above but also can swap to SDDM or another login manager.

vaxerski commented 1 month ago

I have no issues with hl from main on my desktop or laptop (desktop tty, laptop sddm)

bjsemrad commented 1 month ago

For what it's worth my above crash and hyprland log above was from running Hyprland from a tty but it did not launch for me on Linux 6.10.0 and latest hl.

sjcobb2022 commented 1 month ago

For those on NixOS who want to test, I have created a patched fork for easy maintenance.

You can put this in your inputs:

aquamarine-patched = {
    url = "github:sjcobb2022/aquamarine-patched";
};

hyprland = {
  type = "git";
  url = "https://github.com/hyprwm/hyprland";

  submodules = true;
  inputs.nixpkgs.follows = "nixpkgs-unstable";
  inputs.aquamarine.follows = "aquamarine-patched";
};
sjcobb2022 commented 1 month ago

After testing with this patched version for a while, with a variety of environment variables, I am getting the same error with a little bit of additional context:

hyprlandCrashReport4361.txt

It is able to open the node, but the GBM device still fails to initiate.

[LOG] [AQ] reopenDRMNode: opening node /dev/dri/renderD129
[ERR] [AQ] Couldn't open a GBM device at fd 25
[ERR] [AQ] Cannot create a GBM Allocator: gbm failed to create a device.
ikalco commented 1 month ago

After testing with this patched version for a while, with a variety of environment variables, I am getting the same error with a little bit of additional context:

hyprlandCrashReport4361.txt

It is able to open the node, but the GBM device still fails to initiate.

[LOG] [AQ] reopenDRMNode: opening node /dev/dri/renderD129
[ERR] [AQ] Couldn't open a GBM device at fd 25
[ERR] [AQ] Cannot create a GBM Allocator: gbm failed to create a device.

oops, try this patch.txt

sjcobb2022 commented 1 month ago

Hey @ikal

So it is now reopening the DRM node of the specified card, but it is still crashing with the same issue.

hyprlandCrashReport4016.txt

[LOG] [AQ] reopenDRMNode: opening node /dev/dri/card1
[ERR] [AQ] Couldn't open a GBM device at fd 27
[ERR] [AQ] Cannot create a GBM Allocator: gbm failed to create a device.

I also made a branch where I spammed traces at every step (without any patches applied, and with the first patch applied). You can find that here.

Here is my total log file of that:

hyprlandCrashReport92514.txt

And the necessary fragment:

[LOG] [AQ] Starting the Wayland backend!
[ERR] [AQ] Wayland backend cannot start: wl_display_connect failed (is a wayland compositor running?)
[ERR] [AQ] Requested backend (wayland) could not start, enabling fallbacks
[ERR] [AQ] Implementation wayland failed, erasing.
[TRACE] [AQ] Opening DRM node: 26
[TRACE] [AQ] lesseeID: 1, leaseFD: 27
[TRACE] [AQ] leaseFD Passed: 27
[TRACE] [AQ] Render device has name inside drmIsMaster: /dev/dri/renderD129
[TRACE] [AQ] Assigning primary allocator with fd: 27
[TRACE] [AQ] Creating a GBM allocator with drm fd 27
[LOG] [AQ] Creating a GBM allocator with fd 27
[ERR] [AQ] Couldn't open a GBM device at fd 27
[ERR] [AQ] Cannot create a GBM Allocator: gbm failed to create a device.

So just to clarify, /dev/dri/renderD129 is the same drmMaster with and without the first patch (this is expected as the second patch gets the right card). Given that this is ripped from WLRoots, I guess this is expected behaviour and may not need to be patched?

We then try to assign a primary allocator here.

In the allocator we then try to create a gbm allocator through the C API, here.

This is the core part that fails.

Given that all the patches fail, (including the patch where the correct card is reopened. I am inclined to believe that this might be a super niche nixOS issue, missing a dependency or the such.

Otherwise, we may be handling these file descriptors wrong somehow, and I wouldn't know where. The AQ implementation is almost a mirror of wlroots, so I have no idea what is wrong.

I am totally new to this codebase so please correct me if I am wrong!

sjcobb2022 commented 1 month ago

I take that back. Adding all the missing dependencies (including X dependencies) from WLRoots to Aquamarine does not do anything at all.

Very weird issue.

sjcobb2022 commented 1 month ago

Just as an updated.

I have been playing around with wlroots vs aquamarine, and it turns out that from wlr I get these errors:

[wlr] [render/allocator/gbm.c:249] gbm_create_device failed.
[wlr] [render/allocator/gbm.c:249] gbm_create_device failed.

This is extremely interesting, as looking through the code at wlroots-hyprland here, this is the only place where this error occurs.

The rest of the codebase (from what I can find), would only ever call any of this function once.

Given that this is the same error we are getting from AQ, I am wondering if there is any similarity between these issues.

I can't find the major different between the wlroots implementation and the AQ implementation, so if anyone knows more about these codebases, help would be great.

sjcobb2022 commented 1 month ago

I just want to ask: how many here are using laptops Vs desktops. I'm wondering if that would be a cause for this?

bjsemrad commented 1 month ago

I have a framework 13 running a 12th gen intel (igpu) and a desktop running a 5800X + 6800XT and both experience the same issue. They are both on NixOS.

alyraffauf commented 1 month ago

It's happening on both my desktop and several laptops, all running NixOS 24.05.

sjcobb2022 commented 1 month ago

Ok so we are all on 24.05. I'll try 23.11 tomorrow and see if that works.

sjcobb2022 commented 1 month ago

Yeh it just doesn't build because of dependencies on 23.11 and I don't wanna patch all of that.

kbredemeier commented 1 month ago

I think i got the same problem. Did anyone figure out to which version I have to pin what to work around this for now? I didn't commit my flake.lock file for quite some time :sweat_smile:

bjsemrad commented 1 month ago

I think i got the same problem. Did anyone figure out to which version I have to pin what to work around this for now? I didn't commit my flake.lock file for quite some time :sweat_smile:

This is my flake I just pin to last release before aquamarine while I debug.

Doing a nix rebuild and update will rewrite the lock file.

hyprland = { type = "git"; url = "https://github.com/hyprwm/Hyprland"; submodules = true; ref = "refs/tags/v0.41.2"; };

sjcobb2022 commented 1 month ago

f642fb97df5c69267a03452533de383ff8023570 for me

sjcobb2022 commented 1 month ago

I know this may not be related, but I feel that https://forums.developer.nvidia.com/t/prime-sync-with-amdgpu-has-black-screen-for-internal-display/198967/12 this forum post could be relevant perhaps?

And in extension this: https://github.com/NixOS/nixpkgs/issues/93489

sjcobb2022 commented 1 month ago

I have a potential theory based on those previous posts. The version of mesa that is used in aquamarine and the version used in my drivers is different.

$ vulkaninfo --summary
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/raj03q8wil10103d050d0ngx4k0qfjyc-mesa-24.0.7-drivers/lib/libvulkan_virtio.so. Skipping this driver.
WARNING: [Loader Message] Code 0 : terminator_CreateInstance: Received return code -3 from call to vkCreateInstance in ICD /nix/store/raj03q8wil10103d050d0ngx4k0qfjyc-mesa-24.0.7-drivers/lib/libvulkan_dzn.so. Skipping this driver.
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
ERROR: [../src/nouveau/vulkan/nvk_physical_device.c:935] Code 0 : VK_ERROR_INCOMPATIBLE_DRIVER
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.283

Instance Extensions: count = 23
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 4
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1

Instance Layers: count = 4
--------------------------
VK_LAYER_INTEL_nullhw       INTEL NULL HW                1.1.73   version 1
VK_LAYER_MESA_device_select Linux device selection layer 1.3.211  version 1
VK_LAYER_MESA_overlay       Mesa Overlay layer           1.3.211  version 1
VK_LAYER_NV_optimus         NVIDIA Optimus layer         1.3.277  version 1

Devices:
========
GPU0:
    apiVersion         = 1.3.274
    driverVersion      = 24.0.7
    vendorID           = 0x1002
    deviceID           = 0x1638
    deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
    deviceName         = AMD Radeon Graphics (RADV RENOIR)
    driverID           = DRIVER_ID_MESA_RADV
    driverName         = radv
    driverInfo         = Mesa 24.0.7
    conformanceVersion = 1.2.7.1
    deviceUUID         = 00000000-0600-0000-0000-000000000000
    driverUUID         = 414d442d-4d45-5341-2d44-525600000000
GPU1:
    apiVersion         = 1.3.277
    driverVersion      = 550.78.0.0
    vendorID           = 0x10de
    deviceID           = 0x2520
    deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
    deviceName         = NVIDIA GeForce RTX 3060 Laptop GPU
    driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
    driverName         = NVIDIA
    driverInfo         = 550.78
    conformanceVersion = 1.3.7.2
    deviceUUID         = 9b810cff-4423-d1a7-e55c-9801c6b0e8ce
    driverUUID         = 16b53f03-9983-54e3-8da5-d5afcf7518e3
GPU2:
    apiVersion         = 1.3.274
    driverVersion      = 0.0.1
    vendorID           = 0x10005
    deviceID           = 0x0000
    deviceType         = PHYSICAL_DEVICE_TYPE_CPU
    deviceName         = llvmpipe (LLVM 17.0.6, 256 bits)
    driverID           = DRIVER_ID_MESA_LLVMPIPE
    driverName         = llvmpipe
    driverInfo         = Mesa 24.0.7 (LLVM 17.0.6)
    conformanceVersion = 1.3.1.1
    deviceUUID         = 6d657361-3234-2e30-2e37-000000000000
    driverUUID         = 6c6c766d-7069-7065-5555-494400000000

The mesa version here is the stable mesa version 24.0.7

Whereas aquamarine uses the unstable version: 24.1.2

Perhaps this could cause this issue?

To mitigate this, I will build entire system with nixos unstable. If I still get the issue, we know that it is not because of the mess version.