Wrong monitor geometry in AppVm [solved]

I happily run Qubes 4.2 with i3 and a multi monitor environment. All my vms are debian based (stable)

I have 3 24" 1920x1200 monitors, 2 pivoted (positioned vertically) left and right of the central display. The total geometry (i.e. total real estate) is 4320x1920.

In most of my AppVm I had this problem with the context menu, dropping under the central monitor area and making impossible to reach most of the items shown in the menu. Like this:

In one AppVm though it worked properly, like this:

TLDR;

Install the package xcvt

apt install xcvt in the template. Shutdown AppVm, shutdown template, restart AppVm.

for the Qubes team: I think that the xcvt package should be a dependency for qubes-core-agent package (my 2 cents)

More details

I add here something, as future reference, for those who are troubleshooting some similar issue.

What helped me in finding the problem were these things:

I started nautilus in debug mode (inside AppVm):

export GTK_DEBUG=interactive; nautilus

In the AppVm affected by the context menu issue, I would see this under the global section of the debugger:

In the vm not affected, I would have this:

So I started digging with xrandr.

In the vm with wrong geometry:

> xrandr 
Screen 0: minimum 64 x 64, current 4320 x 1920, maximum 32767 x 32767
DUMMY0 connected primary 4320x1920+0+0 0mm x 0mm
   QB4320x1920   25.98*+
DUMMY1 disconnected
DUMMY2 disconnected
DUMMY3 disconnected
DUMMY4 disconnected
DUMMY5 disconnected
DUMMY6 disconnected
DUMMY7 disconnected
DUMMY8 disconnected
DUMMY9 disconnected
DUMMY10 disconnected
DUMMY11 disconnected
DUMMY12 disconnected
DUMMY13 disconnected
DUMMY14 disconnected
DUMMY15 disconnected

in the vm with right geometry:

~ $ xrandr 
Screen 0: minimum 64 x 64, current 4320 x 1920, maximum 32767 x 32767
DUMMY0 connected primary 1920x1200+1200+0 0mm x 0mm
   QB4320x1920   25.98 +
   QB1920x1200   59.88* 
DUMMY1 connected 1200x1920+3120+0 0mm x 0mm
   QB4320x1920   25.98 +
   QB1200x1920   59.95* 
DUMMY2 connected 1200x1920+0+0 0mm x 0mm
   QB4320x1920   25.98 +
   QB1200x1920   59.95* 
DUMMY3 disconnected
DUMMY4 disconnected
DUMMY5 disconnected
DUMMY6 disconnected
DUMMY7 disconnected
DUMMY8 disconnected
DUMMY9 disconnected
DUMMY10 disconnected
DUMMY11 disconnected
DUMMY12 disconnected
DUMMY13 disconnected
DUMMY14 disconnected
DUMMY15 disconnected

This explains why the context menu would drop below the central screen area as the height of the central screen would be considered 1920 (virtual real estate size) instead of 1200 (real size)

Then I’ve found this post - thanks David -

I launched journalctl -f in the affected vm terminal and ran in dom0 terminal :

qvm-start-gui --notify-monitor-layout <vm_name_here>

In journalctl I noticed this error:

/etc/qubes-rpc/qubes.SetMonitorLayout: line 20: cvt: command not found

A warm hug to all the developers and supporters of Qubes OS. I love this OS