Re: Hyprland crash at start since 0.41.1

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 15 Jun 2024 15:02:07 UTC
(CC'ing x11@ list to let other users chime in if it's common)
cenhj <cenhj@zju.edu.cn> writes:

> Hello,
>
> Since the port hyprland updated to 0.41.1, I can't run it at
> start. The situation
> is the same with 0.41.1_1. The system is FreeBSD 14.1-RELEASE, and
> other ports are
> up to date.

What GPU and drm-*-kmod version? I use drm-515-kmod with Ubuntu fixups
as described in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274770#c5
with Intel Skylake GT2 on -CURRENT where hyprland-0.41.1_1 appears to work fine.

Maybe try https://cgit.FreeBSD.org/ports/commit/?id=a81bdbc5d906 but it's
unlikely to be related to your kernel crash.

> Every time entering `Hyprland` in TTY, the screen seems to get power
> off and the system
> is going to restart. Tried to get the crash log, but it is empty. I
> can only attain info from

When Hyprland itself crashes seat usually restores VT terminal. If the
screen is blank switching VT tends to restore it, after which you can
restart Hyprland.

Does Hyprland also crash kernel if started under Sway? It's supposed to
spawn a window which can be used for debugging or initial configuration.

> dmesg:
>
> Fatal trap 9: general protection fault while in kernel mode
> cpuid = 4; apic id = 04
> instruction pointer = 0x20:0xffffffff80629154
> stack pointer = 0x0:0xfffffe0192585aa0
> frame pointer = 0x0:0xfffffe0192585aa0
> code segment = base 0x0, limit 0xfffff, type 0x1b
> = DPL 0, pres 1, long 1, def32 0, gran 1
> processor eflags = interrupt enabled, resume, IOPL = 0
> current process = 97492 (Hyprland)
> rdi: 75e3ba3d79a3ba51 rsi: 0000000000000010 rdx: 0000000000000400
> rcx: 0000000000000002 r8: fffffe0192585c00 r9: fffffe0192585c18
> rax: 0000000000000000 rbx: fffffe00054a1b80 rbp: fffffe0192585aa0
> r10: 0000558f9f3a6fff r11: 00002a705ff55680 r12: 75e3ba3d79a3ba51
> r13: 0000000000000001 r14: 0000000000000010 r15: 75e3ba3d79a3ba39
> trap number = 9
> panic: general protection fault
> cpuid = 4
> time = 1718432663
> Uptime: 20h1m37s
> ---<BOOT>---
>
> Please help me to solve the problem, thank you.

Panic messages are rarely enough. At bare minimum you need to provide
kernel backtrace to get a clue where in the code the crash occurs.
After that report on drm-kmod repo, preferably with empty or minimal
Hyprland config that can reproduce the crash.

https://docs.freebsd.org/en/books/developers-handbook/kerneldebug/
https://github.com/freebsd/drm-kmod/issues/