From f794256e432541ab5e41db5eb11997a31c7666c1 Mon Sep 17 00:00:00 2001 From: zetigu <81594452+zetigu@users.noreply.github.com> Date: Mon, 29 Mar 2021 18:20:05 -0400 Subject: [PATCH] Add single line cmd to set gui-videoram-min A bash pipe from xrandr to get total virtual screen pixels. This will work with multiple displays and rotated display that will extend vertically the video memory usage by alot. --- user/advanced-configuration/gui-configuration.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user/advanced-configuration/gui-configuration.md b/user/advanced-configuration/gui-configuration.md index ff966ca3..b9c722ec 100644 --- a/user/advanced-configuration/gui-configuration.md +++ b/user/advanced-configuration/gui-configuration.md @@ -28,6 +28,11 @@ Where `$WIDTH`×`$HEIGHT` is the maximum desktop size that you anticipate needin For example, if you expect to use a 1080p display and a 4k display side-by-side, that is `(1920 + 3840) × 2160 × 4 / 1024 = 48600`, or slightly more than 48 MiB per qube. After making these adjustments, the qubes need to be restarted. +In the case of multiple display with different orientations or if you plug/unplug displays, the following code will set correct memory size using xrandr. +```sh +qvm-features dom0 gui-videoram-min $(xrandr --verbose | grep "Screen 0" | sed -e 's/.*current //' -e 's/\,.*//' | awk '{print $1*$3*4/1024}') +``` + The amount of memory allocated per qube is the maximum of: - `gui-videoram-min` - current display + `gui-videoram-overhead`