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.69k stars 832 forks source link

Fatal Crash on Intel iGPU, inconsistently crashes entire OS #6346

Open BobGoldham opened 3 months ago

BobGoldham commented 3 months ago

System Info and Version

System/Version info hyprctl unusable as Hyprland won't start in the first place. Please provide further instructions on what to put here.

Bug or Regression?

Bug

Description

Attempting to start Hyprland either yields crash1 or, when manually linking my GPU to .config/hypr/card, crash2.

I have explicitly set the kernel parameter i915.modeset=1

Most of the time, though not always (and I can't seem to identify what determines this), it also crashes my entire laptop into a state where the monitor is off and capslock key blinking. The laptop becomes trapped in that state for a while until eventually the BIOS resets itself, which leads to me having to re-adjust the clock time and boot settings. I have attached a core dump that I think is related to these occurences, but I'm not sure I've identified that correctly.

sway crashes with similar issue, weston works fine. I can start Hyprland from within weston. This leads me to believe that the issue is related to how WLRoots handles DRM devices.

How to reproduce

$ lspci | grep 'VGA'
00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics G1 (Ice Lake) (rev 07)

Crash reports, logs, images, videos

crash1 crash2 coredump.txt

MightyPlaza commented 3 months ago

[backend/session/session.c:407] Unable to open /home/user/.config/hypr/card as DRM device that's on both crashes and I don't think it's right

BobGoldham commented 3 months ago

[backend/session/session.c:407] Unable to open /home/user/.config/hypr/card as DRM device that's on both crashes and I don't think it's right

I agree that doesn't seem right. I have attempted both not providing a symlink, providing a symlink to /dev/dri/by-path/...-card and (for completeness' sake and because I figured it wouldn't do anything worse at least) /dev/dri/by-path/...-render.

None of these seem to be recognized as a valid DRM device.

Notably linking ...-card yields a [backend/session/session.c:381] Ignoring '/home/user/.config/hypr/card': not a KMS device

MightyPlaza commented 3 months ago

why do you keep providing the drm device it should pick it automatically please send the crash report without setting WLR_DRM_DEVICES

BobGoldham commented 3 months ago

The envvar WLR_DRM_DEVICES is unset. Not linking anything to .config/hypr/card crashes with the same symptoms (screen goes black, capslock blinking, bios resets), but yields no logs in ~/.cache/hypr. It appears that the OS crashes "too fast" for the log to write?

I also find it highly concerning that this doesn't just crash the compositor, but my entire OS and apparently, somehow, resets my UEFI settings!?

journalctl -b 1 -x has the following to say about that coredump.txt

MightyPlaza commented 3 months ago

can you try starting from a tty without lightdm?

BobGoldham commented 3 months ago

That's what I have been doing. My DM (sddm) was simply running in another tty. Disabling and stopping it then attempting to start Hyprland yields the same results.

Interestingly, disabling sddm does not appear to work. The change will not persist across the "forced reboot" of crashing my system in this way. I can, however, stop it or kill the process and still reproduce.