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
21.47k stars 898 forks source link

Crashes often when switching to another VConsole on nixos #2290

Open MininuxDev opened 1 year ago

MininuxDev commented 1 year ago

When i switch to another virtual console and then come back to hyprland, it often crashes, but not systematically, even with an empty config file.

I'm using the nixos package (not from nixpkgs but the flake of this repo) so i don't know if it is specific to nix or not (i can't figure out how to compile from source, i get the error Cannot find source file: itab.c and don't know much about compiling C)

by the way, I tried launching from both greetd and a console, and get the same behavior, even when switching from one hyprland to another

Here is the crash report:

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
This was an accident, I swear!

Hyprland received signal 11 (Segmentation fault)

Version: cc01550aff70a0cbee5b62db5f4a08789244998f

System info:
    System name: Linux
    Node name: apollo
    Release: 6.3.1-zen1
    Version: #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980

GPU:
    00:02.0 VGA compatible controller [0300]: Intel Corporation UHD Graphics 620 [8086:5917] (rev 07) (prog-if 00 [VGA controller])

os-release:
    BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
    BUILD_ID="23.05.20230506.897876e"
    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_URL="https://nixos.org/community.html"
    VERSION="23.05 (Stoat)"
    VERSION_CODENAME=stoat
    VERSION_ID="23.05"

Backtrace:
    #0 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x824) [0x56f264]
            #1 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(_Z25handleUnrecoverableSignali+0x3f) [0x548edf]
            #2 | /nix/store/0z5kcds7b6qmm373s3b5w9ykvqbgw87i-glibc-2.37-8/lib/libc.so.6(+0x38d60) [0x7eff25a52d60]
            #3 | /nix/store/q59v4qicdn7idbxnnif16mks288l1xrq-libinput-1.23.0/lib/libinput.so.10(libinput_device_config_calibration_has_matrix+0) [0x7eff26464d10]
            #4 | /nix/store/q59v4qicdn7idbxnnif16mks288l1xrq-libinput-1.23.0/lib/libinput.so.10(libinput_device_config_calibration_set_matrix+0x11) [0x7eff26464d41]
            #5 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(_ZN13CInputManager21setTouchDeviceConfigsEv+0x127) [0x4a4767]
            #6 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(_ZN13CInputManager14newTouchDeviceEP16wlr_input_device+0x17c) [0x4acb1c]
            #7 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(_ZN6Events17listener_newInputEP11wl_listenerPv+0x133) [0x4db5b3]
            #8 | /nix/store/jy6dg2nibz7lafac4x29nrrmpwhyhq23-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7eff2675fa0c]
            #9 | /nix/store/jy6dg2nibz7lafac4x29nrrmpwhyhq23-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7eff2675fa0c]
            #10 | /nix/store/9868immj1hcfifqy0hxqxw5wkngfxxih-wlroots-hyprland-2023-04-25_6830bfc/lib/libwlroots.so.12(+0x5abae) [0x7eff2669bbae]
            #11 | /nix/store/9868immj1hcfifqy0hxqxw5wkngfxxih-wlroots-hyprland-2023-04-25_6830bfc/lib/libwlroots.so.12(+0x59e5b) [0x7eff2669ae5b]
            #12 | /nix/store/jy6dg2nibz7lafac4x29nrrmpwhyhq23-wayland-1.22.0/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7eff267618e2]
            #13 | /nix/store/jy6dg2nibz7lafac4x29nrrmpwhyhq23-wayland-1.22.0/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7eff2675f445]
            #14 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(main+0x488) [0x46d438]
            #15 | /nix/store/0z5kcds7b6qmm373s3b5w9ykvqbgw87i-glibc-2.37-8/lib/libc.so.6(+0x23ace) [0x7eff25a3dace]
            #16 | /nix/store/0z5kcds7b6qmm373s3b5w9ykvqbgw87i-glibc-2.37-8/lib/libc.so.6(__libc_start_main+0x89) [0x7eff25a3db89]
            #17 | /nix/store/1xpdf32lbmqrbl5v7g3nc4nf8z9nhndk-hyprland-0.25.0+date=2023-05-12_cc01550/bin/Hyprland(_start+0x25) [0x47c605]

Log tail:
[LOG] Set the keyboard layout to fr, us and variant to , colemak_dh_iso for keyboard "SIGMACHIP Trust Keyboard System Control"
[LOG] New keyboard created, pointers Hypr: 26e1880 and WLR: 2798b28
[LOG] Attached a keyboard with name Logitech G502
[LOG] Registered signal for owner 28396e0: 252fd90 -> 28396e8 (owner: Keyboard)
[LOG] Registered signal for owner 28396e0: 252fd80 -> 2839750 (owner: Keyboard)
[LOG] Registered signal for owner 28396e0: 252fc60 -> 2839820 (owner: Keyboard)
[LOG] Registered signal for owner 28396e0: 252fda0 -> 28397b8 (owner: Keyboard)
[LOG] ApplyConfigToKeyboard for "logitech-g502", hasconfig: 0
[LOG] Attempting to create a keymap for layout fr, us with variant , colemak_dh_iso (rules: , model: , options: )
[LOG] Set the keyboard layout to fr, us and variant to , colemak_dh_iso for keyboard "Logitech G502"
[LOG] New keyboard created, pointers Hypr: 28396e0 and WLR: 252fc48
[LOG] Attached a mouse with name Logitech G502
[LOG] New mouse has libinput sens 0.00 (0.00) with accel profile 2 (2)
[LOG] Applied config to mouse sigmachip-trust-keyboard-consumer-control-1, sens 0.00
[LOG] Applied config to mouse logitech-g502-1, sens 0.00
[LOG] Registered signal for owner 364e4c0: 252fde0 -> 364e580 (owner: Mouse)
[LOG] New mouse created, pointer WLR: 252fdc8
[LOG] Attached a keyboard with name USB PnP Audio Device
[LOG] Registered signal for owner 253f9c0: 253f5d0 -> 253f9c8 (owner: Keyboard)
[LOG] Registered signal for owner 253f9c0: 253f5c0 -> 253fa30 (owner: Keyboard)
[LOG] Registered signal for owner 253f9c0: 253f4a0 -> 253fb00 (owner: Keyboard)
[LOG] Registered signal for owner 253f9c0: 253f5e0 -> 253fa98 (owner: Keyboard)
[LOG] ApplyConfigToKeyboard for "usb-pnp-audio-device", hasconfig: 0
[LOG] Attempting to create a keymap for layout fr, us with variant , colemak_dh_iso (rules: , model: , options: )
[LOG] Set the keyboard layout to fr, us and variant to , colemak_dh_iso for keyboard "USB PnP Audio Device"
[LOG] New keyboard created, pointers Hypr: 253f9c0 and WLR: 253f488
[LOG] Attached a mouse with name MSFT0001:02 06CB:7F8F Mouse
[LOG] New mouse has libinput sens 0.00 (0.00) with accel profile 2 (2)
[LOG] Applied config to mouse sigmachip-trust-keyboard-consumer-control-1, sens 0.00
[LOG] Applied config to mouse logitech-g502-1, sens 0.00
[LOG] Applied config to mouse msft0001:02-06cb:7f8f-mouse, sens 0.00
[LOG] Registered signal for owner 3642070: 24d0270 -> 3642130 (owner: Mouse)
[LOG] New mouse created, pointer WLR: 24d0258
[LOG] Attached a mouse with name MSFT0001:02 06CB:7F8F Touchpad
[LOG] New mouse has libinput sens 0.00 (0.00) with accel profile 2 (2)
[LOG] Applied config to mouse sigmachip-trust-keyboard-consumer-control-1, sens 0.00
[LOG] Applied config to mouse logitech-g502-1, sens 0.00
[LOG] Applied config to mouse msft0001:02-06cb:7f8f-mouse, sens 0.00
[LOG] Applied config to mouse msft0001:02-06cb:7f8f-touchpad, sens 0.00
[LOG] Registered signal for owner 3651710: 24d0a10 -> 36517d0 (owner: Mouse)
[LOG] New mouse created, pointer WLR: 24d09f8
[LOG] Attached a tablet tool with name Wacom HID 50EE Pen
[LOG] Attaching tablet to cursor!
[LOG] Registered signal for owner 24737d0: 24d13c0 -> 2473970 (owner: Tablet)
[LOG] Registered signal for owner 24737d0: 24d13f0 -> 2473838 (owner: Tablet)
[LOG] Registered signal for owner 24737d0: 24d1410 -> 24737d0 (owner: Tablet)
[LOG] Registered signal for owner 24737d0: 24d1420 -> 24738a0 (owner: Tablet)
[LOG] Registered signal for owner 24737d0: 24d1400 -> 2473908 (owner: Tablet)
[LOG] Setting calibration matrix for device wacom-hid-50ee-pen
[LOG] Attached a touch device with name Wacom HID 50EE Finger

(@fufexan it seems i have to ping you for nix issues)

fufexan commented 1 year ago

I don't know where the issue stems from, but to compile manually you can run this inside the cloned repo:

$ nix develop
$ meson setup build
$ ninja -C build

After it compiles, you can run Hyprland from within the build directory.

MininuxDev commented 1 year ago

That's what i did (also tried with make all) but i get this

| Building itab.c/itab.h...
| -- Configuring done
| CMake Error at libudis86/CMakeLists.txt:30 (add_library):
| Cannot find source file:

| itab.c

| Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
| .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

| CMake Error at libudis86/CMakeLists.txt:30 (add_library):
| No SOURCES given to target: libudis86

I also tried with nix-shell -p udis86, same error

fufexan commented 1 year ago

That will not work. You need to use the flake devshell, otherwise you're just making things hard for yourself.

MininuxDev commented 1 year ago

Yes that's what i did, i ran nix develop first, then meson

vaxerski commented 1 year ago

should be fixed with 7c207243e41b5b4f35d790767ad2e21eba1b7a0b

MininuxDev commented 1 year ago

Hmm it's still happening :( hyprlandCrashReport7943.txt

I tried several times, and there is no consistency at all, sometimes i can switch to tty and back to hyprland up to 10 times to have a crash, and sometimes it happens the first time

edit: Could it be my hardware too ? i should try on arch later and see if it happens too

vaxerski commented 1 year ago

what if you unplug your wacom

MininuxDev commented 1 year ago

That's gonna be hard, since the "wacom" is actually the touch screen of my laptop... (lenovo yoga 720)

MininuxDev commented 1 year ago

That's gonna be hard, since the "wacom" is actually the touch screen of my laptop... (lenovo yoga 720)

Is it possible as a workaround for the moment to disable the input from this device ? i rarely use the touchscreen, and even less the stylus

fufexan commented 1 year ago

@MininuxDev you could try blacklisting the kernel module responsible for wacom, if there's any.

MininuxDev commented 1 year ago

Thanks it worked, it was i2c_hid_acpi, and now that i unloaded it it works. But i don't know if it is the "finger" device or the "stylus" device that causes the issue (and i can't find how to disable only one of them, i don't have the stylus to test anyway), at least it is confirmed it's because of the wacom Should i rename the issue accordingly ?

vale981 commented 1 year ago

I have the same issue with another touchscreen, and it appears that unloading i2c_hid_acpi might help. Similarly, my crash logs ends with

[LOG] Attached a touch device with name LXT2021:00 29BD:3201