Hyprland ends up in red screen after constantly trying to enable MSI monitor when DPMS is off
Hyprland Version
v0.30.0
Bug or Regression?
Bug
Description
When DPMS is off on my MSI MAG274QRF-QD, hyprland keeps doing the following logs:
okt 26 23:40:11 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:33.227 [INFO] [backend/drm/drm.c:746] connector DP-2: Turning off
okt 26 23:40:11 NixOS-justin swayidle[560913]: ok
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:44.498 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:44.565 [INFO] [backend/drm/drm.c:1578] 'DP-2' disconnected
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:44.565 [ERROR] [types/output/swapchain.c:109] Swapchain for output 'DP-2' failed test
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:44.565 [ERROR] [types/output/swapchain.c:109] Swapchain for output 'DP-2' failed test
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:44.566 [INFO] [backend/drm/drm.c:746] connector DP-2: Turning off
okt 26 23:40:23 NixOS-justin swayidle[363256]: 2023-10-26 23:40:23 - [main.c:244] Destroy surface for output (null)
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:44.566 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338542]: 2023-10-26 23:40:23 - [main.c:397] Destroying output DP-2 (Microstep MAG274QRF-QD CA8A270B00307)
okt 26 23:40:23 NixOS-justin .waybar-wrapped[561168]: static void Glib::DispatchNotifier::unreference_instance(Glib::DispatchNotifier*, const Glib::Dispatcher*): assertion 'instance == notifier' failed
okt 26 23:40:23 NixOS-justin waybar[338992]: [2023-10-26 23:40:23.250] [info] Bar removed from output: DP-2
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:45.040 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 26 23:40:23 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:43:45.316 [INFO] [backend/drm/drm.c:1570] 'DP-2' connected
It keeps doing this until the kernel decides to kill swayidle, because it runs out of memory. After which this is printed:
okt 26 23:47:25 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:50:46.970 [INFO] [libseat] [libseat/backend/logind.c:382] Disabling seat
okt 26 23:47:25 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[338372]: 00:50:46.970 [INFO] [backend/drm/backend.c:143] DRM fd paused
At this point my screen turns red as soon as I unlock swaylock, and the only way to recover is to kill hyprland from another tty and then login again through gdm3.
How to reproduce
Use swaylock/swayidle with a MSI monitor
Hyprland config is here: https://github.com/Arroquw/nixos-config/tree/main/home/desktop/hyprland
Swaylock/swayidle configs: https://github.com/Arroquw/nixos-config/tree/main/home/default.nix https://github.com/Arroquw/nixos-config/tree/main/home/pc-i9_9900k-rtx3090/default.nix
Crash reports, logs, images, videos
journalctl gives a constant output of the following:
okt 27 00:13:16 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:28.059 [INFO] [backend/drm/drm.c:746] connector DP-2: Turning off
okt 27 00:13:16 NixOS-justin swayidle[71159]: ok
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.331 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.411 [INFO] [backend/drm/drm.c:1578] 'DP-2' disconnected
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.411 [ERROR] [types/output/swapchain.c:109] Swapchain for output 'DP-2' failed test
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.412 [ERROR] [types/output/swapchain.c:109] Swapchain for output 'DP-2' failed test
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.412 [INFO] [backend/drm/drm.c:746] connector DP-2: Turning off
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.413 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[65778]: 2023-10-27 00:13:27 -
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[5319]: 2023-10-27 00:13:27 -
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[65778]: [main.c:244] Destroy surface for output (null)
okt 27 00:13:27 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[5319]: [main.c:397] Destroying output DP-2 (Microstep MAG274QRF-QD CA8A270B00307)
okt 27 00:13:27 NixOS-justin .waybar-wrapped[71396]: static void Glib::DispatchNotifier::unreference_instance(Glib::DispatchNotifier*, const Glib::Dispatcher*): assertion 'instance == notifier' failed
okt 27 00:13:27 NixOS-justin waybar[5093]: [2023-10-27 00:13:27.891] [info] Bar removed from output: DP-2
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:39.872 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1570] 'DP-2' connected
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1379] Detected modes:
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 2560x1440 @ 59.940 Hz (preferred)
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 3840x2160 @ 59.940 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 3840x2160 @ 29.970 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 2560x1440 @ 164.835 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 2560x1440 @ 119.998 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1920x1080 @ 164.891 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1920x1080 @ 119.879 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1920x1080 @ 100.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1920x1080 @ 60.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1920x1080 @ 59.939 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1920x1080 @ 50.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1680x1050 @ 59.954 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1280x1024 @ 75.025 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1280x1024 @ 60.020 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1440x900 @ 59.887 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1280x720 @ 119.879 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1280x720 @ 100.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1280x720 @ 59.943 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1280x720 @ 50.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1024x768 @ 75.029 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1024x768 @ 70.069 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 1024x768 @ 60.004 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 800x600 @ 75.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 800x600 @ 72.188 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 800x600 @ 60.317 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 800x600 @ 56.250 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 720x576 @ 50.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 720x480 @ 59.940 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 640x480 @ 75.000 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 640x480 @ 72.809 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1406] 640x480 @ 59.940 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [util/env.c:9] Loading WLR_NO_HARDWARE_CURSORS option: 1
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1426] Physical size: 600x340
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.149 [INFO] [backend/drm/drm.c:1606] connector DP-2: Requesting modeset
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.182 [INFO] [backend/drm/drm.c:742] connector DP-2: Modesetting with 2560x1440 @ 164.835 Hz
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[4841]: 00:19:40.240 [INFO] [backend/drm/drm.c:1494] Scanning DRM connectors on /dev/dri/card0
okt 27 00:13:28 NixOS-justin /nix/store/rl9qqy5n41is2dvmnplbfvlaj5dsda44-gdm-44.1/libexec/gdm-wayland-session[5319]: 2023-10-27 00:13:28 - [main.c:293] Found config * for output DP-2 (Microstep MAG274QRF-QD CA8A270B00307)
Until it happened too often, making it crash:
okt 26 23:47:20 NixOS-justin kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/[email protected]/app.slice/swayidle.service,task=swaylock,pid=363256,uid=1000
okt 26 23:47:20 NixOS-justin kernel: Out of memory: Killed process 363256 (swaylock) total-vm:10629628kB, anon-rss:6387984kB, file-rss:0kB, shmem-rss:57984kB, UID:1000 pgtables:12724kB oom_score_adj:200
No crash reports are generated by hyprland
means swaylock crashed
switch to tty3, killall swaylock and go back tty1, use keybind to reload swaylock. That is my way. )
https://github.com/hyprwm/Hyprland/issues/3605 same.
manually restarting swaylock blindly in the red screen by opening terminal with keybind and typing swaylock -fF also works
switch to tty3, killall swaylock and go back tty1, use keybind to reload swaylock. That is my way. )
manually restarting swaylock blindly in the red screen by opening terminal with keybind and typing swaylock -fF also works
I have a very similar problem but neither of the solutions here work :/
I found a workaround: after locking the screen, switch to a different TTY (like TTY3) and then turn off the monitors, no red screen ever.
Also encountered red screen, but only if I turn off monitor manually, then wait couple of minutes to swyaidle to call dpms off and then turn on manually and do some input(mouse move, keyboard event). IDK if there is something crashing in the background, but I have same red screen symptom.
But for me its even more annoying since I'm unable to switch to ttys and restart hyprland or so... I need to restart by hw restart button.
Experiencing this issue too, with hypridle and hyprlock. Samsung display.
Could this be a race condition bug where it does not give the monitor enough time to turn on before setting modes...?
Same problem here. Either with swaylock and hyprlock. After some time in locking condition the screen is red and not responding. No solution so far
+1, red screen after locking with either swaylock or hyprlock and putting to sleep. Also, even if I tty into another session and kill hyprlock it doesn't change anything. It actually seems to me that it's more related to suspension rather than locking because during the day I lock many times, and it's okay, but when it suspends overnight, I often find the red screen in the morning. It's a very bothersome bug because you basically never know when your machine won't wake up and can leave any work unfinished.
I can confirm that switching TTYs stopped working for me recently, but without suspending (desktop PC).
I have only had this happen on a desktop machine btw. On my laptop with eDP panel, this never happens.
Update: Now it becomes a black screen with text something alon the lines of "Running on TTY unknown"
you can thank broken arch packaging for the black screen, it should have instructions written, normally.
Could you outline in what way it is broken so that Arch aswell as us other distro folks can ensure our package is correctly packaged?
it's been posted on the arch tracker, it does not install assets properly.
Update: now it does not go into a red or black screen, it just crashes.
Update: for at least 2-3 weeks, I have not encountered any crashing or red/black screens. My workspaces sometimes get rearranged between the monitors for some reason when turning my displays on, but that's a significant improvement from before.
@Arroquw does this still happen?
I switched to hyprlock/hypridle, doesn't seem to occur then at least. Haven't tried with swaylock/swayidle in a while, but monitor seems to stay off at least.
I switched to hyprlock/hypridle, doesn't seem to occur then at least. Haven't tried with swaylock/swayidle in a while, but monitor seems to stay off at least.
Same for me.
Hello there!
This issue has been closed, as we are moving from issues to discussions. More about this can be found here and in #9854.
Firstly, please make sure this issue is still relevant in latest Hyprland. If so, we ask you to open a discussion (please read the discussion guidelines first, in the pinned post)
Thank you for your understanding!