System is left unusable if there are no enabled monitors #12325
Replies: 3 comments
-
|
I wanted to create a similar post but seems this already exists, so I'll piggy back on it with some more details and how to reproduce -- also I believe in some cases it's still "working" but in most it doesn't. I got to the point where I can reproduce a crash for this (only on start up though, when applied to a running system it just swallows the errors, or it's a red herring but anyway, my findings below). Hey! I think there is a bug when hyprland fails to get to an interactible state after all the monitors are disabled on startup (this works however, after the startup) -- wanted to know if this is desired, and if so why. Imagine a scenario when as the user I have one of my two desired "monitor profiles" in
How I switch between these is somewhat unimportant (can be manual, symlinks, etc.). And essentially the "profiles" are just settings for where the user'd use the settings at, nothing super special about these but it's the easiest to illustrate on a working example. Now, let's say the contents of then I shutdown the computer, remove the HDMI cable for the external monitor, and boot again. Then run Hyprland seems to be stuck and the monitor is not interactive anymore. The same is reported in this reddit post. When hyprland gets to this state the keybinds do not seem to work (e.g. exiting the session), same for This does work when I start up with a "working state" (e.g. a laptop screen configured, only one screen, then disable it, then reenable it). Here are steps to most easily reproduce, assuming you have one display attached (
Then run with (not under a nested session): ~/hyprtest/save-logs.sh && ~/hyprtest/switch-monitors.sh && HYPRLAND_TRACE=1 AQ_TRACE=1 Hyprland --config ~/hyprtest/hypr.confExplanation:
For me sometimes a crash happens, sometimes everything is just frozen (can't even grab the keyboard input to kernel to switch to another tty). Here are the logs (stripped to only errors): same but stripped to only same but stripped to (I noticed a fallback is added when no other output is specified) Here's the crash report: The above is fine if we start up with a monitor, then disable it, then reenable it, which tells me there is some hidden assumption being made or some invariant that does not hold. Would appreciate some input whether this is desired -- this connects to a monitor switching tool I'm developing and likely a workaround is needed there since the assumption was that this'd work correctly. |
Beta Was this translation helpful? Give feedback.
-
|
I also had the same issue and was with @fiffeek to confirm, commenting just in case because you can recover by editing the kernel cmdline on the bootloader(limine, grub) by adding after rebooting that should drop you into the cli |
Beta Was this translation helpful? Give feedback.
-
|
I thought about this for a little bit, and I think the easiest solution would be to just not let the user disable the last enabled monitor/output (when parsing config and/or when issuing hyprctl commands), that would guarantee this magic invariant is held always (so no errors on the user side), and generally IMO this is what the user wants -- no one really should rely on the behavior of disabling all the displays? If the above does not seem coherent or sound -- just do not let the user disable all the monitors (throw a warn/err or whatever and surface at the top like other config errors) on start up (since when running this can be recovered). Above are just prevention method, I haven't yet got to read the code for this but I suspect for anyone not that familiar with the codebase this will be a nightmare to debug (even reproducing this takes lotta time, I can't get a nested hyprland session to reproduce this at all since disabling the only output [WAYLAND-1] on start-up will result in completely loosing access to the screen). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have a single monitor and choose to disable it with
hyprctl keyword monitor eDP-1,disable.I am left with an anusable system and need to reboot with reisub/power button, I can't even switch to another tty anymore.
Beta Was this translation helpful? Give feedback.
All reactions