Luciano Santos
1ebbd51ab8
- Add mutter-trap-dpms-errors.patch: Apparently DPMSForceLevel() can fail if DPMS is not enabled, so trap errors of DPMS because they are not critical and should not block user session. (bsc#1215273, glgo#GNOME/mutter!3160) OBS-URL: https://build.opensuse.org/request/show/1110967 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=466
42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From 4749c073ebef7160af94b9a622090ec922d26aef Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
Date: Mon, 7 Aug 2023 22:42:18 +0200
|
|
Subject: [PATCH] monitor-manager/xrandr: Trap DPMS changes
|
|
|
|
Apparently DPMSForceLevel() can fail to force a valid level sometimes.
|
|
|
|
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2857
|
|
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6883
|
|
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3160>
|
|
---
|
|
src/backends/x11/meta-monitor-manager-xrandr.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c
|
|
index c50006200a..128a34b9fb 100644
|
|
--- a/src/backends/x11/meta-monitor-manager-xrandr.c
|
|
+++ b/src/backends/x11/meta-monitor-manager-xrandr.c
|
|
@@ -58,7 +58,7 @@
|
|
#include "backends/x11/meta-output-xrandr.h"
|
|
#include "clutter/clutter.h"
|
|
#include "meta/main.h"
|
|
-#include "meta/meta-x11-errors.h"
|
|
+#include "mtk/mtk-x11.h"
|
|
|
|
/* Look for DPI_FALLBACK in:
|
|
* http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/xsettings/gsd-xsettings-manager.c
|
|
@@ -185,8 +185,10 @@ meta_monitor_manager_xrandr_set_power_save_mode (MetaMonitorManager *manager,
|
|
return;
|
|
}
|
|
|
|
+ mtk_x11_error_trap_push (manager_xrandr->xdisplay);
|
|
DPMSForceLevel (manager_xrandr->xdisplay, state);
|
|
DPMSSetTimeouts (manager_xrandr->xdisplay, 0, 0, 0);
|
|
+ mtk_x11_error_trap_pop (manager_xrandr->xdisplay);
|
|
}
|
|
|
|
static xcb_randr_rotation_t
|
|
--
|
|
GitLab
|
|
|