From 6e1a2735709981c4ea4d0851734af7a7fc1e785b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 20 Nov 2025 17:00:34 +0100 Subject: [PATCH 1/2] Fix (partially) setting resolution on sys-gui When running sys-gui, there are two X servers. The one on :1 is actually connected to dom0, adjust resolution/monitor layout there. The internal one likely need adjustment too, but leave that for later This hopefully will be enough to unbreak sys-gui with https://github.com/QubesOS/qubes-gui-agent-linux/pull/251 --- appvm-scripts/usrbin/qubes-set-monitor-layout | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appvm-scripts/usrbin/qubes-set-monitor-layout b/appvm-scripts/usrbin/qubes-set-monitor-layout index b38e0cc6..a734eb7c 100755 --- a/appvm-scripts/usrbin/qubes-set-monitor-layout +++ b/appvm-scripts/usrbin/qubes-set-monitor-layout @@ -4,6 +4,12 @@ # on having DISPLAY set from there export DISPLAY=:0 +if [ -e /run/qubes-service/guivm-gui-agent ]; then + # on sys-gui, adjust monitor layout of the parent Xorg + # FIXME: Xephyr (on :0) may need adjusting resolution too, if possible... + export DISPLAY=:1 +fi + # Wait for Xorg complete startup while ! xrandr -q &>/dev/null; do sleep 0.1; done From caf05d10da378e5c1fd368624798e45404403a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 20 Nov 2025 19:59:13 +0100 Subject: [PATCH 2/2] sys-gui: connect Xephyr to DUMMY0 output This allows Xephyr to automatically resize on resolution change. On the other hand, this breaks multi-monitor support in sys-gui even more... It used to be all monitors combined into a single screen in sys-gui (with no metadata about the split), and no way to dynamically change the layout (including dynamically connecting/disconnecting some). Now the first one will work, including dynamic resolution change, but all the others will be ignored (remain black). This dynamic resolution change makes it work again with late gui-daemon connection, see https://github.com/QubesOS/qubes-gui-agent-linux/pull/251 Since sys-gui is mostly fallback option in case sys-gui-gpu cannot be used for some reason, it can have limitations. --- appvm-scripts/usrbin/qubes-run-xephyr | 2 +- appvm-scripts/usrbin/qubes-set-monitor-layout | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/appvm-scripts/usrbin/qubes-run-xephyr b/appvm-scripts/usrbin/qubes-run-xephyr index 8e9269bf..a2849cc0 100644 --- a/appvm-scripts/usrbin/qubes-run-xephyr +++ b/appvm-scripts/usrbin/qubes-run-xephyr @@ -1,6 +1,6 @@ #!/bin/sh DISPLAY_XEPHYR="$1" -OPTIONS_XEPHYR="-no-host-grab -fullscreen" +OPTIONS_XEPHYR="-no-host-grab -output DUMMY0" if [ -e /usr/lib/x86_64-linux-gnu/qubes-gui-daemon/shmoverride.so ]; then SHMOVERRIDE=/usr/lib/x86_64-linux-gnu/qubes-gui-daemon/shmoverride.so diff --git a/appvm-scripts/usrbin/qubes-set-monitor-layout b/appvm-scripts/usrbin/qubes-set-monitor-layout index a734eb7c..3bdee8ae 100755 --- a/appvm-scripts/usrbin/qubes-set-monitor-layout +++ b/appvm-scripts/usrbin/qubes-set-monitor-layout @@ -6,7 +6,6 @@ export DISPLAY=:0 if [ -e /run/qubes-service/guivm-gui-agent ]; then # on sys-gui, adjust monitor layout of the parent Xorg - # FIXME: Xephyr (on :0) may need adjusting resolution too, if possible... export DISPLAY=:1 fi