Hyprland
Hyprland copied to clipboard
Hyprland cannot handle concurrent addition/removal of monitors
Hyprland Version
System/Version info
Hyprland, built from branch at commit cba1ade848feac44b2eda677503900639581c3f4 (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606
flags: (if any)
System Information:
System name: Linux
Node name: saltybook
Release: 6.3.8-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Wed, 14 Jun 2023 20:10:31 +0000
GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] [8086:46a6] (rev 0c) (prog-if 00 [VGA controller])
DeviceName: Second VGA
os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
plugins:
split-monitor-workspaces by Duckonaut ver 1.1.0
Bug or Regression?
Bug
Description
I have two external monitors connected through a dock to my laptop. When I plug/unplug the dock, depending on Hyprland version and luck, these things could happen randomly:
- Everything works fine (typically only happens when plugging/unplugging for the first time - but not guaranteed).
- Hyprland crashes (very often on current -git version, less often on 0.40.0). The crash report indicates a segfault.
- External monitor is shown in output of
hyprctl monitors
, butcurrentFormat
isInvalid
and the monitor receives no video signal. The monitor becomes a "ghost". I cannot move windows or the cursor to it. I can still usehyprctl keyword
to change its configuration, but there is no way to bring it back to normal. Creating windows on the ghost monitor results in the window being placed on my builtin display, or the remaining good external monitor (if one is still alive - both could become ghosts). - External monitor works but flickers like crazy.
- Fan goes wild and computer freezes. No crash report is generated. Must force reboot. This only happened twice.
This looks very nondeterministic, so I think it's likely synchronization-related (internal data structure corrupt?). Everything is good if I plug/unplug the monitors one by one.
BTW, I cloned Hyprland and played around. I made a debug build but its crash reports do not include a stack trace. Core dump files do not have line numbers and symbol information (all function calls are shown as question marks), so was not really helpful for my investigation. Did I miss something?
How to reproduce
Use 0.40.0 or latest commit. This is reproducible with default configuration.
- Launch Hyprland.
- Plug in a dock with two monitors connected to it.
- If everything works, unplug the dock.
- If everything works, plug it back in.
- Repeat until it breaks. It's unlikely that the issue doesn't manifest by this point though.
Crash reports, logs, images, videos
hyprlandCrashReport47616.txt hyprlandCrashReport469023.txt I attached two crash reports. One of them segfaulted because of an IPC call. My AGS bar uses IPC to get workspace info from Hyprland. I restarted Hyprland without the bar running, and got the other crash report which failed on something else.
This issue is very versatile and I don't know what else I should upload here. I did a ton of testing and got a ton of log files and crash reports. Let me know if you are interested in any specific scenarios. I'll do my best to gather more specific info.